Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can not inference with my model ! #33

Open
AmirAzz opened this issue Feb 22, 2023 · 2 comments
Open

I can not inference with my model ! #33

AmirAzz opened this issue Feb 22, 2023 · 2 comments

Comments

@AmirAzz
Copy link

AmirAzz commented Feb 22, 2023

Thanks for this video , I tried to use this code :

!python clip_object_tracker.py --source /content/zero-shot-object-tracking/data/video/Turkey.mp4 --url https://detect.roboflow.com/video-track/2 --api_key *********** --info

but this issue appears:

video 1/1 (23/1351) /content/zero-shot-object-tracking/data/video/Turkey.mp4:
[Detections]
[Tracks] 2
Traceback (most recent call last):
File "clip_object_tracker.py", line 370, in
detect()
File "clip_object_tracker.py", line 269, in detect
update_tracks(tracker, frame_count, save_txt, txt_path, save_img, view_img, im0, gn)
File "clip_object_tracker.py", line 46, in update_tracks
class_name = names[int(class_num)] if opt.detection_engine == "yolov5" or "yolov7" else class_num
ValueError: invalid literal for int() with base 10: 'damage

@kjohnabbott
Copy link

I am also having the same issue with a Roboflow model I'm using. Here is my traceback that is similar:

video 1/1 (3/1122) /content/Copy of 20210812_SharkOutsideLineUP.mp4:
[Detections]
[Tracks] 12
Traceback (most recent call last):
File "/content/zero-shot-object-tracking/clip_object_tracker.py", line 370, in
detect()
File "/content/zero-shot-object-tracking/clip_object_tracker.py", line 269, in detect
update_tracks(tracker, frame_count, save_txt, txt_path, save_img, view_img, im0, gn)
File "/content/zero-shot-object-tracking/clip_object_tracker.py", line 46, in update_tracks
class_name = names[int(class_num)] if opt.detection_engine == "yolov5" or "yolov7" else class_num
ValueError: invalid literal for int() with base 10: 'shark'

it appears I'm getting this error only at the 3rd frame of the video, though.

@roytravel
Copy link

roytravel commented Aug 27, 2023

It will work well if you change the code as below @AmirAzz , @kjohnabbott

if opt.detection_engine == "yolov5" or opt.detection_engine == "yolov7":
        class_name = names[int(class_num)]
else:
        class_name = class_num

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants