-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Clip out of image detections
Mike edited this page Jun 15, 2025
·
2 revisions
I added this when generating MOT results:
# clamp boxes to image boundaries (x1, y1, x2, y2)
if dets.size:
dets[:, 0] = np.clip(dets[:, 0], 0, w - 1)
dets[:, 2] = np.clip(dets[:, 2], 0, w - 1)
dets[:, 1] = np.clip(dets[:, 1], 0, h - 1)
dets[:, 3] = np.clip(dets[:, 3], 0, h - 1)
The performance went from
{"HOTA": 69.25, "AssA": 73.859, "AssRe": 77.49, "MOTA": 75.908, "IDSW": 159, "IDF1": 83.199, "IDs": 443}
to
{"HOTA": 64.851, "AssA": 70.912, "AssRe": 75.43, "MOTA": 65.181, "IDSW": 145, "IDF1": 77.379, "IDs": 444}