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
git《Investigating Loss Functions for Extreme Super-Resolution》(CVPR 2020) GitHub:

Investigating Loss Functions for Extreme Super-Resolution NTIRE 2020 Perceptual Extreme Super-Resolution Submission. Our method ranked first and secon

Sejong Yang 0 Oct 17, 2022
Pocsploit is a lightweight, flexible and novel open source poc verification framework

Pocsploit is a lightweight, flexible and novel open source poc verification framework

cckuailong 208 Dec 24, 2022
This is a repository of our model for weakly-supervised video dense anticipation.

Introduction This is a repository of our model for weakly-supervised video dense anticipation. More results on GTEA, Epic-Kitchens etc. will come soon

2 Apr 09, 2022
[SIGGRAPH Asia 2021] Pose with Style: Detail-Preserving Pose-Guided Image Synthesis with Conditional StyleGAN

Pose with Style: Detail-Preserving Pose-Guided Image Synthesis with Conditional StyleGAN [Paper] [Project Website] [Output resutls] Official Pytorch i

Badour AlBahar 215 Dec 17, 2022
AI Face Mesh: This is a simple face mesh detection program based on Artificial intelligence.

AI Face Mesh: This is a simple face mesh detection program based on Artificial Intelligence which made with Python. It's able to detect 468 different

Md. Rakibul Islam 1 Jan 13, 2022
From Canonical Correlation Analysis to Self-supervised Graph Neural Networks

Code for CCA-SSG model proposed in the NeurIPS 2021 paper From Canonical Correlation Analysis to Self-supervised Graph Neural Networks.

Hengrui Zhang 44 Nov 27, 2022
CLIP+FFT text-to-image

Aphantasia This is a text-to-image tool, part of the artwork of the same name. Based on CLIP model, with FFT parameterizer from Lucent library as a ge

vadim epstein 690 Jan 02, 2023
This code is an implementation for Singing TTS.

MLP Singer This code is an implementation for Singing TTS. The algorithm is based on the following papers: Tae, J., Kim, H., & Lee, Y. (2021). MLP Sin

Heejo You 22 Dec 23, 2022
Py-faster-rcnn - Faster R-CNN (Python implementation)

py-faster-rcnn has been deprecated. Please see Detectron, which includes an implementation of Mask R-CNN. Disclaimer The official Faster R-CNN code (w

Ross Girshick 7.8k Jan 03, 2023
Urban mobility simulations with Python3, RLlib (Deep Reinforcement Learning) and Mesa (Agent-based modeling)

Deep Reinforcement Learning for Smart Cities Documentation RLlib: https://docs.ray.io/en/master/rllib.html Mesa: https://mesa.readthedocs.io/en/stable

1 May 15, 2022
Implementation of PersonaGPT Dialog Model

PersonaGPT An open-domain conversational agent with many personalities PersonaGPT is an open-domain conversational agent cpable of decoding personaliz

ILLIDAN Lab 42 Jan 01, 2023
A PaddlePaddle implementation of Time Interval Aware Self-Attentive Sequential Recommendation.

TiSASRec.paddle A PaddlePaddle implementation of Time Interval Aware Self-Attentive Sequential Recommendation. Introduction 论文:Time Interval Aware Sel

Paddorch 2 Nov 28, 2021
A hifiasm fork for metagenome assembly using Hifi reads.

hifiasm_meta - de novo metagenome assembler, based on hifiasm, a haplotype-resolved de novo assembler for PacBio Hifi reads.

44 Jul 10, 2022
Rotation-Only Bundle Adjustment

ROBA: Rotation-Only Bundle Adjustment Paper, Video, Poster, Presentation, Supplementary Material In this repository, we provide the implementation of

Seong 51 Nov 29, 2022
Discovering Explanatory Sentences in Legal Case Decisions Using Pre-trained Language Models.

Statutory Interpretation Data Set This repository contains the data set created for the following research papers: Savelka, Jaromir, and Kevin D. Ashl

17 Dec 23, 2022
Official Implementation for Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation

Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation We present a generic image-to-image translation framework, pixel2style2pixel (pSp

2.8k Dec 30, 2022
PAMI stands for PAttern MIning. It constitutes several pattern mining algorithms to discover interesting patterns in transactional/temporal/spatiotemporal databases

Introduction PAMI stands for PAttern MIning. It constitutes several pattern mining algorithms to discover interesting patterns in transactional/tempor

RAGE UDAY KIRAN 43 Jan 08, 2023
Контрольная работа по математическим методам машинного обучения

ML-MathMethods-Test Контрольная работа по математическим методам машинного обучения. Вычисление основных статистик, диаграмм и графиков, проверка разл

Stas Ivanovskii 1 Jan 06, 2022
Machine learning and Deep learning models, deploy on telegram (the best social media)

Semi Intelligent BOT The project involves : Classifying fake news Classifying objects such as aeroplane, automobile, bird, cat, deer, dog, frog, horse

MohammadReza Norouzi 5 Mar 06, 2022
GLIP: Grounded Language-Image Pre-training

GLIP: Grounded Language-Image Pre-training Updates 12/06/2021: GLIP paper on arxiv https://arxiv.org/abs/2112.03857. Code and Model are under internal

Microsoft 862 Jan 01, 2023