Skip to content

Commit 0b16c7c

Browse files
authored
fix coco category id mismatch bug
1 parent 3716ff4 commit 0b16c7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

efficientdet/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def load_annotations(self, image_index):
7373

7474
annotation = np.zeros((1, 5))
7575
annotation[0, :4] = a['bbox']
76-
annotation[0, 4] = a['category_id']
76+
annotation[0, 4] = a['category_id'] - 1
7777
annotations = np.append(annotations, annotation, axis=0)
7878

7979
# transform from [x, y, w, h] to [x1, y1, x2, y2]

0 commit comments

Comments
 (0)