Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions python/deeplake/integrations/mmdet/mmdet_dataset_.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ def pascal_frac_2_coco_pixel(boxes, images):
x_bottom = box[:, 2] * shape[1]
y_bottom = box[:, 3] * shape[0]
bbox = np.stack((x_top, y_top, x_bottom, y_bottom), axis=1)
else:
bbox = np.empty((0, 4), dtype=box.dtype)
pascal_pixel_boxes.append(bbox)
return pascal_pixel_2_coco_pixel(pascal_pixel_boxes, images)

Expand All @@ -252,6 +254,8 @@ def yolo_pixel_2_coco_pixel(boxes, images):
w = box[:, 2]
h = box[:, 3]
bbox = np.stack([x_top, y_top, w, h], axis=1)
else:
bbox = np.empty((0, 4), dtype=box.dtype)
yolo_boxes.append(bbox)
return yolo_boxes

Expand Down