New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: maximum box coordinate value is too large #1754
Comments
Hi, have you find what caused this error? update fixed: |
Could you please verify that your ground truth regions are set correctly? |
Hi, something similar on my side, after looking twice at my ground truth regions, some of them had their box coordinates greater than either the image width or height. |
I have similar error: |
I'm having the same error when I use any of the following: But NOT when I use: My training images are a mixture of 300x300 and 450x450 pixels. I don't believe any of my bounding boxes are outside the image coordinates. Even if that's the case why would the last two models work but not the resnet models? |
I'm having the same issue when I train either of the faster_rcnn models and the tfcn_resnet model but not with either of the ssd models. |
Let me know if you find a solution. I've been struggling with this for 3 days now and I have no clue why this is happening. |
Is there anyone solve this problem? I also can not use faster_rcnn_inception_resnet_v2_atrous_coco |
Actually, I just ignore this error, change the ./core/box_list_ops.py |
I have the same problem, it would be useful to return the name of the image that fails when it raises this error |
try |
@yinggo @CARASO thanks for the valuable info. But after doing the appropriate changes now I get the following error:
Any suggestions or hints? |
@kirk86 Yes, I also found that if ‘check_range = false’ there are still other errors. Now I can only use the dichotomy to troubleshoot data sets. Hope that other friends have better solutions. |
@kirk86 Yes, I tried his method, but it didn't help me. Then I used the suggestion for you. I think the direction of the two of us is the same. We are all ignoring this cross-border mistake. But then I found this direction wrong, because it will only make the mistake erupt later. At the moment, I compressed the 4000+ dataset to only 600+, and I was able to train normally. Afterwards, I tried to incrementally add data and try to find out the problem data set. There is no better plan at this time. I hope you or other friends can tell me when they have better suggestions. |
Hey guys, Cheers |
@asturm0 Yes, I also used similar methods to filter the data set, but unfortunately, the filtered data set still has an exception. I had to manually delete more than 1,500 photos. At present, 12000+ steps were trained and no abnormalities were found. I share the script that filters datasets here, I hope to be useful to other partners, and someone can give a more perfect solution. Cheers |
This error also arises when the bounding boxes are two small compared to the size of the image. I deleted all boxes that are less than 1/16 th of the image size and the training works fine. Has anyone tried this before? Is there a specific proportion (instead of 1/16th) that we can take that is tied to how fasterRCNN is implemented? |
@tvkpz Are you saying area? Or is it length or width? |
area |
After filtering the data set above, I have trained over 450,000 steps to see no exceptions. |
Size of the area is dependent on some of the parameters (size of anchor etc) of fasterRCNN algorithm. Wondering if anyone knows the connection. I have not yet looked into it. |
In my case few images gave different width and height on opencv and PIL. (w, h are exchanged for some reason) width, height = image.size
if int(data['size']['width']) != width or int(data['size']['height']) != height:
continue |
Thanks @asturm0 . Your script helped me detect that one of my images had a wrong annotation (a box fully outside of the image - used labelimg). |
My issue was that for some of my images, the height listed in my pascal xml was actually the width dimension and vice versa. This maybe because I used an out of date vatic build. Hopefully this helps someone |
Dude, life saver |
@Sibozhu Where did you change this? |
@madi how do you print the image name? I tried scouring for the function that prints the image name but couldn't find it in the repo. Any help would be appreciated! |
I have the same erro: |
@CARASO thanks ,your script helped me to identify the mistake |
Use this size checker . |
which file ? |
/software/models/research/object_detection/core/box_list_ops.py |
It seems that the training data has some bad annotations. |
Omg! You saved my life. T_T THANK YOU VERY MUCH!!! |
Where to get file name? |
|
Thank you for this mate!!! |
Welcome🤣 |
@CARASO do you think that putting |
Before creating the TF record file, I changed my ground truth like this which solved my problem.
|
je voulais savoir est ce que quand je relance la formation le modèle ça ne posera pas de problème vu que j'ai pas pu résolu le problème a chaque fois j'ai la même erreur |
I had this problem and solved it as @rmekdma suggested, correcting the difference in the image resolution when the image is read. It turns out that some images have the width and height changed because of the metadata of the file. To prevent this, in my generate_tfrecord.py script I changed how the image is opened from this:
to this:
And it solved the problem. |
If there are a lot if instances where the bounding box is in the wrong spot, then yah the performance will definitely suffer. If its just 1 image it shouldn't be too much of an issue. |
System information
During training (rfcn architecture), the following error appears after some random steps:
InvalidArgumentError (see above for traceback): assertion failed: [maximum box coordinate value is larger than 1.01: ] [1.0111111]
Which happens to be thrown by box_list_ops.to_normalized_coordinates after a failed assertion.
I have to restart from the latest checkpoint to continue the training, however the same type of error can be thrown again.
Log can be found here: https://gist.github.com/ericj974/f270855bf6368509c74c05e94b6cb7b8
Config file here: https://gist.github.com/ericj974/8af390e1841b4f9be463b70573dc17d1
The text was updated successfully, but these errors were encountered: