YunYang1994 / TensorFlow2.0-Examples

🙄 Difficult algorithm, Simple code.
MIT License
1.71k stars 676 forks source link

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

Open yingluojiuchan opened 4 years ago

yingluojiuchan commented 4 years ago

出现 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'

angwangiot commented 4 years ago

出现了同样的错误

angwangiot commented 4 years ago

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

liyuxuan89 commented 4 years ago

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.

ShirleyHe2020 commented 4 years ago

我又用了自己的训练集测试可以了,不用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