toandaominh1997 / EfficientDet.Pytorch

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

The demo.py has too many boxes to incorrect, and the code updated is unstable. #77

Open y78h11b09 opened 4 years ago

inFreedom92 commented 4 years ago

same here

alen-mask commented 4 years ago

same here for coco datasets.

ma3252788 commented 4 years ago

the same problem~

ma3252788 commented 4 years ago

Changing the threshold is useless

xafarranxera commented 4 years ago

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.