chensnathan / YOLOF

You Only Look One-level Feature (YOLOF), CVPR2021, Detectron2
MIT License
271 stars 28 forks source link

AssertionError: bad box: x1 larger than x2 #24

Closed life97 closed 3 years ago

life97 commented 3 years ago

Hello, dear author! When I train YOLOF with my own dataset, an error occurs. The error is as follows: File "G:\Anaconda3\envs\xyy_detectron2\lib\site-packages\fvcore\nn\giou_loss.py", line 32, in giou_loss assert (x2 >= x1).all(), "bad box: x1 larger than x2" AssertionError: bad box: x1 larger than x2 Always run a few epochs will report such an error, try to comment out the assertion, the loss will be nan. How to solve this problem? I would be very grateful if you could help me.

QQ图片20210620164626

chensnathan commented 3 years ago

Hi, you can post your full training log file here. I will try to help.

life97 commented 3 years ago

Thank you very much for replying to me. This is my latest training log file. log.txt

chensnathan commented 3 years ago

It seems that you modify the config according to your experimental environment. If the batch size is smaller than the original setting, you may need to adjust the learning rate, the warm up iterations, the iteration steps. You can find an example in this response.

life97 commented 3 years ago

Thank you very much for your patient reply, I will try again according to your opinion.

life97 commented 3 years ago

Thank you very much for your suggestion, I have run through the program.