moein-shariatnia / Pix2Seq

Simple Implementation of Pix2Seq model for object detection in PyTorch
MIT License
115 stars 16 forks source link

"test.py"can evalute the dataset under the trained model? #5

Open ghost opened 1 year ago

ghost commented 1 year ago

Hi Shariatnia, thanks for the tutorial! It helps a lot! But I am still confused about test.py and have some bugs. I trained the full VOC dataset and ran 200 epochs, resulting in a model best_vaild_loss.pth. I would like to evaluate the mAP of the trained model, but I am getting the following errors. I am wondering how to solve the problem. Do you have any suggestions? image

moein-shariatnia commented 1 year ago

go to debugger mode and check what the output of bboxes tensor is. I guess maybe the model has not been able to detect any boxes for one image and that could explain this error.

WenLinLliu commented 1 year ago

this is because model can't detects any objecting,change 53 line of test.py to if EOS_idx == 0 or EOS_idx == 1: