问题遇到的现象和发生背景
运行YOLOX的demo.py时,能预测图片,但是进行视频预测时发生IndexError: tuple index out of range,视频能预测前面的几十帧,但是到中间就会报错,换了几个视频有的直接输出空视频,有的只能预测几帧就报错了。系统是win11。
用代码块功能插入代码,请勿粘贴截图
Traceback (most recent call last):
File "F:/YOLOV-master/tools/demo.py", line 317, in <module>
main(exp, args)
File "F:/YOLOV-master/tools/demo.py", line 310, in main
imageflow_demo(predictor, vis_folder, current_time, args)
File "F:/YOLOV-master/tools/demo.py", line 231, in imageflow_demo
result_frame = predictor.visual(outputs[0], img_info, predictor.confthre)
File "F:/YOLOV-master/tools/demo.py", line 183, in visual
vis_res = vis(img, bboxes, scores, cls, cls_conf, self.cls_names,t_size=1)
File "F:\YOLOV-master\yolox\utils\visualize.py", line 25, in vis
text = '{}:{:.1f}%'.format(class_names[cls_id], score * 100)
IndexError: tuple index out of range
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果
想要完整预测一个视频,大佬们求求帮忙进行解答一下