All Projects → lyttonhao → Neural-Style-MMD

lyttonhao / Neural-Style-MMD

Licence: other
MXNet Code For Demystifying Neural Style Transfer (IJCAI 2017)

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Neural-Style-MMD

Fast Style Transfer
TensorFlow CNN for fast style transfer ⚡🖥🎨🖼
Stars: ✭ 10,240 (+12387.8%)
Mutual labels:  neural-style
Machine-Learning-in-Python-Workshop
My workshop on machine learning using python language to implement different algorithms
Stars: ✭ 89 (+8.54%)
Mutual labels:  batch-normalization
Keras-Style-Transfer
An implementation of "A Neural Algorithm of Artistic Style" in Keras
Stars: ✭ 36 (-56.1%)
Mutual labels:  neural-style
Neural Style Audio Torch
Torch implementation for audio neural style.
Stars: ✭ 130 (+58.54%)
Mutual labels:  neural-style
Online Neural Doodle
Feedforward neural doodle
Stars: ✭ 183 (+123.17%)
Mutual labels:  neural-style
Neural-Tile
A better tiling script for Neural-Style
Stars: ✭ 35 (-57.32%)
Mutual labels:  neural-style
Neural Art
Recreate photos in the style of famous artists with neural networks
Stars: ✭ 81 (-1.22%)
Mutual labels:  neural-style
caffe-mt
This is a fork of caffe added some useful layers, the original caffe site is https://github.com/BVLC/caffe.
Stars: ✭ 33 (-59.76%)
Mutual labels:  batch-normalization
Tensorflow Fast Style Transfer
A simple, concise tensorflow implementation of fast style transfer
Stars: ✭ 224 (+173.17%)
Mutual labels:  neural-style
tensorflow-mnist-MLP-batch normalization-weight initializers
MNIST classification using Multi-Layer Perceptron (MLP) with 2 hidden layers. Some weight-initializers and batch-normalization are implemented.
Stars: ✭ 49 (-40.24%)
Mutual labels:  batch-normalization
Neural Tools
Tools made for usage alongside artistic style transfer projects
Stars: ✭ 150 (+82.93%)
Mutual labels:  neural-style
Faststyle
Tensorflow implementation of fast neural style transfer.
Stars: ✭ 170 (+107.32%)
Mutual labels:  neural-style
MeuralPaint
TensorFlow implementation of CNN fast neural style transfer ⚡️ 🎨 🌌
Stars: ✭ 19 (-76.83%)
Mutual labels:  neural-style
Style Transfer
A Keras Implementation of "A Neural Algorithm of Artistic Style"
Stars: ✭ 115 (+40.24%)
Mutual labels:  neural-style
cs20si
My solutions to Stanford's CS20si: Tensorflow for Deep Learning Research.
Stars: ✭ 15 (-81.71%)
Mutual labels:  neural-style
Neural Style Docker
A dockerized version of neural style transfer algorithms
Stars: ✭ 100 (+21.95%)
Mutual labels:  neural-style
batchnorm prune
Tensorflow codes for "Rethinking the Smaller-Norm-Less-Informative Assumption in Channel Pruning of Convolution Layers"
Stars: ✭ 30 (-63.41%)
Mutual labels:  batch-normalization
Training-BatchNorm-and-Only-BatchNorm
Experiments with the ideas presented in https://arxiv.org/abs/2003.00152 by Frankle et al.
Stars: ✭ 23 (-71.95%)
Mutual labels:  batch-normalization
LoL-Match-Prediction
Win probability predictions for League of Legends matches using neural networks
Stars: ✭ 34 (-58.54%)
Mutual labels:  batch-normalization
MMD-GAN
Improving MMD-GAN training with repulsive loss function
Stars: ✭ 82 (+0%)
Mutual labels:  maximum-mean-discrepancy

Neural-Style-MMD

This repository holds the MXNet code for the paper

Demystifying Neural Style Transfer, Yanghao Li, Naiyan Wang, Jiaying Liu, and Xiaodi Hou, International Joint Conference on Artificial Intelligence (IJCAI), 2017

[Arxiv Preprint]

Introduction

Neural-Style-MMD presents a neural style transfer algorithm based on a new interpretation. Instead of using Gram matrix in original neural style transfer methods, this repo provides two methods to implement style transfer, including a Maximum Mean Discrepancy (MMD) loss and a Batch Normalization (BN) statistic loss. The paper also demonstrates the original matching Gram matrix is equivalent to the a specific polynomial MMD. Details could be found in the paper. Our implementation is based on the neural-style example of MXNet.

Prerequisites

Before running this code, you should make the following preparations:

  • Install MXNet following the instructions and install the python interface. This repo is tested on commmit 01cde1.

  • Download the pre-trained VGG-19 model in the model folder:

wget https://github.com/dmlc/web-data/raw/master/mxnet/neural-style/model/vgg19.params

Usage

Basic Usage:

python neural-style.py --mmd-kernel linear --gpu 0 --style-weight 5.0 --content-image input/brad_pitt.jpg --style-image input/starry_night.jpg --output brad_pitt-starry_night --output-folder output_images

We support 4 single transfer methods, including 3 mmd kernels, including linear, poly and Gaussian, and a BN Statistics Matching method. At the same time, the code supports fusing different transfer methods with specific weights.

Options

  • --mmd-kernel: Specify MMD kernel (linear, poly, Gaussian), also their combination, e.g. linear,poly.
  • --bn-loss: Whether to use the BN method.
  • --multi-weights: The weights when fusing different transfer methods, e.g. 0.5,0.5.
  • --style-weight: How much to weight the style loss term. It is equivalent to the balance factor gamma in the paper when we fix the content-weight as 1.0.

You can run python neural-style.py with -h to see more options.

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].