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 534e530 commit c569c7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions detectree2/models/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def build_test_loader(cls, cfg, dataset_name):
"""
return build_detection_test_loader(cfg, dataset_name, mapper=FlexibleDatasetMapper(cfg, is_train=False))

def get_tree_dicts(directory: str, class_mapping: Dict[str, int] = None) -> List[Dict]:
def get_tree_dicts(directory: str, class_mapping: Optional[Dict[str, int]] = None) -> List[Dict[str, Any]]:
"""Get the tree dictionaries.
Args:
Expand Down Expand Up @@ -572,7 +572,7 @@ def get_tree_dicts(directory: str, class_mapping: Dict[str, int] = None) -> List
record["height"] = height
record["width"] = width
record["image_id"] = filename[0:400]
# record["annotations"] = {}
record["annotations"] = {}
# print(filename[0:400])

objs = []
Expand Down Expand Up @@ -608,7 +608,7 @@ def get_tree_dicts(directory: str, class_mapping: Dict[str, int] = None) -> List
def combine_dicts(root_dir: str,
val_dir: int,
mode: str = "train",
class_mapping: Dict[str, int] = None) -> List[Dict]:
class_mapping: Optional[Dict[str, int]] = None) -> List[Dict[str, Any]]:``
"""
Combine dictionaries from different directories based on the specified mode.
Expand Down

0 comments on commit c569c7c

Please sign in to comment.