Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError Occurs When max_age is Set Above 60 #1480

Closed
1 task done
YoungjaeDev opened this issue Jun 13, 2024 · 1 comment
Closed
1 task done

IndexError Occurs When max_age is Set Above 60 #1480

YoungjaeDev opened this issue Jun 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@YoungjaeDev
Copy link
Contributor

YoungjaeDev commented Jun 13, 2024

Search before asking

  • I have searched the Yolo Tracking issues and discussions and found no similar questions.

Yolo Tracking Component

Tracking, Evolution

Bug

hello,

I had a similar issue a while back

I have no problem when I set the max_age parameter to 30, but when I go beyond 60, either by performing the evolve function or by modifying the tracker yaml directly, I get the following error:

  File "/home/aicads/workspace/yolo_tracking/tracking/generate_mot_results.py", line 168, in run_generate_mot_results
    generate_mot_results(opt)
  File "/home/aicads/workspace/yolo_tracking/tracking/generate_mot_results.py", line 78, in generate_mot_results
    tracks = tracker.update(dets, im, embs)
  File "/home/aicads/workspace/yolo_tracking/boxmot/utils/__init__.py", line 81, in wrapper
    tracks = self.update(instance, dets, im)
  File "/home/aicads/workspace/yolo_tracking/boxmot/trackers/deepocsort/deep_ocsort.py", line 485, in update
    self.active_tracks[trk_ind].update(dets[det_ind, :])
  File "/home/aicads/workspace/yolo_tracking/boxmot/trackers/deepocsort/deep_ocsort.py", line 235, in update
    self.kf.update(self.bbox_to_z_func(bbox), R=R)
  File "/home/aicads/workspace/yolo_tracking/boxmot/motion/kalman_filters/deepocsort_kf.py", line 528, in update
    self.unfreeze()
  File "/home/aicads/workspace/yolo_tracking/boxmot/motion/kalman_filters/deepocsort_kf.py", line 442, in unfreeze
    index1 = indices[-2]
IndexError: index -2 is out of bounds for axis 0 with size 

My suspicion is that the problem is caused by the insufficient length of the indices array required by the Kalman filter's update process. Specifically, setting the max_age value above 60 seems to cause the error because the indices array is not long enough.

I also believe that the problem is likely caused by the fact that variables like history are limited to a length of 50, and this limit seems to be affecting the ability to retain enough historical state information as max_age increases.

I would appreciate it if you could look into this issue.

Thank you.

Environment

boxmot 10.0.72

Minimal Reproducible Example

Trial 16 failed with parameters: {'conf': 0.4266284948010711, 'det_thresh': 0, 'max_age': 60, 'min_hits': 4, 'iou_thresh': 0.24388418277590976, 'delta_t': 5, 'asso_func': 'giou', 'inertia': 0.18741675196890667, 'w_association_emb': 0.5060212238689145, 'alpha_fixed_emb': 0.9259561635650133, 'aw_param': 0.5662470182020077, 'embedding_off': True, 'cmc_off': False, 'aw_off': True, 'new_kf_off': False} because of the following error: IndexError('index -2 is out of bounds for axis 0 with size 1').
@YoungjaeDev YoungjaeDev added the bug Something isn't working label Jun 13, 2024
@mikel-brostrom
Copy link
Owner

mikel-brostrom commented Jun 13, 2024

I just implemented dynamic deques based on max_age here:

#1481

Should be fixed in the new release 10.0.73. Let me know if it works for you now 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants