monemati / YOLOv8-DeepSORT-Streamlit

YOLOv8 Object Tracking and Counting using PyTorch, OpenCV and DeepSORT, deployed on Streamlit.
GNU Affero General Public License v3.0
33 stars 11 forks source link

how to detect spesific class #3

Open Mirshal opened 1 month ago

Mirshal commented 1 month ago

can you help me in finding a way how the model only detects one object class, namely person. I am very grateful if you can provide instructions

monemati commented 1 month ago

@Mirshal Hello. You can modify this line. For example, to detect person and car you can do this: res = model.predict(image, conf=conf, classes=[0, 2]) For other classes you can check COCO dataset config file.

Mirshal commented 1 month ago

Is it possible if I add the SAHI feature for tracking detected objects and calculating the time?

monemati commented 1 month ago

@Mirshal Sorry, I've not worked with SAHI, maybe you can get some insights from here.