lengstrom / fast-style-transfer

TensorFlow CNN for fast style transfer ⚡🖥🎨🖼
10.91k stars 2.6k forks source link

ValueError: Could not find a format to read the specified file in single-image mode #256

Open jongh222 opened 3 years ago

jongh222 commented 3 years ago

Traceback (most recent call last): File "style.py", line 167, in main() File "style.py", line 117, in main style_target = get_img(options.style) File "src\utils.py", line 18, in get_img img = imageio.imread(src, pilmode='RGB') # misc.imresize(, (256, 256, 3)) File "C:\Users\Churi\anaconda3\envs\tf-gpu\lib\site-packages\imageio\core\functions.py", line 265, in imread reader = read(uri, format, "i", **kwargs) File "C:\Users\Churi\anaconda3\envs\tf-gpu\lib\site-packages\imageio\core\functions.py", line 182, in get_reader "Could not find a format to read the specified file in %s mode" % modename ValueError: Could not find a format to read the specified file in single-image mode

It's not a computer problem. This is because both computers get that error.

akhrrbk commented 3 years ago

this is where I am stuck now

akhrrbk commented 3 years ago

did you fix it?

jongh222 commented 3 years ago

did you fix it?

No...

vincentlorant commented 3 years ago

if you did specify one, is the path you set for the --test arg correct?

jongh222 commented 3 years ago

if you did specify one, is the path you set for the --test arg correct?

Not a test. train.

alexandrutitirig commented 3 years ago

Hi guys,

I have the same problem/error.

2021-03-10 22:55:17.907951: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll Traceback (most recent call last): File "style.py", line 167, in main() File "style.py", line 117, in main style_target = get_img(options.style) File "src\utils.py", line 18, in get_img img = imageio.imread(src, pilmode='RGB') # misc.imresize(, (256, 256, 3)) File "C:\Users\Dorian\Anaconda3\envs\tf-gpu\lib\site-packages\imageio\core\functions.py", line 265, in imread reader = read(uri, format, "i", **kwargs) File "C:\Users\Dorian\Anaconda3\envs\tf-gpu\lib\site-packages\imageio\core\functions.py", line 182, in get_reader "Could not find a format to read the specified file in %s mode" % modename ValueError: Could not find a format to read the specified file in single-image mode

Did anyone get the solution? Thank you!

monikrish2698 commented 3 years ago

Guys I had the same issue. The issue is with the image that we are using. Download the image with jpg format. Don't download an image in web format with jpg extension. It worked for me!

enzomasson25 commented 3 years ago

Try to delete the data folder and run setup.sh