IO错误python PIL图像预处理脚本

时间:2018-04-03 14:39:17

标签: python python-imaging-library ioerror imdb

我正在学习本教程,并特别介绍“生成自己的数据”部分:

https://github.com/surfertas/deep_learning/tree/master/projects/imdbwiki-challenge

https://github.com/surfertas/deep_learning/blob/master/projects/imdbwiki-challenge/imdb_preprocess.py 我正面临运行imdb_preprocess.py脚本的问题;

    Dictionary created...
Converting 1000 samples. (0=all samples)
Traceback (most recent call last):
  File "imdb_preprocess.py", line 137, in <module>
    main()
  File "imdb_preprocess.py", line 131, in main
    create_and_dump(imdb_dict, args.partial)
  File "imdb_preprocess.py", line 106, in create_and_dump
    for img_path in imgs
  File "/usr/lib64/python2.7/site-packages/scipy/misc/pilutil.py", line 156, in imread
    im = Image.open(name)
  File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 2477, in open
    fp = builtins.open(filename, "rb")
IOError: [Errno 2] No such file or directory: u'/path/48/10000548_1925-04-04_1964.jpg'

现在我手动检查文件夹48并检查图像是否在抱怨确实存在。

有关故障位置的任何提示?

路径已被替换

0 个答案:

没有答案