Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muhammedbuyukkinaci/neural-style-transfer-with-tensorflow
Implementation of Neural Style Transfer algorithm with pre-trained VGG-16 Network & TensorFlow in Python 3.
https://github.com/muhammedbuyukkinaci/neural-style-transfer-with-tensorflow
artistic-style-transfer neural-style-transfer neural-style-transfer-tensorflow tensorflow vgg-16
Last synced: 3 months ago
JSON representation
Implementation of Neural Style Transfer algorithm with pre-trained VGG-16 Network & TensorFlow in Python 3.
- Host: GitHub
- URL: https://github.com/muhammedbuyukkinaci/neural-style-transfer-with-tensorflow
- Owner: MuhammedBuyukkinaci
- Created: 2018-06-08T22:03:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-21T21:28:18.000Z (about 2 years ago)
- Last Synced: 2024-10-08T18:21:38.520Z (3 months ago)
- Topics: artistic-style-transfer, neural-style-transfer, neural-style-transfer-tensorflow, tensorflow, vgg-16
- Language: Python
- Homepage:
- Size: 14.5 MB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: changed_content.jpg
Awesome Lists containing this project
README
# Neural Style Transfer with TensorFlow
Implementation of Neural Style Transfer algorithm with pretrained VGG-16 Network & TensorFlow in Python 3.# Dependencies
```pip install -r requirements.txt```
or
```pip3 install -r requirements.txt```
# Pre-trained VGG-16 Network ( Warning : 491 MB)
Download VGG-16 named as ```imagenet-vgg-verydeep-16``` from [here](http://www.vlfeat.org/matconvnet/pretrained/#imagenet-ilsvrc-classification). Put it in _Neural-Style-Transfer-with-TensorFlow_ folder.
![alt text](https://github.com/MuhammedBuyukkinaci/Neural-Style-Transfer-with-TensorFlow/blob/master/pictures/vgg16_where.png)
# Cloning and Training
```
git clone https://github.com/MuhammedBuyukkinaci/Neural-Style-Transfer-with-TensorFlow.gitcd ./Neural-Style-Transfer-with-TensorFlow
python neural_style_transfer.py
```To train with your parameters, run a command alike below command: (Details in Arguments for Terminal section)
```python neural_style_transfer.py -c_i changed_content.jpg -s_i changed_style.jpg -c_w 25 -s_w 25 -n_i 1000 ```
# Arguments for Terminal
- c_i: Name of Content image. It must be string. Example: changed_content.jpg, default_content.jpg , content_image.png .- s_i: Name of Style image. It must be string. Example: changed_style.jpg , default_style.jpg , style_image.png .
- c_w: Weight of Content image in loss function. It must be integer. Example: 5 , 20 , 50 .
- s_w: Weight of Style image in loss function. It must be integer. Example: 10 , 20 , 40 .
- s_w: How many iterations to train. It must be integer. Example: 500 , 1000 , 2000 .
# NotebookDownload .ipynb file from [here](https://github.com/MuhammedBuyukkinaci/My-Jupyter-Files/blob/master/neural_style_transfer.ipynb) and run:
```jupyter lab ``` or ```jupyter notebook ```
# Outputs
Content Image | Style Image | Generated Image After 2000 iterations |GIF during 2000 iterations
:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:
| | |Content Image | Style Image | Generated Image After 2000 iterations |GIF during 2000 iterations
:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:
| | |Content Image | Style Image | Generated Image After 2000 iterations |GIF during 2000 iterations
:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:
| | |Content Image | Style Image | Generated Image After 2000 iterations |GIF during 2000 iterations
:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:
| | |The last content image belongs to one of my friends, [Umut Başdemir](https://www.linkedin.com/in/umutbasdemir/). He is a Business Development Specialist at Samsung.
# References
- https://www.coursera.org/specializations/deep-learning
- https://www.youtube.com/watch?v=Re2C9INXCNc&index=38&list=PLBAGcD3siRDjBU8sKRk0zX9pMz9qeVxud
- https://gist.github.com/prajjwal1/8bc39c430c8a0303c1430b02207b09f4
- https://github.com/harsha1601/StyleTransfer/blob/master/cnn-st.ipynb
- https://github.com/nestor94/apptist/blob/master/model/style_transfer_model.py.ipynb