MMDET ValueError: need at least one array to stack
saidineshpola opened this issue · comments
I got below mentioned error at 2022-02-02 05:32:05,118 - mmdet - INFO - Epoch [1][900/13322]
while training my custom coco dataset which have polygon masking in annotations. All images have segmentation data in annotations so there are no empty gt_masks instances. what should I do to solve this error and continue training?
File "/content/RefineMask/mmdet/models/roi_heads/mask_heads/refine_mask_head.py", line 284, in get_targets
instance_masks = torch.from_numpy(np.stack(instance_masks)).to(device=pos_bboxes.device, dtype=torch.float32)
File "<__array_function__ internals>", line 6, in stack
File "/usr/local/lib/python3.7/dist-packages/numpy/core/shape_base.py", line 423, in stack
raise ValueError('need at least one array to stack')
ValueError: need at least one array to stack
I got below mentioned error at
2022-02-02 05:32:05,118 - mmdet - INFO - Epoch [1][900/13322]
while training my custom coco dataset which have polygon masking in annotations. All images have segmentation data in annotations so there are no empty gt_masks instances. what should I do to solve this error and continue training?File "/content/RefineMask/mmdet/models/roi_heads/mask_heads/refine_mask_head.py", line 284, in get_targets instance_masks = torch.from_numpy(np.stack(instance_masks)).to(device=pos_bboxes.device, dtype=torch.float32) File "<__array_function__ internals>", line 6, in stack File "/usr/local/lib/python3.7/dist-packages/numpy/core/shape_base.py", line 423, in stack raise ValueError('need at least one array to stack') ValueError: need at least one array to stack
Suggest you print and check the input instance_masks
. This error indicates that the input instance_masks
is an empty list.
What's the reason for this? I also encountered this problem