Git Product home page Git Product logo

cwan's Introduction

Creative Walk Adversarial Networks: Novel Art Generation with Probabilistic Random Walk Deviation from Style Norms

This repository contains the implementation of CWAN loss applied on StyleGAN2. The implementation of StyleGAN2 is borrowed from rosinality/stylegan2-pytorch

Requirements

I have tested on:

  • PyTorch 1.3.1
  • CUDA 10.1/10.2

Usage

First download the wikiart dataset from here.

Extract the data in the root directory.

Then you can train model in distributed settings

python -m torch.distributed.launch --nproc_per_node=4 --master_port=12895 train.py\
        --batch=32\ #batch size
        --checkpoint_folder=styleGAN2\ # folder to save checkpoint to
        --n_sample=25\ # intermediate samples to save
        --size=256\ # generation size
        --name_suffix=RW-W10-T10\ # checkpoint suffix
        --use_RW\ # whether to use CWAN loss
        --normalize_protos_scale=3.0\ # scale of normalization of protos
        --RW_weight=10.0\ # Scale of CWAN loss
        --RW_tau=10\ # Number of steps T
        --wandb\ # whether to use weight and biases logging
        --no_pbar\ # no progress bar when in batch mode, useful in cases of HPCs

Samples

License

Model details and custom CUDA kernel codes are from official repostiories: https://github.com/NVlabs/stylegan2

Codes for Learned Perceptual Image Patch Similarity, LPIPS came from https://github.com/richzhang/PerceptualSimilarity

To match FID scores more closely to tensorflow official implementations, I have used FID Inception V3 implementations in https://github.com/mseitzer/pytorch-fid

cwan's People

Contributors

divyanshj16 avatar

Stargazers

Ramsey avatar  avatar  avatar Reyhan Joseph avatar Faizan avatar Roger GOU avatar Mohamed Elhoseiny avatar

Watchers

Mohamed Elhoseiny avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.