使用Yolov5训练好模型调用电脑自带摄像头时出现问题:TypeError: argument of type “int‘ is not iterable的解决方法

我们在使用Yolov5训练好模型后,为了检测模型效果,调用电脑自带摄像头时,出现了问题:TypeError: argument of type "int’ is not iterable
在这里插入图片描述

解决方法:将utils–>datasets.py文件中第280行代码修改一下,见下:
在这里插入图片描述

修改好后再运行就可以正常调用电脑端的摄像头了。
在这里插入图片描述

以上就是使用Yolov5训练好模型调用电脑自带摄像头时出现问题:TypeError: argument of type "int’ is not iterable的解决方法,希望能帮助到你,多多支持,谢谢!

猜你喜欢

转载自blog.csdn.net/qq_40280673/article/details/125181731