roboflow / zero-shot-object-tracking

Object tracking implemented with the Roboflow Inference API, DeepSort, and OpenAI CLIP.
https://blog.roboflow.com/zero-shot-object-tracking/
GNU General Public License v3.0
362 stars 64 forks source link

Issues with webcam #29

Open Dimlight opened 1 year ago

Dimlight commented 1 year ago

Hello all,

I tried to run this code with webcam. I have used the following command:

python clip_object_tracker.py --weights ./weights/best.pt --source 0 --detection-engine yolov7 --info

But it have thrown me the following error:

"TypeError: expected str, bytes or os.PathLike object, not list"

Anyone can help? thanks in advance.

mo-traor3-ai commented 1 year ago

Can you try it with single-quotes around 0 and let me know if it still errors? You'll find in line 326 of clip_object_tracker.py that its expecting a string value. It later checks if its a webcam source in the detect function (line 119 of clip_object_tracker.py)

Example: python clip_object_tracker.py --weights ./weights/best.pt --source '0' --detection-engine yolov7 --info

mo-traor3-ai commented 1 year ago

https://github.com/roboflow-ai/zero-shot-object-tracking/blob/master/clip_object_tracker.py