nkolkin13 / STROTSS

Style Transfer by Relaxed Optimal Transport and Self-Similarity (CVPR 2019)
308 stars 39 forks source link

Could not find a format to read the specified file in mode 'i' #7

Open Dearbreeze opened 5 years ago

Dearbreeze commented 5 years ago

Hi Nick!

When l try to run your code I getting this error and l can't solve,so l'm sorry to disturb you.

Traceback (most recent call last): File "styleTransfer.py", line 99, in regions = [[imread(content_path)[:,:,0]0.+1.], :,:,0[:,:,0]0.+1.]] File "/home/lyx/anaconda3/lib/python3.6/site-packages/imageio/core/functions.py", line 221, in imread reader = read(uri, format, "i", **kwargs) File "/home/lyx/anaconda3/lib/python3.6/site-packages/imageio/core/functions.py", line 139, in get_reader "Could not find a format to read the specified file " "in mode %r" % mode ValueError: Could not find a format to read the specified file in mode 'i'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "styleTransfer.py", line 101, in regions = [[imread(content_path)[:,:]0.+1.], [imread(style_path)[:,:]0.+1.]] File "/home/lyx/anaconda3/lib/python3.6/site-packages/imageio/core/functions.py", line 221, in imread reader = read(uri, format, "i", **kwargs) File "/home/lyx/anaconda3/lib/python3.6/site-packages/imageio/core/functions.py", line 139, in get_reader "Could not find a format to read the specified file " "in mode %r" % mode ValueError: Could not find a format to read the specified file in mode 'i'

My content data set from Coco2014,style data set come from WikiArt. l try Unconstrained Style Transfer,input PATH_TO_CONTENT ,PATH_TO_STYLE and CONTENT_WEIGHT. Looking forward to your reply. Thanks in advance!

nkolkin13 commented 5 years ago

Hi Yunxin, Thanks for trying out the code! I've never encountered that error before. Does the path to the style image or content image have spaces in it? this thread https://github.com/Zulko/moviepy/issues/219 says that that can cause an error like the one you're seeing with imageio. Best, Nick