Qidian213 / deep_sort_yolov3

Real-time Multi-person tracker using YOLO v3 and deep_sort with tensorflow
GNU General Public License v3.0
1.66k stars 591 forks source link

How would you change tracking from people to cars? #7

Closed cesarandreslopez closed 6 years ago

cesarandreslopez commented 6 years ago

First of all great job! This was most useful.

Any pointers on how to change this tracker from people to cars?

anshu1106 commented 6 years ago

Change the part in the yolo detector code where we filter 'person' from detected boxes. In yolo.py

for i, c in reversed(list(enumerate(out_classes))): predicted_class = self.class_names[c] if predicted_class != 'person' : continue box = out_boxes[i] Change 'person' to 'car'.

cesarandreslopez commented 6 years ago

Excellent! Missed that, thank you for the pointer! @anshu1106

Qidian213 commented 6 years ago

Maybe not , the deep_sort model was just trained for person

cesarandreslopez commented 6 years ago

I can confirm that it tracks cars, birds and trucks too and performs well.

Qidian213 commented 6 years ago

Maybe deep_sort more like a feature coding and similarity comparator , no matter what object it is .

Megaclick commented 6 years ago

hi!, there's a way to track multiple objects?, like cars and trucks at the same time?

Qidian213 commented 6 years ago

you can have a try . they all belong to "car" , just like @anshu1106 say to have a try .

zooezou commented 6 years ago

Thanks a lot ,btw it can be easily used to track cars. It's favoured if the relevant paper can be provide : )

Goldwh commented 6 years ago

I want to track other things, not people, cars, birds, etc. However, the tracking effect is not good. How should I train again?

Qidian213 commented 6 years ago

@Goldwh You can reference to https://github.com/nwojke/deep_sort

sherlockchou86 commented 6 years ago

yolo is used for detection, which can detect 80 classes with coco dataset. deep_sort can only calculate person appearance features with default model. even though you detect multi targets such as cars, truck, bird etc with yolo, the deep_sort tracking performace would not be well.

you need train your own model for tracking.

lifeofzi commented 6 years ago

hi!, there's a way to track multiple objects?, like cars and trucks at the same time?

yes.

Change the part in the yolo detector code where we filter 'person' from detected boxes. In yolo.py

for i, c in reversed(list(enumerate(out_classes))): predicted_class = self.class_names[c] if predicted_class != 'car' and predicted_class!='truck' : continue box = out_boxes[i] Change 'person' to 'car'.

irisqp commented 5 years ago

hi! I ran demp.py. than this error occur VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV can anyone help me figure out some way to overcome this error?

vaibhawvipul commented 5 years ago

yolo is used for detection, which can detect 80 classes with coco dataset. deep_sort can only calculate person appearance features with default model. even though you detect multi targets such as cars, truck, bird etc with yolo, the deep_sort tracking performace would not be well.

you need train your own model for tracking.

I agree. DeepSort is trained for Person Re-Identification. I wanted to track people and cars together, I observed a lot of ID switches for vehicles. so, If you want to use the same model to track multiple objects then it would need to be trained again.