height, weight = img.shape
AttributeError: 'NoneType' object has no attribute 'shape'
而且:cv2.imshow('input',img_input)
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\highgui\src\window.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
求指导
img.shape 这个元组的元素应该是3 或者4吧,你只有两个变量接收 肯定会报错,而且你要判断这个img.shape是不是有值的先,二元组才能你这样写
你的 img 变量是一个NoneType。没读取到图片吧,检查下 img 变量的赋值有没有问题