Skip to content

Commit

Permalink
fix the name error for lvis validation image load(val2017) (open-mmla…
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysy committed Jun 15, 2020
1 parent edd3319 commit e378675
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mmdet/datasets/lvis.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,14 @@ def load_annotations(self, ann_file):
data_infos = []
for i in self.img_ids:
info = self.coco.load_imgs([i])[0]
info['filename'] = info['file_name']
if info['file_name'].startswith('COCO'):
# Convert form the COCO 2014 file naming convention of
# COCO_[train/val/test]2014_000000000000.jpg to the 2017
# naming convention of 000000000000.jpg
# (LVIS v1 will fix this naming issue)
info['filename'] = info['file_name'][-16:]
else:
info['filename'] = info['file_name']
data_infos.append(info)
return data_infos

Expand Down

0 comments on commit e378675

Please sign in to comment.