LeonLok / Deep-SORT-YOLOv4

People detection and optional tracking with Tensorflow backend.
GNU General Public License v3.0
498 stars 170 forks source link

Question about the deep sort model #22

Open luvwinnie opened 4 years ago

luvwinnie commented 4 years ago

The README of your code, it shows thatby changing the detection for person and car, I want to ask that is it need to retrain the deepsort model for tracking both person and car? or it just work on both classes?

PhanVinhLong commented 4 years ago

Same question

Papageno2 commented 4 years ago

it works for both classes, but the deep-model was trained only for person tracking. as the author said:

Please note that the tracking model used here is only trained on tracking people, so you'd need to train a model yourself for tracking other objects.

See https://github.com/nwojke/cosine_metric_learning.
luvwinnie commented 4 years ago

@Papageno2 thank you for answering my question, but what I really want to ask is that, should I retrain the deep-model everytime if I have a new class have been added to my detector? Does anyone tried to trained with others classes? Or even it necessary to do so?

LeonLok commented 4 years ago

@luvwinnie The tracking model used here has been trained to track people. It'll still work if you use this model to track other classes but the tracking performance could suffer depending on what you're trying to track.

For example, it's possible to use this tracking model to track both people and cars but the tracking performance for cars would likely suffer.

For optimal performance, I would suggest retraining the tracking model for your classes with cosine metric learning. I have an example of that in my vehicle tracking app here.

luvwinnie commented 4 years ago

@LeonLok Thank you for replying, just one more thing from your experience, how many data is enough for every new classes?

LeonLok commented 4 years ago

@luvwinnie That depends on a lot of different factors. You can read more here: https://github.com/nwojke/cosine_metric_learning.