All Projects → leongatys → Neuralimagesynthesis

leongatys / Neuralimagesynthesis

Code to reproduce the results from the paper "Controlling Perceptual Factors in Neural Style Transfer" (https://arxiv.org/abs/1611.07865).

Projects that are alternatives of or similar to Neuralimagesynthesis

Machine Learning For Algorithmic Trading Bots With Python
Stars: ✭ 165 (+0%)
Mutual labels:  jupyter-notebook
Deformable Convnets Caffe
Deformable Convolutional Networks on caffe
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Geospatial data with python
Introduction to Geospatial Data with Python
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Marcap
market cap datasets (1995~2021 daily, 10 million+ rows)
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Mixture model trading public
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Kagglezerotoall
Kaggle problem solving
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Marketanalysis
Portfolio Theory, Options Theory, & Quant Finance
Stars: ✭ 164 (-0.61%)
Mutual labels:  jupyter-notebook
Hunter
A threat hunting / data analysis environment based on Python, Pandas, PySpark and Jupyter Notebook.
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Capsnet Traffic Sign Classifier
A Tensorflow implementation of CapsNet(Capsules Net) apply on german traffic sign dataset
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Pytorch Practice
Some example scripts on pytorch
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Cifar 10.1
Release of CIFAR-10.1, a new test set for CIFAR-10.
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Fgsegnet
FgSegNet: Foreground Segmentation Network, Foreground Segmentation Using Convolutional Neural Networks for Multiscale Feature Encoding
Stars: ✭ 165 (+0%)
Mutual labels:  jupyter-notebook
Fasnet
CNN archictecture for face anti-spoofing
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Aulas
Aulas da Escola de Inteligência Artificial de São Paulo
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Azure Cosmosdb Spark
Apache Spark Connector for Azure Cosmos DB
Stars: ✭ 165 (+0%)
Mutual labels:  jupyter-notebook
Qbstyles
QuantumBlack Matplotlib styles
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
F1sherkk Myroadtoai
Repository for storing and tracking my self-study progress.
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Miniradiotelescope
Arduino and python code for a mini-radio telescope.
Stars: ✭ 165 (+0%)
Mutual labels:  jupyter-notebook
Recommendersystems pydata 2016
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook
Tsa Notebooks
Jupyter notebooks on time series econometrics topics.
Stars: ✭ 166 (+0.61%)
Mutual labels:  jupyter-notebook

NeuralImageSynthesis

Code to reproduce the results from the paper "Controlling Perceptual Factors in Neural Style Transfer" (https://arxiv.org/abs/1611.07865). The Jupyter Notebooks in the folder "ExampleNotebooks" give examples for all methods introduced in the paper. To get started, have a look at the BasicStyleTransfer.ipynb Notebook, which implements the standard Neural Style Transfer from Image Style Transfer Using Convolutional Neural Networks (CVPR 2016).

To run the Notebooks you will need to download the pretrained VGG models:

sh Models/download_models.sh

The code to reproduce the control results for Fast Neural Style Transfer (Fig. 6) can be found at https://github.com/leongatys/fast-neural-style

#Prerequisites The most practical way to run the code is to use our jupyter-torch docker container. To get the container, use:

docker pull bethgelab/jupyter-torch:cuda8.0-cudnn5

To run the container, first get our docker toolchain:

git pull https://github.com/bethgelab/docker
cd docker

Then from the docker folder run the following command, passing the arguments

  1. GPU: comma separated list of the GPUs you want to access from the container
  2. VOLUME: directory to be mounted in the container
  3. XXXX: port at which the Jupyter Notebook is exposed on the Host
  4. GROUPS: the groups the user in the docker container should be member of
  5. USER: the user in the docker container
  6. USER_ID: the user id in the docker container
  7. CONTAINER_NAME: the name of the docker container
NV_GPU=GPU nvidia-docker run -v VOLUME:VOLUME -p XXXX:8888 -e USER_GROUPS=GROUPS -e USER=USER -e USER_ID=USER_ID -e USER_HOME=HOME -e GPU=GPU -d --name=CONTAINER_NAME bethgelab/jupyter-torch:cuda8.0-cudnn5

This should run the docker container. You can check if the container is running using

docker ps

Now, if you are on the Host, you can just open a browser and you should be able to access the Notebooks at localhost:XXXX

If you are remotely connecting to the Host, you can make an ssh tunnel, e.g. :

ssh -f -N -L XXXX:localhost:XXXX Host

Now you can open a browser on your local machine and access the Notebooks at localhost:XXXX.

#Disclaimer This software is published for academic and non-commercial use only.

This is research code, so you might find the documentation sometimes a bit wanting. Conceptually, what I wanted is to use Torch to evaluate any CNN activations and for the fast L-BFGS optimisation. At the same time, I wanted to work mainly in python using Jupyter Notebooks. That is why everything is done from the Notebooks and whenever there is need to compute CNN activations or run the optimisation, the inputs to the respective Torch script are saved as hdf5 files and they are called from the notebook. The Torch script then stores the results again in hdf5 files and they are pulled them back into the python notebook. This might seem a little inefficient, but I found it to be a good flexibility vs. efficiency trade-off.

Finally, all this code was substantially inspired by the great implementation of our original Neural Style Transfer paper by Justin Johnson, which you can find at https://github.com/jcjohnson/neural-style.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].