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
5 changes: 3 additions & 2 deletions ppdet/data/source/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,17 @@ def _load_images(self, do_eval=False):
images = self._parse()
ct = 0
records = []
anno_file = self.get_anno()
coco = COCO(anno_file)
for image in images:
assert image != '' and os.path.isfile(image), \
"Image {} not found".format(image)
if self.sample_num > 0 and ct >= self.sample_num:
break
if do_eval:
anno_file = self.get_anno()
coco = COCO(anno_file)
image_id = self.get_image_id(image, coco)
ct = image_id

rec = {'im_id': np.array([ct]), 'im_file': image}
self._imid2path[ct] = image
ct += 1
Expand Down