NVIDIA-AI-IOT / deepstream_tao_apps

Sample apps to demonstrate how to deploy models trained with TAO on DeepStream
MIT License
360 stars 96 forks source link

Possible bug in BBox util struct #91

Open clogwog opened 3 months ago

clogwog commented 3 months ago

Doesn't float center_y() { return right + height() / 2; } look wrong ?

I'd expect it to be something like: float center_y() { return top + height() / 2; }

typedef struct {
    float left;
    float top;
    float right;
    float bottom;

    float width() { return right - left; }
    float height() { return bottom - top; }
    float center_x() { return left + width() / 2; }
    float center_y() { return right + height() / 2; }
}BBox;

From : https://github.com/NVIDIA-AI-IOT/deepstream_tao_apps/blob/4a8c6abce7b4e389d6802b634944e00b29d21e1e/apps/tao_others/deepstream-faciallandmark-app/ds_facialmark_meta.h#L53

clogwog commented 3 months ago

created PR https://github.com/NVIDIA-AI-IOT/deepstream_tao_apps/pull/92