mikel-brostrom / boxmot

BoxMOT: pluggable SOTA tracking modules for segmentation, object detection and pose estimation models
GNU Affero General Public License v3.0
6.58k stars 1.7k forks source link

how to choose specific class to detect and deepsort #160

Closed besbesmany closed 3 years ago

besbesmany commented 3 years ago

I want to choose one or 2 classes from yolov5s.pt file to deepsort and track how to make this?

sonyta29 commented 3 years ago

There is two solutions for that: Either you can train yolov5 on your custom dataset that contains the two classes that you want to detect and track Or you can simply work with the yolov5 trained on the coco dataset and performs with class filtering like it is mentioned in the README file

besbesmany commented 3 years ago

how to do the second method , I didn't understand how to do class filtering?

sonyta29 commented 3 years ago

@besbesmany when you'll run the track.py just add -- classes (number or reference of the class) eg : --classes 0 ( which refers to the person class, so your tracker will track only persons present in the video and ignore all the other objects )

yolov5 is trained on the coco dataset, you'll find here the 80 classes of coco 0 person 1 bicycle 3 car 4 motorbike aeroplane bus train truck boat traffic light fire hydrant stop sign parking meter bench bird cat dog horse sheep cow elephant bear zebra giraffe backpack umbrella handbag tie suitcase frisbee skis snowboard sports ball kite baseball bat baseball glove skateboard surfboard tennis racket bottle wine glass cup fork knife spoon bowl banana apple sandwich orange broccoli carrot hot dog pizza donut cake chair sofa potted plant bed dining table toilet tvmonitor laptop mouse remote keyboard cell phone microwave oven toaster sink refrigerator book clock vase scissors 78 teddy bear 79 hair drier 80 toothbrush

besbesmany commented 3 years ago

thank you so much