├── .gitignore ├── Images ├── Tuebingen_Neckarfront.jpg └── vangogh_starry_night.jpg ├── LICENSE ├── NeuralStyleTransfer.ipynb ├── README.md └── download_models.sh /.gitignore: -------------------------------------------------------------------------------- 1 | Models/* 2 | .ipynb_checkpoints/ 3 | -------------------------------------------------------------------------------- /Images/Tuebingen_Neckarfront.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leongatys/PytorchNeuralStyleTransfer/be6c8e2b35568669a5a0ac10b66c912207ad355d/Images/Tuebingen_Neckarfront.jpg -------------------------------------------------------------------------------- /Images/vangogh_starry_night.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leongatys/PytorchNeuralStyleTransfer/be6c8e2b35568669a5a0ac10b66c912207ad355d/Images/vangogh_starry_night.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Leon Gatys 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PytorchNeuralStyleTransfer 2 | 3 | Code to run Neural Style Transfer from our paper [Image Style Transfer Using Convolutional Neural Networks](http://www.cv-foundation.org/openaccess/content_cvpr_2016/html/Gatys_Image_Style_Transfer_CVPR_2016_paper.html). 4 | 5 | Also includes coarse-to-fine high-resolution from our paper [Controlling Perceptual Factors in Neural Style Transfer](https://arxiv.org/abs/1611.07865). 6 | 7 | To run the code you need to get the pytorch VGG19-Model from [Simonyan and Zisserman, 2014](https://arxiv.org/abs/1409.1556) by running: 8 | 9 | `sh download_models.sh` 10 | 11 | Everything else is in the IPythonNotebook `NeuralStyleTransfer.ipynb` 12 | 13 | Have fun :-) 14 | -------------------------------------------------------------------------------- /download_models.sh: -------------------------------------------------------------------------------- 1 | mkdir Models && cd Models 2 | wget -c --no-check-certificate https://bethgelab.org/media/uploads/pytorch_models/vgg_conv.pth 3 | cd .. 4 | --------------------------------------------------------------------------------