FCOS
FCOS copied to clipboard
IndexError: index 0 is out of bounds in get_sample_region
Traceback (most recent call last):
File "tools/train_net.py", line 180, in
as I want to train bounding boxes and no segmentation masks, I followed issue #79 already and that worked. But this error seems to be new. It looks like there are no bounding boxes for some images, which is not the case. I use my own dataset which is in the coco-format.
Any help is much appreciated!
@toddChavezz I'm having the same problem. How do you fix it ? P.S: i had figured out the problem. For my situation, when I converted my datasets to coco_format, I forgot to set the value of "iscrowd" in it. When i checked it, the value of my iscrowd is None, then in file fcos_core/data/datasets/coco.py line 71, anno = [obj for obj in anno if obj["iscrowd"] == 0] will return []. Just delete that line if you're sure that no image has no bounding boxes in it.
@trungpham2606 the problem in my program was, that some images didn't have annotations, because my data was corrupted. Some of the bounding boxes didn't fit on the image and the implementation threw all those out.
Hello, I have encountered the same problem, but my data set is extracted from COCO2014's bowl category, I am sure there is no mistake, I am very troubled.When I used COCO2014 in its entirety, I had no problems.
您好,我遇到了同样的问题,但是我的数据集是从COCO2014的碗类中提取的,我确定没有错,我很麻烦。当我完全使用COCO2014时,我没有任何问题。
Same,Have you solved the problem? It happens when I'm using dataset extracted from COCO. It seems like some annotations cannot loaded properly in get_sample_region, I log the params: center_x torch.Size([30785, 0]) center_y torch.Size([30785, 0]) center_gt torch.Size([30785, 0, 4]) which should not contain zero.
Hello, Does anyone figure out how to solve it? I use my own datasets which have the max size 800 and the smallest size 144. I have removed all objects without annotation. But the problem keeps occuring: if center_x[..., 0].sum() == 0: IndexError: index 0 is out of bounds for dimension 1 with size 0