Image translation on a webpage using a server-client architecture on a GENI slice.
To reproduce:
- Create a slice on GENI using the 'rspec' file and ssh into the server.
sudo apt install git-all
- Clone repo.
sudo mv sites-available/* /etc/apache2/sites-available/.
sudo mv www/* /var/www/.
- Download checkpoints to folder "/var/www/checkpoints" from here: https://drive.google.com/drive/folders/0B9jhaT37ydSyRk9UX0wwX3BpMzQ
sudo apt-get update
sudo apt-get install apache2
sudo service apache2 restart
sudo apt-get install python3.6
sudo apt install python3-pip
pip3 install virtualenv
cd /var/www
python3 -m venv myVM3.6
source myVM3.6/bin/activate
sudo chmod _R 777 myVM3.6
pip3 install tensorflow, scipi, moviepy, imageio, ffmpeg, cgi-tools
sudo chmod -R 777 style-image
sudo chmod -R 777 out_images
The server is online and ready to go.
You can also use the setup.sh script.
To use:
- Navigate to http://192.12.245.162/hello.py on your web browser.
- Click on 'Choose File'
- Select a .png or .jpg image from your computer.
- Click on 'Upload'
The system will randomly select one of our style images. It will then present your original input, the style image used as well as the resulting stylized image which contains your original content with the style of the style image.
Enjoy!