ByteTrack-cpp icon indicating copy to clipboard operation
ByteTrack-cpp copied to clipboard

Unnecessary calculations which add then subtract same variable

Open swdee opened this issue 6 months ago • 0 comments

In the following code there are unnecessary calculations being performed as the same variable cancels itself out.

https://github.com/Vertical-Beach/ByteTrack-cpp/blob/d43805d461a714f65da039981bd5f5d21cf5cf59/src/Rect.cpp#L121

Instead it should be.

 const float ua = (tlwh[2] + 1) * (tlwh[3] + 1) + box_area - iw * ih; 

swdee avatar Aug 03 '24 09:08 swdee