diff --git a/mmdet/datasets/coco.py b/mmdet/datasets/coco.py index 73a91c523ae69e1e727ecf91d1df5184c5929e9b..0ee92f97da5a6b56ce5fd1a11244c3bea3b6dba5 100644 --- a/mmdet/datasets/coco.py +++ b/mmdet/datasets/coco.py @@ -280,6 +280,8 @@ class CocoDataset(Dataset): raise AssertionError( 'proposals should have shapes (n, 4) or (n, 5), ' 'but found {}'.format(proposal.shape)) + else: + proposal = None def prepare_single(img, scale, flip, proposal=None): _img, img_shape, pad_shape, scale_factor = self.img_transform(