yolov3_deepsort icon indicating copy to clipboard operation
yolov3_deepsort copied to clipboard

How to Detect just 1 class?

Open its-charan-here opened this issue 4 years ago • 4 comments

I wanted to implement object tracker specifically for one class i.e 'Person'. Is there a way to restrict the number of classes to be detected? so that no extra computational power is used on detecting redundant objects in the input video. What changes should be made in object_detector.py file or detection.py file so that this is possible?

its-charan-here avatar May 17 '20 17:05 its-charan-here

afaik I don't think there will be any reduction of computation power if you use the same weights! maybe you can retrain for only person. but still, in my opinion, it will not reduce the computational cost!

aafaqin avatar May 21 '20 18:05 aafaqin

@aafaqin okay! but instead of retraining can I just get the coordinates of objects of single class?

its-charan-here avatar May 22 '20 10:05 its-charan-here

@its-charan-here Yeah you can do that, first train YoloV3 on person dataset, you may use Google Open Image Dataset or you may use COCO. Then keep the config and weights file then when using deepsort, modify coco.names file and keep only person here. Deep Sort is trained using person re-id dataset and it should work well on person. I want to implement this on custom objects like chair and all but I can't seem to get it, but for person it will work.

satyambharti171 avatar Jul 10 '20 20:07 satyambharti171

And yeah change the object tracker according to your class, change number of classes argument to 1, it should be 80 by default and you will be good to go.

satyambharti171 avatar Jul 10 '20 20:07 satyambharti171