SwinTransformer / Swin-Transformer-Object-Detection

This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows" on Object Detection and Instance Segmentation.
https://arxiv.org/abs/2103.14030
Apache License 2.0
1.79k stars 375 forks source link

pycocotools._mask.frPyObjects IndexError: list index out of range #162

Open RinggaV opened 2 years ago

RinggaV commented 2 years ago

when i run train.py on coco formated datasets,got an error:

rles = maskUtils.frPyObjects(mask_ann, img_h, img_w)

File "pycocotools_mask.pyx", line 292, in pycocotools._mask.frPyObjects IndexError: list index out of range

Qiang-Feng98 commented 2 years ago

Hi, I encountered the same problem as yours, did you solve it? Can you tell me how you solved it? Tanks very much!

RinggaV commented 2 years ago

Hi, I encountered the same problem as yours, did you solve it? Can you tell me how you solved it? Tanks very much!

数据集有问题一般是,检查下segmentation字段符不符合格式或者直接把segm屏蔽了就行了

Qiang-Feng98 commented 2 years ago

感谢您的回复,我当天直接把seg屏蔽了,好用了

funnymean commented 2 years ago

你好,我也遇到同样的问题了,请问怎么屏蔽的seg?谢谢!

funnymean commented 2 years ago

Hi, I encountered the same problem as yours, did you solve it? Can you tell me how you solved it? Tanks very much!

数据集有问题一般是,检查下segmentation字段符不符合格式或者直接把segm屏蔽了就行了

你好,我也遇到同样的问题了,请问怎么屏蔽的seg?谢谢!

Qiang-Feng98 commented 2 years ago

在issue中有一个解答中有屏蔽代码,你可以找一找,我忘记是哪个了

funnymean commented 2 years ago

在issue中有一个解答中有屏蔽代码,你可以找一找,我忘记是哪个了 可否请大佬提供一下issue中的关键字,感谢感谢!

funnymean commented 2 years ago

Hi, I encountered the same problem as yours, did you solve it? Can you tell me how you solved it? Tanks very much!

数据集有问题一般是,检查下segmentation字段符不符合格式或者直接把segm屏蔽了就行了

求问大佬如何屏蔽seg,感谢感谢~

nabilragab commented 2 years ago

Could we get an answer to close this issue ?

nabilragab commented 2 years ago

Could we get an answer to close this issue ?

-- for me the issue was or is that I am using a LabelStudio and labeling some of my data with a Rectangle Label, and other's with a Polygon Label. -- so the CoCo outputted json file on some classes would have: "segmentation": [], "bbox": [ 29, 310, 682, 430 ], -- hence an empty segmentation array would cause the error

Solutions Tested: -- adding an empty array "segmentation": [[]], !FAILED :-1: -- remove the Rectangle BBOX labels and create the annotations with Polygon Label : !SUCCESS :+1:

thelandord commented 1 year ago

Could we get an answer to close this issue ?

-- for me the issue was or is that I am using a LabelStudio and labeling some of my data with a Rectangle Label, and other's with a Polygon Label. -- so the CoCo outputted json file on some classes would have: "segmentation": [], "bbox": [ 29, 310, 682, 430 ], -- hence an empty segmentation array would cause the error

Solutions Tested: -- adding an empty array "segmentation": [[]], !FAILED 👎 -- remove the Rectangle BBOX labels and create the annotations with Polygon Label : !SUCCESS 👍

hi,i also meet this error. someone says that shielding the Segm.But i don't konw revise which file and how to realize shielding the Seg. I think that the file may be nuimages_v1.0-train.json. Could you help me?

fangweicheng6 commented 4 weeks ago

Could we get an answer to close this issue ?

-- for me the issue was or is that I am using a LabelStudio and labeling some of my data with a Rectangle Label, and other's with a Polygon Label. -- so the CoCo outputted json file on some classes would have: "segmentation": [], "bbox": [ 29, 310, 682, 430 ], -- hence an empty segmentation array would cause the error Solutions Tested: -- adding an empty array "segmentation": [[]], !FAILED 👎 -- remove the Rectangle BBOX labels and create the annotations with Polygon Label : !SUCCESS 👍

hi,i also meet this error. someone says that shielding the Segm.But i don't konw revise which file and how to realize shielding the Seg. I think that the file may be nuimages_v1.0-train.json. Could you help me?

hello ,Have you solve this question? I met the same question.Can you tell me how you solve?