fast-style-transfer icon indicating copy to clipboard operation
fast-style-transfer copied to clipboard

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

Open ghost opened this issue 4 years ago • 8 comments

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.

ghost avatar Oct 15 '20 16:10 ghost

this is where I am stuck now

akhrrbk avatar Oct 25 '20 04:10 akhrrbk

did you fix it?

akhrrbk avatar Oct 25 '20 05:10 akhrrbk

did you fix it?

No...

jongh222 avatar Oct 25 '20 12:10 jongh222

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

vincentlorant avatar Nov 23 '20 12:11 vincentlorant

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

Not a test. train.

jongh222 avatar Nov 27 '20 11:11 jongh222

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!

alexandrutitirig avatar Mar 10 '21 21:03 alexandrutitirig

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!

monikrish2698 avatar Mar 31 '21 04:03 monikrish2698

Try to delete the data folder and run setup.sh

enzomasson25 avatar Apr 19 '21 12:04 enzomasson25