toandaominh1997 / EfficientDet.Pytorch

Implementation EfficientDet: Scalable and Efficient Object Detection in PyTorch
MIT License
1.44k stars 306 forks source link

EfficientDet-D0(with Weight) Object detection results are too bad #90

Closed opentld closed 4 years ago

opentld commented 4 years ago

Download checkpoint_VOC_efficientdet-d0_268.pth from this link: https://drive.google.com/file/d/1r7MAyBfG5OK_9F_cU8yActUWxTHOuOpL/view?usp=sharing
,The results of object detection is fearsome. As shown below image

Do I have to retrain the model?

opentld commented 4 years ago

@toandaominh1997

tienthegainz commented 4 years ago

Try to increase the threshold

wanglaotou commented 4 years ago

i met same error, i set the threshold like 0.98, it still detects many boxes. 图片 and i trained my own voc datasets for 70 epochs and the map is 0. someone know how to fix it?

CraigWang1 commented 4 years ago

The number next to the label name is the confidence score, and most of the boxes that you are displaying only have accuracy scores of 1-2%. To see the relevant predictions, just display the bboxes with >80%.

So, I guess you might need to change the source code in demo.py

Hope this helps.

xafarranxera commented 4 years ago

That's true. The problem is that no filtering is performed in demo.py. After appending boxes, labels and scores, add this:

dataframe = list(zip(bboxes, labels, bbox_scores))
dataframe = list(filter(lambda x: x[2] >= args.threshold*100, dataframe))

if(len(dataframe) > 0):
    bboxes, labels, bbox_scores = list(zip(*dataframe))
else:
    bboxes, labels, bbox_scores = [], [], []

Best wishes.

opentld commented 4 years ago

The problem has been fixed! just add codes like this below : image

and the result like this: image

although, the BGR or RBG channels might be some problem remain, but the process is right !

Thanks @xafarranxera a lot !

xafarranxera commented 4 years ago

Hello again, you're welcome. Regarding BGR problem, you just have to add a single code line at the beginning, as stated in #96 issue.