Neural-Style-Transfer-with-OpenCV
Neural-Style-Transfer-with-OpenCV copied to clipboard
Neural Net Style Transfer using OpenCV and pretrained torch models from the Perceptual Losses paper by Johnson et al.
Neural Style Transfer with OpenCV
This repo shows how to perform Neural Style Transfer using OpenCV.
This project uses the pretrained models by Justin Johnson
The code closely follows the pyimagesearch blog by Adrian Rosebrock that you can find here: https://www.pyimagesearch.com/2018/08/27/neural-style-transfer-with-opencv/
How to use?
- Clone the repository
git clone https://github.com/iArunava/Neural-Style-Transfer-with-OpenCV
- There are two modes to the project
- Image
- Video
For the image mode,
python3 init.py --image ./path/to/image.png
For the video mode
python3 init.py
- Press
n
to move to the next style - Press
p
to move to the previous style
- Use the help to get some involved usage arguments
python3 init.py --help
- Enjoy!
Results
Image
Image Credits: Photo by rawpixel on Unsplash
LICENSE
Feel free to fork and make changes to the code! Have fun!