Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
PatBall1 committed Sep 16, 2024
1 parent 7fdf072 commit 9061812
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions detectree2/models/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def get_tree_dicts(directory: str, class_mapping: Optional[Dict[str, int]] = Non
with open(json_file) as f:
img_anns = json.load(f)

record = {}
record: Dict[str, Any] = {}
filename = img_anns["imagePath"]

# Make sure we have the correct height and width
Expand Down Expand Up @@ -599,7 +599,7 @@ def get_tree_dicts(directory: str, class_mapping: Optional[Dict[str, int]] = Non

objs.append(obj)

record["annotations"] = objs
record["annotations"] = objs if objs else []
dataset_dicts.append(record)

return dataset_dicts
Expand Down

0 comments on commit 9061812

Please sign in to comment.