Code Monkey home page Code Monkey logo

chan's Introduction

CHAN for Image-to-Image Translation

PyTorch implementations of CHAN for Image-to-Image Translation.

Fei Gao, Xingxin Xu, Jun Yu, Meimei Shang, Xiang Li, and Dacheng Tao, Complementary, Heterogeneous and Adversarial Networks for Image-to-Image Translation, IEEE Transactions on Image Processing, 2021. (Accepted)

Our Proposed Framework

Generator

Discriminator (Multi-layer Integration Discriminator, MID)

Generated Examples

Prerequisites

  • Linux or similar environment
  • Python 2.7
  • NVIDIA GPU + CUDA CuDNN

Getting Started

installation

  • clone this repo:
git clone https://github.com/fei-hdu/chan.git
cd chan
  • install PyTorch 0.4+

Quick Start

  • Download a dataset
    • CUFS splits of training and testing: files
    • CityScapes, Facades, Google Map, Edge2Shoes, Edge2Handbags: Pix2Pix bash
  • Train:

    python train.py --dataroot {dataset path} --datalist {datalist path} --pre_netG {coarse model path} --gpuid {your gpu ids}  
  • Test:

    python test.py --dataroot {dataset path} --datalist {datalist path} --pre_netG {final model path} --gpuid {your gpu ids}

Apply our pre-trained model

A face photo-to-sketch model pre-trained on the CUSF dataset: Google Drive

The pre-trained model need to be save at ./checkpoint

Then you can test this imodel.

Results

Our final results can be downloaded here

​Our Quantitative performance in a variety of image-to-image translation tasks are shown below. We assign a score of +1, 0, or -1 to the best, mediate, and worst model according to each performance index. For each method, the total score on each dataset and that across all these datasets, are reported.

Training/Test Tips

Best practice for training and testing your models. Feel free to ask any questions about coding. Xingxin Xu, [email protected]

Citation

If you find this useful for your research, please cite our paper as:

Fei Gao, Xingxin Xu, Jun Yu, Meimei Shang, Xiang Li, and Dacheng Tao, Complementary, Heterogeneous and Adversarial Networks for Image-to-Image Translation, IEEE Transactions on Image Processing, 2021. (Accepted)

@article{gao2021chan,
	title = {Complementary, Heterogeneous and Adversarial Networks for Image-to-Image Translation},
	author = {Fei Gao and Xingxin Xu and Jun Yu and Meimei Shang and Xiang Li and Dacheng Tao},
	journal = {IEEE Transactions on Image Processing},
	year = {2021},
	url = {https://github.com/fei-hdu/chan},
}

Acknowledgments

Our code is inspired by pytorch-CycleGAN-and-pix2pix

chan's People

Contributors

fei-aiart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aiart-gao

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.