TensorFlow2.0-Examples icon indicating copy to clipboard operation
TensorFlow2.0-Examples copied to clipboard

执行$ python yymnist/make_data.py --images_num 1000 --images_path ./data/dataset/train --labels_txt ./data/dataset/yymnist_ train.txt

Open yingluojiuchan opened this issue 4 years ago • 4 comments

出现 Traceback (most recent call last): File "yymnist/make_data.py", line 114, in data[0] = make_image(data, image_paths[idx], ratio) File "yymnist/make_data.py", line 62, in make_image image = cv2.resize(image, (int(28ratio), int(28ratio))) cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:4045: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

yingluojiuchan avatar Feb 17 '20 14:02 yingluojiuchan

出现了同样的错误

angwangiot avatar Feb 26 '20 03:02 angwangiot

我又用了自己的训练集测试可以了,不用yymnist。

angwangiot avatar Feb 27 '20 00:02 angwangiot

When reading a image with imread, if the path doesn't exist, it will return a None without raising an error. A None object can't be resized, thus having an assertion failure. You may want to check the path of your training data.

liyuxuan89 avatar Mar 16 '20 05:03 liyuxuan89

我又用了自己的训练集测试可以了,不用yymnist。

我用自己的训练集发现报错如下: Traceback (most recent call last): File "make_data.py", line 111, in data[0] = make_image(data, image_paths[idx], ratio) IndexError: list index out of range

ShirleyHe2020 avatar Jun 22 '20 14:06 ShirleyHe2020