Skip to content

This is a pytorch-implementation for CrossNet: Latent Cross-Consistency for Unpaired Image Translation.

Notifications You must be signed in to change notification settings

NeverGiveU/CrossNet-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

    This is an pytorch implementation for paper CrossNet: Latent Cross-Consistency for Unpaired Image Translation

    The project are build based on pytorch-CycleGAN-and-pix2pix. Thanks a lot to them, and we really got help from their works.

Tips

For easier understanding, we modify the project such that

1) Simple Project Structure

    We use a more single and direct structure then the initial project of pytorch-CycleGAN-and-pix2pix, which can be shown as follows.

├─checkpoints
│  └─CrossNet_horse2zebra
├─datasets
├─results
│  └─CrossNet_horse2zebra
├─config.py
├─data.py
├─loss.py
├─networks.py
├─test.py
├─train.py
├─README.md
└─__pycache__

2) Convenient Usage

    Inspired by the initial project management mechanism, we provide an efficient way for the storage and displaying of models, training data, results, in different experiments.

How to begin?

Download the project

git clone https://github.com/NeverGiveU/CrossNet-pytorch.git
cd CrossNet-pytorch

Dataset

    Download the dataset of horse2zebra in from Baidu NetDisk.

    Unzip the .zip file to datasets.

Train

    Use command python train.py to start trainning.

Test

    Use command python test.py to test after finishing the training.

Results

    Some results can be seen in dir sample. Notice that, the results from zebra to horse is better than the results in inverse direction.

alt sample 1 alt sample 2 alt sample 3 alt sample 4

Some Notes

    We found that during the training, the adversarial loss of the generator almostly unchanged, while for descriminator it decreased obviously. We think that is because we trained models in mode of "G first and D next", in which D provided less information for G when updating G. We will try another training mode of "D first and G next" in the following days. And updating of project will be done soon.

About

This is a pytorch-implementation for CrossNet: Latent Cross-Consistency for Unpaired Image Translation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages