The official code of Anisotropic Stroke Control for Multiple Artists Style Transfer

Related tags

Deep LearningASMAGAN
Overview

ASMA-GAN

Anisotropic Stroke Control for Multiple Artists Style Transfer

Proceedings of the 28th ACM International Conference on Multimedia

The official repository with Pytorch

[Arxiv paper]

logo

title

Methodology

Framework

Dependencies

  • python3.6+
  • pytorch1.5+
  • torchvision
  • pyyaml
  • paramiko
  • pandas
  • requests
  • tensorboard
  • tensorboardX
  • tqdm

Installation

We highly recommend you to use Anaconda for installation

conda create -n ASMA python=3.6
conda activate ASMA
conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.1 -c pytorch
pip install pyyaml paramiko pandas requests tensorboard tensorboardX tqdm

Preparation

  • Traning dataset
    • Coming soon
  • pre-trained model
    • Download the model from Github Releases, and unzip the files to ./train_logs/

Usage

To test with pretrained model

The command line below will generate 1088*1920 HD style migration pictures of 11 painters for each picture of testImgRoot (11 painters include: Berthe Moriso , Edvard Munch, Ernst Ludwig Kirchner, Jackson Pollock, Wassily Kandinsky, Oscar-Claude Monet, Nicholas Roerich, Paul Cézanne, Pablo Picasso ,Samuel Colman, Vincent Willem van Gogh. The output image(s) can be found in ./test_logs/ASMAfinal/

  • Example of style transfer with all 11 artists style

    python main.py --mode test --cuda 0 --version ASMAfinal  --dataloader_workers 8   --testImgRoot ./bench/ --nodeName localhost --checkpoint 350000 --testScriptsName common_useage --specify_sytle -1 
  • Example of style transfer with Pablo Picasso style

    python main.py --mode test --cuda 0 --version ASMAfinal  --dataloader_workers 8   --testImgRoot ./bench/ --nodeName localhost --checkpoint 350000 --testScriptsName common_useage --specify_sytle 8 
  • Example of style transfer with Wassily Kandinsky style

    python main.py --mode test --cuda 0 --version ASMAfinal  --dataloader_workers 8   --testImgRoot ./bench/ --nodeName localhost --checkpoint 350000 --testScriptsName common_useage --specify_sytle 4

--version refers to the ASMAGAN training logs name.

--testImgRoot can be a folder with images or the path of a single picture.You can assign the image(s) you want to perform style transfer to this argument.

--specify_sytle is used to specify which painter's style is used for style transfer. When the value is -1, 11 painters' styles are used for image(s) respectively for style transfer. The values corresponding to each painter's style are as follows [0: Berthe Moriso, 1: Edvard Munch, 2: Ernst Ludwig Kirchner, 3: Jackson Pollock, 4: Wassily Kandinsky, 5: Oscar-Claude Monet, 6: Nicholas Roerich, 7: Paul Cézanne, 8: Pablo Picasso, 9 : Samuel Colman, 10: Vincent Willem van Gogh]

Training

Coming soon

To cite our paper

@inproceedings{DBLP:conf/mm/ChenYLQN20,
  author    = {Xuanhong Chen and
               Xirui Yan and
               Naiyuan Liu and
               Ting Qiu and
               Bingbing Ni},
  title     = {Anisotropic Stroke Control for Multiple Artists Style Transfer},
  booktitle = {{MM} '20: The 28th {ACM} International Conference on Multimedia, 2020},
  publisher = {{ACM}},
  year      = {2020},
  url       = {https://doi.org/10.1145/3394171.3413770},
  doi       = {10.1145/3394171.3413770},
  timestamp = {Thu, 15 Oct 2020 16:32:08 +0200},
  biburl    = {https://dblp.org/rec/conf/mm/ChenYLQN20.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

Some Results

Results1

Related Projects

Learn about our other projects [RainNet], [Sketch Generation], [CooGAN], [Knowledge Style Transfer], [SimSwap],[ASMA-GAN],[Pretrained_VGG19].

High Resolution Results

Comments
  • Can't download pre-trained model

    Can't download pre-trained model

    Hi! Could you please check your pre-trained model. The follow links is no found. Thank you https://github.com/neuralchen/ASMAGAN/releases/download/v.1.0/ASMAfinal.zip

    opened by namdn 5
  • Thank you for your great project. When will the training code be released

    Thank you for your great project. When will the training code be released

    Thank you for your great project.

    1. When will the training code be released.
    2. I want to get more painters how do I do that, how do I make the training datasets, how much data do I need
    3. Looking forward to your reply
    opened by zhanghongyong123456 5
  • Fine Tuning for single class

    Fine Tuning for single class

    Hello team, I would like to finetune your pretrained model for just five new class (total output will be five), how should I use the finetune? Thank you!

    opened by minhtcai 0
  • KeyError 1920

    KeyError 1920

    using the official command: python main.py --mode test --cuda 0 --version ASMAfinal --dataloader_workers 8 --testImgRoot ./bench/ --nodeName localhost --checkpoint 350000 --testScriptsName common_useage --specify_sytle 8

    then error happened Generator Script Name: Conditional_Generator_asm 11 classes Finished preprocessing the test dataset, total image number: 25... /home/ama/anaconda3/envs/ASMA/lib/python3.9/site-packages/torchvision/transforms/transforms.py:332: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum. warnings.warn( Traceback (most recent call last): File "/home/ama/ASMAGAN/main.py", line 266, in tester.test() File "/home/ama/ASMAGAN/test_scripts/tester_common_useage.py", line 50, in test test_data = TestDataset(test_img,batch_size) File "/home/ama/ASMAGAN/data_tools/test_data_loader_resize.py", line 36, in init transform.append(T.Resize(1088,1920)) File "/home/ama/anaconda3/envs/ASMA/lib/python3.9/site-packages/torchvision/transforms/transforms.py", line 336, in init interpolation = _interpolation_modes_from_int(interpolation) File "/home/ama/anaconda3/envs/ASMA/lib/python3.9/site-packages/torchvision/transforms/functional.py", line 47, in _interpolation_modes_from_int return inverse_modes_mapping[i] KeyError: 1920

    opened by Kayce001 1
  • Change aspect ratio of images

    Change aspect ratio of images

    test code change aspect ratio of input images so output images are deformed to fix this i make some correction at "test_data_loader_resize.py"

    image

    opened by birolkuyumcu 0
  • RuntimeError: cuDNN

    RuntimeError: cuDNN

    Hi I get the following error when running the code:

    RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED when calling backward()

    I would appreciate your help on how to resolve this.

    Thank you!

    Gero

    opened by Limbicnation 8
Releases(v.1.1)
Owner
Six_God
Six_God
Generative Adversarial Text-to-Image Synthesis

###Generative Adversarial Text-to-Image Synthesis Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, Honglak Lee This is the

Scott Ellison Reed 883 Dec 31, 2022
Sync2Gen Code for ICCV 2021 paper: Scene Synthesis via Uncertainty-Driven Attribute Synchronization

Sync2Gen Code for ICCV 2021 paper: Scene Synthesis via Uncertainty-Driven Attribute Synchronization 0. Environment Environment: python 3.6 and cuda 10

Haitao Yang 62 Dec 30, 2022
Simultaneous Demand Prediction and Planning

Simultaneous Demand Prediction and Planning Dependencies Python packages: Pytorch, scikit-learn, Pandas, Numpy, PyYAML Data POI: data/poi Road network

Yizong Wang 1 Sep 01, 2022
Implementation of "Deep Implicit Templates for 3D Shape Representation"

Deep Implicit Templates for 3D Shape Representation Zerong Zheng, Tao Yu, Qionghai Dai, Yebin Liu. arXiv 2020. This repository is an implementation fo

Zerong Zheng 144 Dec 07, 2022
Trafffic prediction analysis using hybrid models - Machine Learning

Hybrid Machine learning Model Clone the Repository Create a new Directory as assests and download the model from the below link Model Link To Start th

1 Feb 08, 2022
Space Ship Simulator using python

FlyOver Basic space-ship simulator using python How to run? Just double click run.py What modules do i need? All modules that i currently using is bui

0 Oct 09, 2022
Unofficial Implementation of Oboe (SIGCOMM'18').

Oboe-Reproduce This is the unofficial implementation of the paper "Oboe: Auto-tuning video ABR algorithms to network conditions, Zahaib Akhtar, Yun Se

Tianchi Huang 13 Nov 04, 2022
The undersampled DWI image using Slice-Interleaved Diffusion Encoding (SIDE) method can be reconstructed by the UNet network.

UNet-SIDE The undersampled DWI image using Slice-Interleaved Diffusion Encoding (SIDE) method can be reconstructed by the UNet network. For Super Reso

TIANTIAN XU 1 Jan 13, 2022
a morph transfer UGATIT for image translation.

Morph-UGATIT a morph transfer UGATIT for image translation. Introduction 中文技术文档 This is Pytorch implementation of UGATIT, paper "U-GAT-IT: Unsupervise

55 Nov 14, 2022
CoRe: Contrastive Recurrent State-Space Models

CoRe: Contrastive Recurrent State-Space Models This code implements the CoRe model and reproduces experimental results found in Robust Robotic Control

Apple 21 Aug 11, 2022
Reproduce partial features of DeePMD-kit using PyTorch.

DeePMD-kit on PyTorch For better understand DeePMD-kit, we implement its partial features using PyTorch and expose interface consuing descriptors. Tec

Shaochen Shi 8 Dec 17, 2022
PyTorch implementation of DCT fast weight RNNs

DCT based fast weights This repository contains the official code for the paper: Training and Generating Neural Networks in Compressed Weight Space. T

Kazuki Irie 4 Dec 24, 2022
A time series processing library

Timeseria Timeseria is a time series processing library which aims at making it easy to handle time series data and to build statistical and machine l

Stefano Alberto Russo 11 Aug 08, 2022
frida工具的缝合怪

fridaUiTools fridaUiTools是一个界面化整理脚本的工具。新人的练手作品。参考项目ZenTracer,觉得既然可以界面化,那么应该可以把功能做的更加完善一些。跨平台支持:win、mac、linux 功能缝合怪。把一些常用的frida的hook脚本简单统一输出方式后,整合进来。并且

diveking 997 Jan 09, 2023
Computer-Vision-Paper-Reviews - Computer Vision Paper Reviews with Key Summary along Papers & Codes

Computer-Vision-Paper-Reviews Computer Vision Paper Reviews with Key Summary along Papers & Codes. Jonathan Choi 2021 50+ Papers across Computer Visio

Jonathan Choi 2 Mar 17, 2022
Website for D2C paper

D2C This is the repository that contains source code for the D2C Website. If you find D2C useful for your work please cite: @article{sinha2021d2c au

1 Oct 21, 2021
Research - dataset and code for 2016 paper Learning a Driving Simulator

the people's comma the paper Learning a Driving Simulator the comma.ai driving dataset 7 and a quarter hours of largely highway driving. Enough to tra

comma.ai 4.1k Jan 02, 2023
A simple tutoral for error correction task, based on Pytorch

gramcorrector A simple tutoral for error correction task, based on Pytorch Grammatical Error Detection (sentence-level) a binary sequence-based classi

peiyuan_gong 8 Dec 03, 2022
StyleGAN2-ADA - Official PyTorch implementation

Need Help? If you’re new to StyleGAN2-ADA and looking to get started, please check out this video series from a course Lia Coleman and I taught in Oct

Derrick Schultz 217 Jan 04, 2023
CAPITAL: Optimal Subgroup Identification via Constrained Policy Tree Search

CAPITAL: Optimal Subgroup Identification via Constrained Policy Tree Search This repository is the official implementation of CAPITAL: Optimal Subgrou

Hengrui Cai 0 Oct 19, 2021