Skip to content
Snippets Groups Projects
Commit 125308dd authored by Matthew Dawkins's avatar Matthew Dawkins Committed by Kai Chen
Browse files

Add extra checks to CustomDataset (#1498)

* Fix issues on no ignore boxes specified

* add check during loading

* change back

* change transform.py back

* fix box_filed bug & reformat

* use append rather than extend
parent d1c71db7
No related branches found
No related tags found
No related merge requests found
......@@ -64,8 +64,12 @@ class LoadAnnotations(object):
'Skip the image "{}" that has no valid gt bbox'.format(
file_path))
return None
results['gt_bboxes_ignore'] = ann_info.get('bboxes_ignore', None)
results['bbox_fields'].extend(['gt_bboxes', 'gt_bboxes_ignore'])
gt_bboxes_ignore = ann_info.get('bboxes_ignore', None)
if gt_bboxes_ignore is not None:
results['gt_bboxes_ignore'] = gt_bboxes_ignore
results['bbox_fields'].append('gt_bboxes_ignore')
results['bbox_fields'].append('gt_bboxes')
return results
def _load_labels(self, results):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment