fix data default value

This commit is contained in:
rafaelpadilla
2025-04-28 23:08:37 +00:00
parent 36a21717eb
commit 157ed3af06
+6 -3
View File
@@ -118,9 +118,12 @@ def coco_annotations_to_detections(
else:
area = None
data = dict(
iscrowd=np.asarray(iscrowd, dtype=int), area=np.asarray(area, dtype=float)
)
if use_iscrowd or use_precomputed_area:
data = dict(
iscrowd=np.asarray(iscrowd, dtype=int), area=np.asarray(area, dtype=float)
)
else:
data = dict()
if with_masks:
mask = coco_annotations_to_masks(