mikel-brostrom / boxmot

BoxMOT: pluggable SOTA tracking modules for segmentation, object detection and pose estimation models
GNU Affero General Public License v3.0
6.75k stars 1.72k forks source link

Why changing tracking-method also affects the number of detections? #1641

Closed davide-bontempelli-zupit closed 1 month ago

davide-bontempelli-zupit commented 2 months ago

Search before asking

Question

I ran boxmot keeping the same yolo model and only changing tracking method and on the video shown i got a lot less detections.

These are the two command that i used

python tracking/track.py --source "5042_5047.mp4" \ 
  --yolo-model yolov8x-pose.pt \
  --reid-model osnet_x1_0_msmt17.pt \
  --tracking-method botsort \
  --conf 0.1 \
  --iou 0.7 \
  --device 0 \
  --show \       
  --classes 0 \
  --name test \
  --exist-ok \ 
  --show-labels \      
  --show-conf \
  --show-trajectories \
  --save-txt \
  --line-width 3 \
  --verbose
  python tracking/track.py --source "5042_5047.mp4" \ 
  --yolo-model yolov8x-pose.pt \
  --reid-model osnet_x1_0_msmt17.pt \
  --tracking-method botsort \
  --conf 0.1 \
  --iou 0.7 \
  --device 0 \
  --show \     
  --classes 0 \
  --name test \
  --exist-ok \ 
  --show-labels \      
  --show-conf \
  --show-trajectories \
  --save-txt \
  --line-width 3 \
  --verbose
mikel-brostrom commented 1 month ago

The tracking modules themselves are doing some filtering on the detections in order to figure out wether they are good candidates to be accepted as valid tracks or not. Hence, affecting the number of outputs 😄. For example this line of code is relevant in BoTSORT:

https://github.com/mikel-brostrom/boxmot/blob/b349b6731ead2e22ec5bd791a31b74b40e338f80/boxmot/trackers/botsort/bot_sort.py#L278