Introduction GitHub:TensorFlow CNN for fast style transfer instructs how to use Tensorflow, and shows example of picture style change below.
Before
After applied wave.ckpt
Setup of Google Colaboratory Environment First, we need to mount on Google Drive, and upload files you want to use.
Setup Libraries Since some files are programed by its previous version, you need to uninstall new one, and install previous version so that these files can run.
!pip uninstall scipy # Uninstalling scipy-1.4.1:
!pip install scipy==1.1.0
!pip uninstall tensorflow # Uninstalling tensorflow-2.2.0rc3:
!pip install tensorflow==1.1.0
Execution command According to GitHub page, it's shown how to execute these files below.
!python evaluate.py --checkpoint ./wave.ckpt \ # The style file you want to use.
--in-path ./stata.jpg \ # The original picture you want to transform.
--out-path ./out.jpg # name of output file
After execution this command, "out.jpg " is generated below.
Result of Another Sample
References LINK -> GitHub:TensorFlow CNN for fast style transfer -> Python Cheet Sheet (pour C ++ expérimenté) -> Transfert de style neuronal: explication de la technologie d'arrière-plan de Prisma -> Introduction à Numpy, une bibliothèque de calcul numérique en Python -> Python Basic - Pandas, Numpy
Recommended Posts