You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming the moving object(s) you want to track are inside of Coco dataset , then all you have to do is go to main.py, search for this line:
if object_classes[i] != 0: # 0 is for person class (COCO)
and change 0 to the corresponding class or classes that you want to track.
For example, assuming you want to track cars you would modify to: if object_classes[i] != 3: # 3 is for car class (COCO)
or if you want to track cars and motorcycles you would modify to this: if object_classes[i] not in [3, 4]: # 3 is for car, 4 is for motorcycle class (COCO)
In case you want to track objects outside Coco, then I would suggest training your own YOLO v8 model on your custom dataset, then just load your own weights:
model = torch.load('your_weights.pt', map_location='cuda')['model'].float()
Thank you!
The text was updated successfully, but these errors were encountered: