non-iterable Image object报错

报错信息:

TypeError: cannot unpack non-iterable JpegImageFile object

TypeError: cannot unpack non-iterable Image object

提示报错的位置:

images,zuobiao = yolo.detect_image(image)

返回的内容有两个,如果返回的参数不是2个,就会报错。

修改方法:

return image,zuobiao

只需要将所有的关于这个函数定义的返回值设置为return image,zuobiao即可。

成功加载

猜你喜欢

转载自blog.csdn.net/qq_34904125/article/details/124211413