deep_sort icon indicating copy to clipboard operation
deep_sort copied to clipboard

Too fast to ID switch

Open zhouzw87 opened this issue 6 years ago • 19 comments

Hi, I think deep_sort is a great job. If my detection-module not detected object in one frame, but next frame detected object, ID will change the new ID. The occlusion also is the same situation, one object was occluded in a frame, When it appear again, it's ID will change.

zhouzw87 avatar Oct 29 '18 03:10 zhouzw87

yes,I have the same problem as you. And I guess that it will work better if modifying some hyper parameters ,but firstly it is necessary to have a comprehensive understanding of this project. And I am dong so.

ninghongbo123 avatar Dec 12 '18 02:12 ninghongbo123

@zhouzw87 @ninghongbo123 any update about hyper parameter to reduce id Switching Thanks

Akhtar303nu avatar Dec 20 '18 11:12 Akhtar303nu

@ninghongbo123 hello!Do you know how to modify the parameters?

ss199302 avatar Jan 08 '19 01:01 ss199302

I had modified these parameter or operating logic : 1.threshold-replace 0.2 by 0.25 2.average the top five features of the track as final distance OR average the top 3rd to 5th features, i.e. remove the top 2 features 3.Every frame will carry out these steps that include tracker.predict() and tracker.update()
regardless of whether or not having a detection. 4.For matching cascade, trackers whose age<=5 are gathered together to associate at the same time @ss199302 @Akhtar303nu

ninghongbo123 avatar Jan 16 '19 07:01 ninghongbo123

@ninghongbo123 Thank you for your answer. How do you modify point 2 in your code?

ss199302 avatar Jan 16 '19 07:01 ss199302

In  nn_matching.py file,  modifying  corresponding code as  below:
      distances.sort(axis=0)    # sorted firstly
      return distances[2:5].mean(axis=0)  #average  2-5  features

@ss199302

ninghongbo123 avatar Jan 16 '19 09:01 ninghongbo123

@ninghongbo123 Thank you for your reply. I have made some modifications according to your code, but the effect is not very good. Is the weight model you use well trained by the authorities?

ss199302 avatar Jan 16 '19 11:01 ss199302

@ninghongbo123 Hello, I'd like to try the fourth point you mentioned. Is it to modify the max age? If not, how to modify it? Why is that? I don't understand. Thank you

ss199302 avatar Jan 18 '19 02:01 ss199302

Any modification you made depends on your application. You need to evaluate it after you have modified some parameters .
I think these two parameters are irrelevant . The max age is just your expectation that the tracker should be removed . And my fourth point aims to give trackers whose age<=5 equal possibility to obtain a detection. @ss199302

ninghongbo123 avatar Jan 18 '19 09:01 ninghongbo123

@ninghongbo123 How do you modify the code for the fourth point? Can you tell me? thank you very much

ss199302 avatar Jan 19 '19 03:01 ss199302

@ninghongbo123 Hi, After you modified the parameters, what data set did you test? What is the effect? And the mars-small128.pb provided by author is trained just through the Mars datasets?Thank you very much.

ciwei123 avatar Jan 19 '19 09:01 ciwei123

@ninghongbo123 how could I modify point 4 (age<=5 ) in the code.

Mps24-7uk avatar May 31 '19 13:05 Mps24-7uk

@ninghongbo123 how to modify the point 3 and 4 that you mentioned above?

Thank you in advance!

anzy0621 avatar Aug 19 '19 18:08 anzy0621

@ninghongbo123 thank you for your suggestion. I am working with vehicle counting project. My detector is not good, some frame it lost the detection and the ID of tracking is not switched. but it lost the tracking bbox after lost detection bbox. Do you have any solution to keep the tracking bbox after lost detection bbox, it will make bbox is smooth and the counting result will better. Thank you very much

hongsamvo avatar Aug 29 '19 08:08 hongsamvo

@hongsamvo
hello !
the performance of detector has a important impact on final result of tracking , so it's better to improve the capabilityof detector as soon as possible . I don't know what your specific application is , but as far as i know , vehicle is far more easier to be detected and be tracking than pedestrian . If it lost detection bbox , you should make sure that the information of lost objects can be preserved until next step . There are some methods to try it , including updating the result of KalmanFilting on the assumption that there is no any lost frames , or adopting a robust feature extracter and raise the weights of feature score , and so on .

ninghongbo123 avatar Sep 02 '19 02:09 ninghongbo123

@ninghongbo123 Thank you very much for your suggestion. I found a solution that similar with your advise that they assume that there is no lost frames and keep tracking bbox until the id is deleted(https://github.com/abewley/sort/issues/55). I am working counting vehicle. My method base on the intersection between a line and the line which connect the center bbox of the same id in the 2 consecutive frames (https://github.com/guillelopez/python-traffic-counter-with-yolo-and-sort). This solution helped me to improve the counting result. The performance of my detector is not really good and I am trying to improve it.

hongsamvo avatar Sep 07 '19 14:09 hongsamvo

@hongsamvo HI ban, ban da train lai duoc deepsort cho Vehicle chua a. ? minh cung dang lam project tuong tu nhung train lai cho vehicle bang cosine metric learning thi minh gap nhieu error qua.

phungthengoc avatar Sep 15 '20 03:09 phungthengoc

@phungthengoc Hi bạn, mình cũng dùng repo cosine metric learning để train, không rõ là bạn gặp error gì?

hongsamvo avatar Sep 15 '20 08:09 hongsamvo

I believe point number 4 can be modified by referring to this comment:

https://github.com/nwojke/deep_sort/issues/256#issuecomment-902463018

kurkurzz avatar Apr 29 '23 08:04 kurkurzz