2017年7月31日 星期一

Fast Style Transfer in TensorFlow

Ref: https://github.com/lengstrom/fast-style-transfer

Windows 10 x64 @ ASUS X450J
1. Install tensorflow (ref: https://www.tensorflow.org/install/install_windows)
1-1 c:\conda create -n tensorflow python=3.5
1-2 activate tensorflow
1-3 pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.2.1-cp35-cp35m-win_amd64.whl

--- nstall the CPU-only version of TensorFlow

2. python evaluate.py --checkpoint udnie.ckpt --in-path INimgs --out-path OUTimgs
2-1 error no module for scipy
2-1-1 download scipy-0.19.1-cp35-cp35m-win_amd64.whl (http://www.lfd.uci.edu/~gohlke/pythonlibs/)
2-1-2 pip install scipy-0.19.1-cp35-cp35m-win_amd64.whl

2-2 ImportError: cannot import name 'NUMPY_MKL'
2-2-1 download numpy-1.13.1+mkl-cp35-cp35m-win_amd64.whl
2-2-2 pip install numpy-1.13.1+mkl-cp35-cp35m-win_amd64.whl

2-3 AttributeError: module 'scipy.misc' has no attribute 'imread'
2-3-1 download Pillow-4.2.1-cp35-cp35m-win_amd64.whl
2-3-2 pip install Pillow-4.2.1-cp35-cp35m-win_amd64.whl

2-4  'Resize images or use --allow-different-dimensions.'

3. Download udnie.ckpt (https://drive.google.com/drive/folders/0B9jhaT37ydSyRk9UX0wwX3BpMzQ)

4. python evaluate.py --checkpoint udnie.ckpt --in-path INimgs --out-path OUTimgs --allow-different-dimensions




5. Results

6. python transform_video.py --in-path INimgs/joy.mp4 --checkpoint udnie.ckpt --out-path OUTimgs/joy.mp4

fail due to lack of ffmpeg

6.1 Install ffmpeg

6.2 OK. 


沒有留言:

張貼留言