can‘t open/read file: check file path/integrity

报错·:[ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_(‘I:\datasets\WildDeepfake
wd_train_0.1\wd.fake139211.png’): can’t open/read file: check file path/integrity
Traceback (most recent call last):
File “kmeans.py”, line 10, in
images = [cv2.resize(cv2.imread(file), (32, 32)) for file in glob.glob(glob_dir)] #224, 224
File “kmeans.py”, line 10, in
images = [cv2.resize(cv2.imread(file), (32, 32)) for file in glob.glob(glob_dir)] #224, 224
cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in fun
ction ‘cv::resize’
修正:文件夹损坏了,重新复制一份,注意:ubuntu与win之间进行文件转换最好先压缩一下,否则文件夹容易损坏

猜你喜欢

转载自blog.csdn.net/qq_43663979/article/details/127660176