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
357 stars 62 forks source link

Run with yolov5 got this error #17

Closed zxq309 closed 2 years ago

zxq309 commented 2 years ago

video 1/1 (1/215) /home/zx/zero-shot-object-tracking/data/video/fish.mp4: yolov5 inference Done. (0.010s) video 1/1 (2/215) /home/zx/zero-shot-object-tracking/data/video/fish.mp4: yolov5 inference

[Detections] 1 forks, Traceback (most recent call last): File "clip_object_tracker.py", line 360, in detect() File "clip_object_tracker.py", line 249, in detect class_nums = np.array([d.class_num for d in detections]) File "/home/zx/anaconda3/envs/roboflow/lib/python3.8/site-packages/torch/_tensor.py", line 678, in array return self.numpy() TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.