facebookresearch / maskrcnn-benchmark

Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.
MIT License
9.29k stars 2.5k forks source link

ValueError: No ground-truth boxes available for one of the images during training #724

Open xrenaa opened 5 years ago

xrenaa commented 5 years ago

❓ Questions and Help

I run the code successfully with my own datasets at the beginning. But after 40 iterations, and there is error.

屏幕快照 2019-04-29 下午1 57 31

I have checked that the training images all have their own annotations. I don't know how to deal with it. Thank you!

travispan96 commented 5 years ago

I have the same issue, every image has the annotations.

xrenaa commented 5 years ago

@travispan96 I find that there are errors in my annotations like that the bbox value may be negative. And there is a method that you can check which image is wrong: in "maskrcnn-benchmark/maskrcnnbenchmark/engine/trainer.py" line 57 "for iteration, (images, targets, ) in enumerate(data_loader, startiter):" add a line of code: print("what pairs of images id that I am using", ) Then you will find the image id that was wrong!

travispan96 commented 5 years ago

@travispan96 I find that there are errors in my annotations like that the bbox value may be negative. And there is a method that you can check which image is wrong: in "maskrcnn-benchmark/maskrcnnbenchmark/engine/trainer.py" line 57 "for iteration, (images, targets, ) in enumerate(data_loader, startiter):" add a line of code: print("what pairs of images id that I am using", ) Then you will find the image id that was wrong!

I'll try it, thanks for your suggestion!

travispan96 commented 5 years ago

@travispan96 I find that there are errors in my annotations like that the bbox value may be negative. And there is a method that you can check which image is wrong: in "maskrcnn-benchmark/maskrcnnbenchmark/engine/trainer.py" line 57 "for iteration, (images, targets, ) in enumerate(data_loader, startiter):" add a line of code: print("what pairs of images id that I am using", ) Then you will find the image id that was wrong!

could you please tell me what the meaning is of the value in _, like"(1332, 2968)". How can I know the image id?

xrenaa commented 5 years ago

@travispan96 I find that there are errors in my annotations like that the bbox value may be negative. And there is a method that you can check which image is wrong: in "maskrcnn-benchmark/maskrcnnbenchmark/engine/trainer.py" line 57 "for iteration, (images, targets, ) in enumerate(data_loader, startiter):" add a line of code: print("what pairs of images id that I am using", ) Then you will find the image id that was wrong!

could you please tell me what the meaning is of the value in _, like"(1332, 2968)". How can I know the image id?

(1332,2968) means that you are using an image with image id 1332 and 2968 and you should check in the annotation part of the JSON file for the last pair before the error. annotation{ "id": int,
"image_id": 1332 or 2968, "category_id": int, "segmentation": RLE or [polygon], "area": float, "bbox": [x,y,width,height], "iscrowd": 0 or 1, } there may be error in the annotation.

travispan96 commented 5 years ago

@travispan96 I find that there are errors in my annotations like that the bbox value may be negative. And there is a method that you can check which image is wrong: in "maskrcnn-benchmark/maskrcnnbenchmark/engine/trainer.py" line 57 "for iteration, (images, targets, ) in enumerate(data_loader, startiter):" add a line of code: print("what pairs of images id that I am using", ) Then you will find the image id that was wrong!

could you please tell me what the meaning is of the value in _, like"(1332, 2968)". How can I know the image id?

(1332,2968) means that you are using an image with image id 1332 and 2968 and you should check in the annotation part of the JSON file for the last pair before the error. annotation{ "id": int, "image_id": 1332 or 2968, "category_id": int, "segmentation": RLE or [polygon], "area": float, "bbox": [x,y,width,height], "iscrowd": 0 or 1, } there may be error in the annotation.

I use voc-style annotations and my image name just like "0031cff95ed14705a47133ff790f8cf0.jpg", so I guess they are not my image id. Thanks for your help anyway.^_^

bashirulazam commented 3 years ago

I am having the same issue with GQA dataset. I could not figure out why. I checked the bounding boxes of the image id. It looks fine to me. What could be the other possible reason for this error?