-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Change in motion of object and 1 missed det led to change in tracking ID. #1497
Comments
+1 |
I would say it is probably more of a Kalman Filter configuration issue. What is your FPS on the camera? |
it is 15 FPS, Is there any way I can test if it is Kalman Filter issue or not? |
You could try to scale the process noise covariance. In DeepCOSORT these lines would look like this: self.kf.Q[4:6, 4:6] *= self.Q_xy_scaling
self.kf.Q[-1, -1] *= self.Q_s_scaling This is because the predictions can be too strict and stiff for your specific use-case, especially if it is a dynamic environment where the bounding box sizes and positions change a lot. |
Ok so if I understood you correctly, Kalman filter has 2 noise factors, Q and R, where Q represents uncertainty in model prediction. I tried to make changes but Can you help me understand How should these be defined? for testing, I tried different values fro scaling from 0.01 to 0.05, 0.5 to even 1.0. All resulted in the same output Thanks a lot for the help. |
Yup, this is not implemented so you would need to find your way. To start with, you could just define them as class variables and play around with them |
If you want to know more check out this: |
Thanks for the reference, 1 Question, isn't Kalman filter covarience working the same for both DeepOCSort and BOTSort? |
What helped me debug the behavior of the KF is to also return the KF bbox predictions from the update method and then also plot them on the video output, this way you would see what the Kalman Filter is doing during those phases of missed detections and if this is the issue :) |
您好!您的邮件已收到,谢谢。
|
This sounds like a good idea, I tried different covariance values, but unfortunately, that didn't help fix the problem. Let me try plotting bbox and see if that helps. Will get back here in sometime, if anyone has already done something similar to debug these tracking issues, please tag in this issue, it'll be great to have useful resources. Thanks for the help. :) |
Yup, this is a good recommendation |
Thanks a lot for the suggestion, I tried what you asked and plotted Here are the problems I noticed with KF: Issue In this blue box is of Here as we can see, Simlarly
Note in the above image id: 2 was the original track id. Later after 2,3 missed dets we got a new detection which is of same person but got assigned a different id. At this point KF of old det is way off the original path but still has some degree of overlap. Is there anything we can do in tracking algo to fix issues like these in an environment where movement is mostly unpredictable?? Using identity matrix and changing scale factor for PS: A good article to understand KF better: The Kalman Filter: An algorithm for making sense of fused sensor insight |
Multiple predictions ahead could help here |
Hey, I'm sorry, I didn't get you. Do you mean a better detector? |
Not sure what value you set boxmot/boxmot/trackers/deepocsort/deep_ocsort.py Lines 163 to 165 in dccde97
|
Oh ok,
I had set it to |
That is right. It keeps it, but it is lost, although still making predictions for it... And lives as lost for 60 frames before removed |
The easiest solution for you IMO, would be to do a hyperparameter search. There are MANY parameters in these trackers and it is usually not trivial to figure out what is going wrong. |
Ya, I was thinking of using RayTune. Do you have any better suggestions based on your experience for this? Also, do you recommend training of ReID model? I was honestly hoping ReID to recognize that this is the same object as shown in image 1 but somehow it didn't. |
You have an |
do you think we can use something like BPReid to make the tracking more robust? |
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs. |
Search before asking
Question
Hey @mikel-brostrom Thanks for the great repo an help so far.
I have a curious case related to
association(if I am not wrong)
I have been thinking about how to solve it, and any advice from an expert would be appreciated.Brief of issue:
I have a human walking in 1 direction to load some goods on a truck and the ID is being properly tracked to 0.
Later he instantly chose to
go in the opposite direction
, and as he does that, the detector misses detection for 1 frame and 1 frame only. As soon as I get the new bbox (which is different in size and in different direction) the tracker assigns it a different id of 1.Now what I cannot fathom is how just 1 missed det led to a change in id. I checked the boxes, and IOU is > 0.3 and human hasn't moved too far, only in the opposite dir. The size of bbox changes due to the angle so I figured crop could have different features that ReId failed to associate.
But I suspect it could be kalman filter but I tried setting w_association_emb=0.99 to put more weight on ReID in hope that ReID will surely work but that did not help either. Different REID models also not helping. [
Clip to osnet x1
]I have tried playing with
inertia, max-age
, and other params with different values but the problem persists.How could we have solved this problem if we were to? it will be a common thing
that object changes its motion and in btw missed 1 or 2 dets, new det should still be assigned the same id
but here in this case it is not.I created a reference image to make it easier to understand:
Thank you.
The text was updated successfully, but these errors were encountered: