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

Add multi-object tracker #3042

Open
AlexeyAB opened this issue Apr 25, 2019 · 20 comments
Open

Add multi-object tracker #3042

AlexeyAB opened this issue Apr 25, 2019 · 20 comments
Labels
ToDo RoadMap want enhancement Want to improve accuracy, speed or functionality

Comments

@AlexeyAB
Copy link
Owner

AlexeyAB commented Apr 25, 2019

Add multi-object tracker (dynamic array of single object trackers):


Accuracy:

  1. Robustness (number of times a is reinitialized)
  2. Accuracy (average overlap while tracking)
  3. Combination of basic measures (EAO) - the VOT primary measure is the Expected Average Overlap (EAO) – a principled combination of accuracy and robustness.

Page 16: https://prints.vicos.si/publications/files/365

image

@AlexeyAB AlexeyAB added the want enhancement Want to improve accuracy, speed or functionality label Apr 25, 2019
@AlexeyAB AlexeyAB added the ToDo RoadMap label Apr 26, 2019
@buzdarbalooch
Copy link

thanks for sharing @AlexeyAB . How can we use this, with yolo detection. secodly, how different is it to already exisiting (OPTFLOW AND KALMAN FILTERING)

@tdurand
Copy link

tdurand commented May 8, 2019

It's really great you are working on baking this into your YOLO fork, I had good results using a very simple one: https://github.com/bochinski/iou-tracker , paper: http://elvera.nue.tu-berlin.de/files/1547Bochinski2018.pdf

I implemented a flaky node.js version: https://github.com/tdurand/node-moving-things-tracker

@frunika
Copy link

frunika commented Jul 14, 2019

It's really great you are working on baking this into your YOLO fork, I had good results using a very simple one: https://github.com/bochinski/iou-tracker , paper: http://elvera.nue.tu-berlin.de/files/1547Bochinski2018.pdf

I implemented a flaky node.js version: https://github.com/tdurand/node-moving-things-tracker

Had good experience too. Overall, it's ultra-fast!

@Nuzhny007
Copy link

Hi!
I and Smorodov working with multi-object tracker: https://github.com/Smorodov/Multitarget-tracker
We use your fork as one of detector. And if you do not mind, then I could transfer part of the code to this project.

@AlexeyAB
Copy link
Owner Author

@Nuzhny007 Hi,

What is the most accurate multi-object tracker you could find and used?

@Nuzhny007
Copy link

I'm working only with C++ code with real time systems. And Hungarian algorithm or version with bipartite graph is not bad. And also i'm used more simple algorithms but they are not robust.

A good online algorithm is "FollowMe: Efficient Min-cost Flow Tracking with Bounded Memory and Computation": http://www.cvlibs.net/projects/online_tracking/
But it only on Python. It's implementation on C++ in my plans.

