Open lionopen64 opened 2 years ago
Hey, try giving --img-size parameter. It solved the error for me.
I used yolov7.pt and my own model to detect, but there is an error like this:
Traceback (most recent call last): File "D:\yolov7\yolov7\detect.py", line 199, in detect() File "D:\yolov7\yolov7\detect.py", line 37, in detect model = attempt_load(weights, map_location=device) # load FP32 model File "D:\yolov7\yolov7\models\experimental.py", line 251, in attempt_load attempt_download(w) File "D:\yolov7\yolov7\utils\google_utils.py", line 31, in attempt_download tag = subprocess.check_output('git tag', shell=True).decode().split()[-1] IndexError: list index out of range
![image](https://user-images.githubusercontent.com/102736687/221760533-764fb46f-2a51-4a33-a191-6446c136fb 运行uolov5 detect文件时,报错。索引超出范围
I tried to train a custom object detection model, it has only one class object but when I tried to use detect.py to extract predictions after I change a new .names file, I still have a Index error like that.
s += '%g %ss, ' % (n, names[int(c)]) # add to string IndexError: list index out of range When I used a higher confidence threshold(0.1) it doesn't happen but it happens at low confidence thresholds(0.03).