piyush01123 / Neural-Style-Transfer

This repository contains the server-side code for my app that does Neural Style Transfer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

neural-style

This repository contains the server-side code for my app that does Neural Style Transfer using deep CNNs, as mentioned in the paper A Neural Algorithm of Artistic Style by Gatys et al., 2015. Android app repository of the project is here.

Deep learning framework used: Tensorflow

CNN architecture used: VGG19, Simonyan and Zisserman, 2015. The weights can be obtained from here.

How it works:

The entire repository has to be hosted on a server so that it continuously keeps listening for API requests being made. I hosted it using a free-tier AWS EC2 instance. python neural_style_upload.py when called from crontab/manually starts listening on the host URL where the code has been uploaded (which is 0.0.0.0:80 for the host but server's URL for everyone else). Upon passing URL of an image through an API call from a client, this code then saves the image as image_from_url.jpg on the server and calls functions from neural_style_wrapper.py and nst_utls2.py to generate an image and save it. Then, neural_style_upload.py uploads the generated image in an AWS S3 bucket (I have made my bucket and its contents public so that it can be accessed from code. To do this, AWS requires you to update the license.lic) and returns a JSON containing the URL of the image in the bucket to the client.

Credits:

This implementation of the algorithm draws inspiration from a Programming assignment in the CNN course of Coursera's Deep Learning Specialization.

About

This repository contains the server-side code for my app that does Neural Style Transfer.


Languages

Language:Python 100.0%