-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scipy imread has been deprecated since v1.0.0. #29
Comments
Thanks for pointing that out. I unfortunately don't have the time to update the repo right now, but at some point in the next few months I'd like to migrate it to TF 2.0 and will hopefully also clean up other bits like this along the way. |
The only TF2 implementation I found didn't work so well, so I tried to make this one work, using Anaconda and python v3.8, a custom environment to install all these old package versions. The right combination is tensorflow 1.2.1 with keras 2.0.0... and the changes below. You can easily replace scipy.misc.imread and scipy.misc.imresize in the code (mainly sytlize.py and utils.py, I didn't try the camera thing). Here are the BEFORE and AFTER functions for deprecated scipy.misc.imread:
You'll also have problems with the deprecated image resize function from scipy.misc !
Made me search a little as I don't program in python, you'll have a lot of deprecation warnings when using the scripts, but it works :) The only thing that didn't work with the image resize function is when you're trying to use the --ss-stride command-line option. Must be something like a conversion between integers and floats that I don't understand... |
It might be worth considering to mantain/update the code for removed dependecies
I've got this error trying to use stylize.py on windows.
Restoring vars for relu5_1 from checkpoint models/relu5_1\model.ckpt-15004
W0702 06:19:34.308990 4512 deprecation.py:323] From C:\Program Files\Python37\lib\site-packages\tensorflow\python\training\saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
Traceback (most recent call last):
File "stylize.py", line 126, in
main()
File "stylize.py", line 74, in main
content_img = get_img(content_fullpath)
File "C:\Users\JLNR\Documents\WCT-TF-master\utils.py", line 24, in get_img
img = scipy.misc.imread(src, mode='RGB')
AttributeError: module 'scipy.misc' has no attribute 'imread'
I'm going to try using an earlier version of scipy
The text was updated successfully, but these errors were encountered: