Set DEFAULT_PIN_LABELS to None

This commit is contained in:
Leonid Kostrykin
2024-04-03 15:50:10 +02:00
parent 1178dc6aaa
commit 8515eed646
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ DEFAULT_DELTA_FRAC = None
DEFAULT_METRIC = "mae"
DEFAULT_EPS = 0.01
DEFAULT_PIN_LABELS = ""
DEFAULT_PIN_LABELS = None
def is_dict(item):
+5 -2
View File
@@ -519,8 +519,11 @@ def intersection_over_union(
return min(_multiobject_intersection_over_union(mask1, mask2, pin_labels))
def _parse_label_list(label_list_str: str) -> List[int]:
return [int(label.strip()) for label in label_list_str.split(",") if len(label_list_str) > 0]
def _parse_label_list(label_list_str: Optional[str]) -> List[int]:
if label_list_str is None:
return []
else:
return [int(label.strip()) for label in label_list_str.split(",") if len(label_list_str) > 0]
def get_image_metric(