The good are "Lifted Multicut" (https://github.com/jutanke/cabbage) and LBM (Smorodov/Multitarget-tracker#125) but they are too slow.

And also in plans SORT with YOLO: https://github.com/humoncy/YOLOv3-SORT-ReID

@AlexeyAB
Copy link
Owner Author

@Nuzhny007

Yes, it seems that SORT is very fast and enough accurate algorithm.

I'm working only with C++ code with real time systems. And Hungarian algorithm or version with bipartite graph is not bad.

  • What is the different between your Hungarian algorithm and common SORT-algorithm (cv::KalmanFilter + Hungarian algorithm) ?

  • Did you try to combine: cv::cuda::SparsePyrLKOpticalFlow + cv::KalmanFilter + Hungarian algorithm ?

  • Did you try cv::TrackerCSRT() (CSRDCF++) from OpenCV-contirb?

@Nuzhny007
Copy link

  1. Our Hungarian + Kalman == SORT. This method was used by many people long before the article on the SORT (2016) appeared.
  2. No. I tryed LK optical flow earler but remove it. The visual object trackers (like KCF) works better.
  3. Yes. It can use any visual object tracker for objects that on current frame was absent.

For example ( https://github.com/Smorodov/Multitarget-tracker/blob/master/example/examples.h#L177 ):

  TrackerSettings settings;
  settings.SetDistance(tracking::DistJaccard);
  settings.m_kalmanType = tracking::KalmanUnscented;
  settings.m_filterGoal = tracking::FilterRect;
  settings.m_lostTrackType = tracking::TrackCSRT;
  settings.m_matchType = tracking::MatchHungrian;

Here we use SORT: DistJaccard + Kalman + Hungarian. And we use CSRT tracker (TrackCSRT) for frames when object was undetected.
SORT
On image trajectory parts with circles means that here was used visual object tracker (KCF, CSRT, STAPLE or...)

@AlexeyAB
Copy link
Owner Author

@Nuzhny007

So circles means, that the SSD-detector can't detect object there, and was used object tracker (KCF, CSRT, STAPLE or...).

Is it this video? https://www.youtube.com/watch?v=Qssz6tVGoOc
It seems that

  • timing 0:05 - it loses an object (person) in the middle of the road, and re-identifies it
  • timing 0:11 - it loses an object (child) for 1-2 seconds

Why SORT (Kalman + Hungarian) and CSRT can't solve this taks, even if these objects are clearly visible and almost do not overlap?

@Nuzhny007
Copy link

Here was used not CSRT and classical KCF from OpenCV - it more faster but not so robust as CSRT. And KCF not robust for dynamic object like people, it tracks static background.

@AlexeyAB
Copy link
Owner Author

@Nuzhny007

Hi!
I and Smorodov working with multi-object tracker: https://github.com/Smorodov/Multitarget-tracker
We use your fork as one of detector. And if you do not mind, then I could transfer part of the code to this project.

Yes, you can transfer tracking part to this project by using Pull Requests

I think there can be added some #ifdef to check if we OpenCV is compiled with OpenCV-contrib (KCF, CSRT, STAPLE or...).

or can be added #define in https://github.com/AlexeyAB/darknet/blob/master/Makefile#L9 for example, TRACK_OBJECTS=1 to compile with Tracking functions. We should set this flag TRACK_OBJECTS=1 if we compiled OpenCV with OpenCV-contrib.

@Nuzhny007
Copy link

Ok, I'l do it

@sctrueew
Copy link

sctrueew commented Nov 3, 2019

@Nuzhny007 Hi,

Thanks for your work. I have merged this repo with your repo. I'm going to use for traffic sign detection and my camera is front of the car. Sometimes the signs are not recognized in some frames. I want to know, what is the best TrackerSettings for my case?
Is TrackCSRT better than TrackKCF for my case?

Thanks

@LukeAI
Copy link

LukeAI commented Nov 4, 2019

@AlexeyAB What is the status of multi-object tracking in this repo? Was @Nuzhny007 tracker ever integrated?

@AlexeyAB
Copy link
Owner Author

AlexeyAB commented Nov 4, 2019

@LukeAI Not started yet.

@Nuzhny007
Copy link

We have one problem: Multitarget-tracker has GPL license and I can't use it code in darknet. Smorodov (the owner of the Multitarget-tracker) starded a new project TrackerGenerator for generate tracker's code with new license.

@Nuzhny007
Copy link

@zpmmehrdad CSRT tracker is better.

@GeekAlexis
Copy link

If anyone is interested, I implemented an optimized (real-time) tracker based on Deep SORT that uses Darknet's YOLO models converted to TensorRT: https://github.com/GeekAlexis/FastMOT

@AlexeyAB
Copy link
Owner Author

@GeekAlexis Great, thanks!

@GeekAlexis
Copy link

@AlexeyAB

Thanks for your interest. I will support swish CSP weights.

I have not tried to use SiamRPN++. Because my implementation uses KLT (optical flow) with DeepSORT, a possibility is to replace KLT with SiamRPN++. It should improve accuracy but a single object tracker probably doesn't scale well with the number of objects in a real-time MOT system.

FairMOT is a faster extension of Deep SORT because it combines detection and ReID embedding in one network. I have plans to support it if I can convert its YOLOv5 backbone version to TensorRT. The author's implementation is not as optimized and its tracking framework is not as robust to camera motion and occlusion compared to mine.

Also, combining FairMOT with a scaled-YOLOv4 backbone would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ToDo RoadMap want enhancement Want to improve accuracy, speed or functionality
Projects
None yet
Development

No branches or pull requests

8 participants