EfficientDet.Pytorch icon indicating copy to clipboard operation
EfficientDet.Pytorch copied to clipboard

run demo.py, image nothing happened

Open shengyuqing opened this issue 4 years ago • 7 comments

Hi, thanks very much for your code! I trained a model 'checkpoint_VOC_efficientdet-d2_17.pth' on my own dataset, but when I demo.py this model no box appeared in the image. Nothing happened only image color changed.

Why need data augmentation when running demo.py? The output image changes color when I input an image.

shengyuqing avatar Dec 14 '19 09:12 shengyuqing

about image color changed, you can change the demo.py code at 72 line.

#origin_img = copy.deepcopy(img)
origin_img=cv2.cvtColor(img,cv2.COLOR_BGR2RGB) # add this code

SHMathRabbit avatar Dec 16 '19 03:12 SHMathRabbit

I have the same question.

kapness avatar Dec 19 '19 10:12 kapness

I met the same problem when I try to test a model trained on COCO. I futher printed out the outputs of the model, and all the scores are very small numbers like 2.9548e-06 or so. Does that mean the model was not correctly trained? Although the loss seems fine after 15 epochs of training.

Vandmoon avatar Dec 20 '19 07:12 Vandmoon

Hello, I'm just a newbie.

Color issue of demo.py could be fixed as https://github.com/toandaominh1997/EfficientDet.Pytorch/issues/31#issuecomment-565888531

Next, Why need data augmentation when running demo.py? As I know data augmentation used in demo.py is self.transform = get_augumentation(phase='test') which is test phase, it contains some stuff like Resizing, Normalizing, ToTensor. So it's like a preprocess? I think. (because it's test phase)

Next, nothing happened? I think model is not trained appropriately if you see "No boxes to NMS" printed

sorry for my bad English

inFreedom92 avatar Dec 20 '19 10:12 inFreedom92

@inFreedom92 Hi, I have met the same problem,when run eval.py to test voc2007(4952imgs), some images show "No boxes to NMS",and some other images can be detected, but finally, all classes map is <10%(0.05 or 0.06), do you know what's going on? thanks!

pangpanghuahuamaomi avatar Dec 30 '19 06:12 pangpanghuahuamaomi

@pangpanghuahuamaomi

Hi, I have met the same problem,when run eval.py to test voc2007(4952imgs), some images show "No boxes to NMS",and some other images can be detected, but finally, all classes map is <10%(0.05 or 0.06), do you know what's going on? thanks!

I'm currently using my custom dataset. so I haven't used eval.py but in my opinion, the model that you're using is not trained enough...

I'm sorry that I can't give you the answer that you want.

inFreedom92 avatar Dec 30 '19 10:12 inFreedom92

I've got the same problem with a model trained for 100 epochs on a coco subset of 3200 images. Evaluation got mAP of 0.07 and when i run demo.py, "No boxes to NMS" message is showed. Some suggestions?

giuordy avatar Feb 25 '20 15:02 giuordy