yehengchen / Object-Detection-and-Tracking

Object Detection and Multi-Object Tracking
MIT License
1.85k stars 753 forks source link

tracking with 'car' and 'person'(2 classes) at same time #12

Open zhangming8 opened 5 years ago

zhangming8 commented 5 years ago

Hi, thanks for your great project. In your project "YOLOv3 + Deep_SORT", I find that your first git demo can track the 'car' and 'person' at same time(the first video here). I really want to know how to do that, and would you mind show me this code?

yehengchen commented 5 years ago

You just change this line.

https://github.com/yehengchen/Object-Detection-and-Tracking/blob/7993e32f9c8dacc395d4c2859ec5c197879278fc/OneStage/yolo/deep_sort_yolov3/yolo.py#L127

VanniZhou commented 5 years ago

您只需更改此行。

https://github.com/yehengchen/Object-Detection-and-Tracking/blob/7993e32f9c8dacc395d4c2859ec5c197879278fc/OneStage/yolo/deep_sort_yolov3/yolo.py#L127

怎么做才可以将人和车的class_name同时显示在屏幕上呢? main.py中 if len(class_names) > 0:
class_name = class_names[0] cv2.putText(frame, str(class_names[0]),(int(bbox[0]), int(bbox[1] -20)),0, 5e-3 * 150, (color),2) 将class_name[0]改成class_name[i]或者class_name[j]都有问题