Skip to content

Commit

Permalink
fix(data): dataset error when running on test-dev (#1137)
Browse files Browse the repository at this point in the history
fix(data): dataset error when running on test-dev
  • Loading branch information
shenyi0220 committed Feb 22, 2022
1 parent d98da01 commit 8a9003d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yolox/data/datasets/coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def remove_useless_info(coco):
img.pop("coco_url", None)
img.pop("date_captured", None)
img.pop("flickr_url", None)
for anno in coco.dataset["annotations"]:
anno.pop("segmentation", None)
if "annotations" in coco.dataset:
for anno in coco.dataset["annotations"]:
anno.pop("segmentation", None)


class COCODataset(Dataset):
Expand Down

0 comments on commit 8a9003d

Please sign in to comment.