toandaominh1997 / EfficientDet.Pytorch

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

Why are there two thresholds? #82

Open ma3252788 opened 4 years ago

ma3252788 commented 4 years ago

Can you say what these two thresholds represent?

threshold and iou_threshold

Thank you!!!!

y78h11b09 commented 4 years ago

one(former) is to filter some anchors for those cls-score less than threshold , anthor(latter) is to reduce some anchors for overlap

ma3252788 commented 4 years ago

one(former) is to filter some anchors for those cls-score less than threshold , anthor(latter) is to reduce some anchors for overlap

Thanks for the reply, why does the detection result not change after I adjust these two thresholds? I set both to 0.5, but there are still a lot of boxes.

xafarranxera commented 4 years ago

one(former) is to filter some anchors for those cls-score less than threshold , anthor(latter) is to reduce some anchors for overlap

Thanks for the reply, why does the detection result not change after I adjust these two thresholds? I set both to 0.5, but there are still a lot of boxes.

That's because although demo.py takes these arguments, no further filtering is then performed using them. 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))
bboxes, labels, bbox_scores = list(zip(*dataframe))

Best wishes.