TexasInstruments / edgeai-yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite. Forked from https://ultralytics.com/yolov5
https://github.com/TexasInstruments/edgeai
GNU General Public License v3.0
649 stars 120 forks source link

detect.py #67

Open Flashan opened 2 years ago

Flashan commented 2 years ago

Traceback (most recent call last): File "D:/RunPrograms/edgeai-yolov5-pose/detect.py", line 219, in detect(opt=opt) File "D:/RunPrograms/edgeai-yolov5-pose/detect.py", line 111, in detect scale_coords(img.shape[2:], det[:, 6:], im0.shape, kpt_label=kpt_label, step=3) File "D:\RunPrograms\edgeai-yolov5-pose\utils\general.py", line 385, in scale_coords coords[:, [0, 2]] -= pad[0] # x padding IndexError: index is out of bounds for dimension with size 0

MukundSeethamraju commented 2 years ago

having same issue. also, can you add export file to the repository?

sinae-noh commented 2 years ago

same issue.. help me

lhz-1 commented 2 years ago

Traceback (most recent call last): File "D:/RunPrograms/edgeai-yolov5-pose/detect.py", line 219, in detect(opt=opt) File "D:/RunPrograms/edgeai-yolov5-pose/detect.py", line 111, in detect scale_coords(img.shape[2:], det[:, 6:], im0.shape, kpt_label=kpt_label, step=3) File "D:\RunPrograms\edgeai-yolov5-pose\utils\general.py", line 385, in scale_coords coords[:, [0, 2]] -= pad[0] # x padding IndexError: index is out of bounds for dimension with size 0

I thought this might help you ‘parser.add_argument('--kpt-label', default=True,action='store_true', help='use keypoint labels')’

lhz-1 commented 2 years ago

for det_index, (*xyxy, conf, cls) in enumerate(reversed(det[:,:6])):

The value of 109 rows “reversed(det[:,:6])” makes the index different from the “det”resulting in 119 rows“kpts”and“xyxy” not being the same data

gaodaren47297 commented 1 week ago

you need to open this argument '--kpt-label'set it as True