All Projects → rahulbhalley → Cyclegan Qp

rahulbhalley / Cyclegan Qp

Licence: mit
Official PyTorch implementation of "Artist Style Transfer Via Quadratic Potential"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Cyclegan Qp

Deep Learning With Python
Deep learning codes and projects using Python
Stars: ✭ 195 (+230.51%)
Mutual labels:  convolutional-neural-networks, neural-networks, generative-adversarial-network, resnet
Iseebetter
iSeeBetter: Spatio-Temporal Video Super Resolution using Recurrent-Generative Back-Projection Networks | Python3 | PyTorch | GANs | CNNs | ResNets | RNNs | Published in Springer Journal of Computational Visual Media, September 2020, Tsinghua University Press
Stars: ✭ 202 (+242.37%)
Mutual labels:  convolutional-neural-networks, gan, generative-adversarial-network, resnet
Deep Learning With Python
Example projects I completed to understand Deep Learning techniques with Tensorflow. Please note that I do no longer maintain this repository.
Stars: ✭ 134 (+127.12%)
Mutual labels:  neural-networks, gan, generative-adversarial-network, style-transfer
Zhihu
This repo contains the source code in my personal column (https://zhuanlan.zhihu.com/zhaoyeyu), implemented using Python 3.6. Including Natural Language Processing and Computer Vision projects, such as text generation, machine translation, deep convolution GAN and other actual combat code.
Stars: ✭ 3,307 (+5505.08%)
Mutual labels:  convolutional-neural-networks, gan, style-transfer
Machine Learning Is All You Need
🔥🌟《Machine Learning 格物志》: ML + DL + RL basic codes and notes by sklearn, PyTorch, TensorFlow, Keras & the most important, from scratch!💪 This repository is ALL You Need!
Stars: ✭ 173 (+193.22%)
Mutual labels:  convolutional-neural-networks, gan, resnet
gans-2.0
Generative Adversarial Networks in TensorFlow 2.0
Stars: ✭ 76 (+28.81%)
Mutual labels:  generative-adversarial-network, style-transfer, cyclegan
Chainer Cifar10
Various CNN models for CIFAR10 with Chainer
Stars: ✭ 134 (+127.12%)
Mutual labels:  convolutional-neural-networks, neural-networks, resnet
Yann
This toolbox is support material for the book on CNN (http://www.convolution.network).
Stars: ✭ 41 (-30.51%)
Mutual labels:  convolutional-neural-networks, neural-networks, generative-adversarial-network
Few Shot Patch Based Training
The official implementation of our SIGGRAPH 2020 paper Interactive Video Stylization Using Few-Shot Patch-Based Training
Stars: ✭ 313 (+430.51%)
Mutual labels:  gan, generative-adversarial-network, style-transfer
Simgan
Implementation of Apple's Learning from Simulated and Unsupervised Images through Adversarial Training
Stars: ✭ 406 (+588.14%)
Mutual labels:  neural-networks, gan, generative-adversarial-network
Cartoongan Tensorflow
Generate your own cartoon-style images with CartoonGAN (CVPR 2018), powered by TensorFlow 2.0 Alpha.
Stars: ✭ 587 (+894.92%)
Mutual labels:  gan, generative-adversarial-network, generative-art
Hidt
Official repository for the paper "High-Resolution Daytime Translation Without Domain Labels" (CVPR2020, Oral)
Stars: ✭ 513 (+769.49%)
Mutual labels:  gan, generative-adversarial-network, style-transfer
Tensorflow 101
TensorFlow 101: Introduction to Deep Learning for Python Within TensorFlow
Stars: ✭ 642 (+988.14%)
Mutual labels:  convolutional-neural-networks, neural-networks, style-transfer
Pytorch Srgan
A modern PyTorch implementation of SRGAN
Stars: ✭ 289 (+389.83%)
Mutual labels:  convolutional-neural-networks, gan, generative-adversarial-network
Iresnet
Improved Residual Networks (https://arxiv.org/pdf/2004.04989.pdf)
Stars: ✭ 163 (+176.27%)
Mutual labels:  convolutional-neural-networks, neural-networks, resnet
Cyclegan
Tensorflow implementation of CycleGAN
Stars: ✭ 348 (+489.83%)
Mutual labels:  neural-networks, generative-adversarial-network, cyclegan
Tensorflow Srgan
Tensorflow implementation of "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network" (Ledig et al. 2017)
Stars: ✭ 33 (-44.07%)
Mutual labels:  convolutional-neural-networks, gan, generative-adversarial-network
Exermote
Using Machine Learning to predict the type of exercise from movement data
Stars: ✭ 108 (+83.05%)
Mutual labels:  convolutional-neural-networks, gan, generative-adversarial-network
Deep Learning Resources
由淺入深的深度學習資源 Collection of deep learning materials for everyone
Stars: ✭ 422 (+615.25%)
Mutual labels:  neural-networks, gan, generative-adversarial-network
Deep learning projects
Stars: ✭ 28 (-52.54%)
Mutual labels:  convolutional-neural-networks, neural-networks, gan

Artist Style Transfer Via Quadratic Potential

Rahul Bhalley and Jianlin Su

arXiv paper

Abstract

In this paper we address the problem of artist style transfer where the painting style of a given artist is applied on a real world photograph. We train our neural networks in adversarial setting via recently introduced quadratic potential divergence for stable learning process. To further improve the quality of generated artist stylized images we also integrate some of the recently introduced deep learning techniques in our method. To our best knowledge this is the first attempt towards artist style transfer via quadratic potential divergence. We provide some stylized image samples in the supplementary material. The source code for experimentation was written in PyTorch and is available online in my GitHub repository.

If you find our work, or this repository helpful, please consider citing our work with the following BibTex:

@article{bhalley2019artist,
  title={Artist Style Transfer Via Quadratic Potential},
  author={Bhalley, Rahul and Su, Jianlin},
  journal={arXiv preprint arXiv:1902.11108},
  year={2019}
}

NOTE: Pre-trained models are available in Google Drive. Please download it in the root directory of this repository.

Prerequisites

This code was tested in following environment setting:

Usage

First clone this repository:

git clone https://github.com/rahulbhalley/cyclegan-qp.git

Getting Datasets

Enter into the cyclegan-qp directory via terminal.

cd cyclegan-qp

To download the datasets (for instance, ukiyoe2photo) run:

bash download_dataset.sh ukiyoe2photo

Now ukiyoe2photo dataset will be downloaded and unzipped in cyclegan-qp/datasets/ukiyoe2photo directory.

Training & Inference

To train the network set TRAIN = True in config.py and for inference set it to False. Then one may only need to execute the following command in terminal.

python main.py

Configurations

Following is a list of configurable variables (in config.py) to perform experiments with different settings.

Data
  • DATASET_DIR - name of directory containing dataset. Default: "datasets".
  • DATASET_NAME - name of dataset to use. Default: "vangogh2photo".
  • LOAD_DIM - sets the size of images to load. Default: 286.
  • CROP_DIM - square crops the images from center. Default: 256.
  • CKPT_DIR - name of directory to save checkpoints in. Default: "checkpoints".
  • SAMPLE_DIR - directory name where inferred samples will be saved. Default: "samples".
Quadratic Potential
  • LAMBDA - see equation (1) in paper. Default: 10.0.
  • NORM - see equation (2) in paper. Possible values: "l1", "l2". Default: "l1".
CycleGAN-QP
  • CYC_WEIGHT - cycle consistency weight. Default: 10.0.
  • ID_WEIGHT - identity weight. Default: 0.5.
Network
  • N_CHANNELS - number of channels of images in dataset. Set to 3 for RGB and 1 for grayscale. Default: 3.
  • UPSAMPLE - set True to use (Odena et al., 2016) technique but False to use vanilla transpose convolution layers in generator networks. Default: True.
Training
  • RANDOM_SEED - random seed to reproduce the experiments. Default: 12345.
  • BATCH_SIZE - batch size for training. Default: 4.
  • LR - learning rate. Default: 2e-4.
  • BETA1 - hyper-parameter of Adam optimizer. Default: 0.5.
  • BETA2 - hyper-parameter of Adam optimizer. Default: 0.999.
  • BEGIN_ITER - if 0 the train begins from start but when set to > 0 then training continues from BEGIN_ITERth checkpoint. Default: 0.
  • END_ITER - number of iteration for training. Default: 15000.
  • TRAIN - set True for training CycleGAN-QP but False to perform inference (for more inference configurations see next subsection). Default: True.
Inference
  • INFER_ITER - performs inference by loading parameters from this checkpoint. Default: 15000.
  • INFER_STYLE - style to be transferred on images. Possible values: "ce", "mo", "uk", "vg". Default: "vg".
  • IMG_NAME - name of image to be performed inference on. Default: "image.jpg".
  • IN_IMG_DIR - name of directory containing IMG_NAME. Default: "images".
  • OUT_STY_DIR - name of directory to save inferred IMG_NAME. Default: "sty".
  • OUT_REC_DIR - name of directory to save recovered (original) IMG_NAME. Default: "rec".
  • IMG_SIZE - set None to infer with the original sized IMG_NAME or set some integral value to infer with IMG_SIZE. Default: None.
Logs
  • ITERS_PER_LOG - iterations duration at which screen logs should be made. Default: 100
  • ITERS_PER_CKPT - iterations duration at which checkpoints should be saved. Default: 1000

Results

The images in each column (from left to right) corresponds to:

  • Original image
  • Paul Cézanne
  • Claude Monet
  • Ukiyo-e
  • Vincent Van Gogh.

And each row contains a different image.

Real Image to Stylized Image

Stylized Image to Real Image

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