see-- / keras-centernet

A Keras implementation of CenterNet with pre-trained model (unofficial)
MIT License
337 stars 84 forks source link

purpose of letterbox_transformer and possible bug #21

Closed zabir-nabil closed 4 years ago

zabir-nabil commented 4 years ago

What is the purpose of letterbox_transformer used in the code?

In your test codes, you have processed the bounding boxes in the following manner,

for d in detections:
    x1, y1, x2, y2, score, cl = d
    if score < 0.3:
        break

Should the break statement be there or it should be a continue statement instead?

see-- commented 4 years ago

break should be fine as the boxes are sorted by score: https://github.com/see--/keras-centernet/blob/master/keras_centernet/models/decode.py#L31

Edit: letterbox_transformer is from the original repo. It's how the images are resized.

zabir-nabil commented 4 years ago

Okay, didn't see the sorting part. Thanks.