Project on the discipline of Neural Networks and Deep Learning at the course of Master degree in Mathematical Modelling at EMAp FGV. In this work, I reproduce the work in the article A Neural Algorithm of Artistic Style, by Leon A. Gays, Alexander S. Ecker, and Matthis Bethge. This article uses a convolutional neural network to represent the content and the style of an image. Then, with the optimization of new layers, can transfer the content to be represented in a new style. Some tests are made on how to adapt the style transfer for videos. It was made use of Pytorch for the implementation. There is a web page explaining the implementation. You can make a few changes to the code to run the style transfer on your own images.
The files of the project are separated in the following folders:
-
docs/
: documentation of the project, files for the web-age. -
notebooks/
: two Jupyter Notebooks with the implementation of the algorithm and some tests on videos. -
scripts/
: file for the implementation as a Python script.
The implementation made use of the language Python and Jupyter Notebooks avaiable at Anaconda. The necessary libraries are:
- torch
- urllib
- PIL
- pickle
- matplotlib
- tqdm
- cv2
- All the work was made in Jupyter Notebooks, so to run my examples, just run all cells.
- To run a example with one image of yours, on the Notebook
neural_style_transfer.ipynb
, in the last cells, just change the path of the content and the style images for you desired.
- A Neural Algorithm of Artistic Style, by Leon A. Gays, Alexander S. Ecker and Matthis Bethge.