Closed hareesh00 closed 5 years ago
@hareesh00 in 304th line, change cls_id = int(box[6]). After version upgrading, array index may be stricted.
但是修改之后又出现了这个问题:
Traceback (most recent call last):
File "detect.py", line 113, in
@sdustdk1427 Ok, you change the 271th codes as : sx, sy = int(pos[0]), int(pos[1]-th-2) I'll update the code.
Hi,
I tried to detect the bounding boxes with pretrained weights. But I am facing the error. Pytorch version in my system : 0.4.1.post2
Error Mesage : Can you please suggest the fix. Loading weights from yolov3.weights... Done! data/dog.jpg: Predicted in 1.102185 seconds. 3 box(es) is(are) found Traceback (most recent call last): File "detect.py", line 113, in
detect(cfgfile, weightfile, imgfile)
File "detect.py", line 39, in detect
plot_boxes(img, boxes, 'predictions.jpg', class_names)
File "/home/hareeshkumawat/GitHub/adv/A3/utils.py", line 305, in plot_boxes
print('%s: %f' % (class_names[cls_id], cls_conf))
TypeError: list indices must be integers or slices, not float