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
Python Interview Questions

Python Interview Questions Clone the code to your computer. You need to understand the code in main.py and modify the content in if __name__ =='__main

ClassmateLin 575 Dec 28, 2022
PyTorch Implementation of our paper Explain Me the Painting: Multi-Topic Knowledgeable Art Description Generation

PyTorch Implementation of our paper Explain Me the Painting: Multi-Topic Knowledgeable Art Description Generation

Zechen Bai 12 Jul 08, 2022
Non-Vacuous Generalisation Bounds for Shallow Neural Networks

This package requires jax, tensorflow, and numpy. Either tensorflow or scikit-learn can be used for loading data. To run in a nix-shell with required

Felix Biggs 0 Feb 04, 2022
Segment axon and myelin from microscopy data using deep learning

Segment axon and myelin from microscopy data using deep learning. Written in Python. Using the TensorFlow framework. Based on a convolutional neural network architecture. Pixels are classified as eit

NeuroPoly 103 Nov 29, 2022
Metadata-Extractor - Metadata Extractor Script can be used to read in exif metadata

Metadata Extractor The exifextract script can be used to read in exif metadata f

1 Feb 16, 2022
Use of Attention Gates in a Convolutional Neural Network / Medical Image Classification and Segmentation

Attention Gated Networks (Image Classification & Segmentation) Pytorch implementation of attention gates used in U-Net and VGG-16 models. The framewor

Ozan Oktay 1.6k Dec 30, 2022
Simple converter for deploying Stable-Baselines3 model to TFLite and/or Coral

Running SB3 developed agents on TFLite or Coral Introduction I've been using Stable-Baselines3 to train agents against some custom Gyms, some of which

Gary Briggs 16 Oct 11, 2022
Context-Sensitive Misspelling Correction of Clinical Text via Conditional Independence, CHIL 2022

cim-misspelling Pytorch implementation of Context-Sensitive Spelling Correction of Clinical Text via Conditional Independence, CHIL 2022. This model (

Juyong Kim 11 Dec 19, 2022
DeepSpamReview: Detection of Fake Reviews on Online Review Platforms using Deep Learning Architectures. Summer Internship project at CoreView Systems.

Detection of Fake Reviews on Online Review Platforms using Deep Learning Architectures Dataset: https://s3.amazonaws.com/fast-ai-nlp/yelp_review_polar

Ashish Salunkhe 37 Dec 17, 2022
A texturizer that I just made. Nothing special here.

texturizer This is a little project that I did with an hour's time. It texturizes an image given a image and a texture to texturize it with. There is

1 Nov 11, 2021
code for `Look Closer to Segment Better: Boundary Patch Refinement for Instance Segmentation`

Look Closer to Segment Better: Boundary Patch Refinement for Instance Segmentation (CVPR 2021) Introduction PBR is a conceptually simple yet effective

H.Chen 143 Jan 05, 2023
Official Implementation of "DialogLM: Pre-trained Model for Long Dialogue Understanding and Summarization."

DialogLM Code for AAAI 2022 paper: DialogLM: Pre-trained Model for Long Dialogue Understanding and Summarization. Pre-trained Models We release two ve

Microsoft 92 Dec 19, 2022
3D dataset of humans Manipulating Objects in-the-Wild (MOW)

MOW dataset [Website] This repository maintains our 3D dataset of humans Manipulating Objects in-the-Wild (MOW). The dataset contains 512 images in th

Zhe Cao 28 Nov 06, 2022
AirCode: A Robust Object Encoding Method

AirCode This repo contains source codes for the arXiv preprint "AirCode: A Robust Object Encoding Method" Demo Object matching comparison when the obj

Chen Wang 30 Dec 09, 2022
Distance correlation and related E-statistics in Python

dcor dcor: distance correlation and related E-statistics in Python. E-statistics are functions of distances between statistical observations in metric

Carlos Ramos Carreño 108 Dec 27, 2022
The official implementation of paper Siamese Transformer Pyramid Networks for Real-Time UAV Tracking, accepted by WACV22

SiamTPN Introduction This is the official implementation of the SiamTPN (WACV2022). The tracker intergrates pyramid feature network and transformer in

Robotics and Intelligent Systems Control @ NYUAD 28 Nov 25, 2022
Data Augmentation Using Keras and Python

Data-Augmentation-Using-Keras-and-Python Data augmentation is the process of increasing the number of training dataset. Keras library offers a simple

Happy N. Monday 3 Feb 15, 2022
Python implementation of cover trees, near-drop-in replacement for scipy.spatial.kdtree

This is a Python implementation of cover trees, a data structure for finding nearest neighbors in a general metric space (e.g., a 3D box with periodic

Patrick Varilly 28 Nov 25, 2022
HeatNet is a python package that provides tools to build, train and evaluate neural networks designed to predict extreme heat wave events globally on daily to subseasonal timescales.

HeatNet HeatNet is a python package that provides tools to build, train and evaluate neural networks designed to predict extreme heat wave events glob

Google Research 6 Jul 07, 2022
Learn other languages ​​using artificial intelligence with python.

The main idea of ​​the project is to facilitate the learning of other languages. We created a simple AI that will interact with you. Just ask questions that if she knows, she will answer.

Pedro Rodrigues 2 Jun 07, 2022