All Projects → jolibrain → joliGAN

jolibrain / joliGAN

Licence: other
Semantic Image-to-Image Translation for Domain Adaptation

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to joliGAN

Deepdetect
Deep Learning API and Server in C++14 support for Caffe, Caffe2, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE
Stars: ✭ 2,306 (+6305.56%)
Mutual labels:  neural-nets, deepdetect
pytorch-CycleGAN
Pytorch implementation of CycleGAN.
Stars: ✭ 39 (+8.33%)
Mutual labels:  cyclegan
CycleGAN-Models
Models generated by CycleGAN
Stars: ✭ 42 (+16.67%)
Mutual labels:  cyclegan
BasicNeuralNet
Trying to understand neural nets by building a simple one from scratch
Stars: ✭ 34 (-5.56%)
Mutual labels:  neural-nets
pytorch-gans
PyTorch implementation of GANs (Generative Adversarial Networks). DCGAN, Pix2Pix, CycleGAN, SRGAN
Stars: ✭ 21 (-41.67%)
Mutual labels:  cyclegan
CVC
CVC: Contrastive Learning for Non-parallel Voice Conversion (INTERSPEECH 2021, in PyTorch)
Stars: ✭ 45 (+25%)
Mutual labels:  cyclegan
pix2pix
This project uses a conditional generative adversarial network (cGAN) named Pix2Pix for the Image to image translation task.
Stars: ✭ 28 (-22.22%)
Mutual labels:  cyclegan
CycleGAN-Music-Style-Transfer-Refactorization
Symbolic Music Genre Transfer with CycleGAN - Refactorization
Stars: ✭ 28 (-22.22%)
Mutual labels:  cyclegan
multitask-CycleGAN
Pytorch implementation of multitask CycleGAN with auxiliary classification loss
Stars: ✭ 88 (+144.44%)
Mutual labels:  cyclegan
day2night
Image2Image Translation Research
Stars: ✭ 46 (+27.78%)
Mutual labels:  cyclegan
Generative-Model
Repository for implementation of generative models with Tensorflow 1.x
Stars: ✭ 66 (+83.33%)
Mutual labels:  cyclegan
publications-arruda-ijcnn-2019
Cross-Domain Car Detection Using Unsupervised Image-to-Image Translation: From Day to Night
Stars: ✭ 59 (+63.89%)
Mutual labels:  cyclegan
DA-RetinaNet
Official Detectron2 implementation of DA-RetinaNet of our Image and Vision Computing 2021 work 'An unsupervised domain adaptation scheme for single-stage artwork recognition in cultural sites'
Stars: ✭ 31 (-13.89%)
Mutual labels:  cyclegan
CycleGAN-gluon-mxnet
this repo attemps to reproduce Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks(CycleGAN) use gluon reimplementation
Stars: ✭ 31 (-13.89%)
Mutual labels:  cyclegan
Blur-and-Clear-Classification
Classifying the Blur and Clear Images
Stars: ✭ 88 (+144.44%)
Mutual labels:  neural-nets
cycleGAN-PyTorch
A clean and lucid implementation of cycleGAN using PyTorch
Stars: ✭ 107 (+197.22%)
Mutual labels:  cyclegan
Optimizers-for-Tensorflow
Adam, NAdam and AAdam optimizers
Stars: ✭ 20 (-44.44%)
Mutual labels:  neural-nets
UPIT
A fastai/PyTorch package for unpaired image-to-image translation.
Stars: ✭ 94 (+161.11%)
Mutual labels:  cyclegan
classifying-cancer
A Python-Tensorflow neural network for classifying cancer data
Stars: ✭ 30 (-16.67%)
Mutual labels:  neural-nets
ganslate
Simple and extensible GAN image-to-image translation framework. Supports natural and medical images.
Stars: ✭ 17 (-52.78%)
Mutual labels:  cyclegan

Logo

Image-to-Image Translation for Domain Adaptation

JoliGAN provides models and machine learning tools for unpaired image to image translation and domain adaptation.

  • Multiple models based on adversarial generation: CycleGAN, CyCADA, CUT and more
  • Many generator architectures such as styleGAN2 decoder / mobile resnet, attention resnet,...
  • Semantic consistency allowing to perform domain adaptation e.g. from synthetic to real-like data

Use cases

  • Image to image translation while preserving semantic
  • Image to image translation to cope with scarce data

Models

Name Paper
CycleGAN https://arxiv.org/abs/1703.10593
CyCADA https://arxiv.org/abs/1711.03213
CUT https://arxiv.org/abs/2007.15651
RecycleGAN https://arxiv.org/abs/1808.05174
StyleGAN2 https://arxiv.org/abs/1912.04958

Generator architectures

Architecture Number of parameters
Resnet 9 blocks 11.378M
Mobile resnet 9 blocks 1.987M
Resnet attn 11.823M
Mobile resnet attn 2.432M
Segformer b0 4.158M
Segformer attn b0 4.60M
Segformer attn b1 14.724M
Segformer attn b5 83.016M

Quick Start

Prerequisites

  • Linux
  • Python 3
  • CPU or NVIDIA GPU + CUDA CuDNN

Installation

Clone this repo:

git clone --recursive https://github.com/jolibrain/joliGAN.git
cd joliGAN

Install PyTorch and other dependencies (torchvision, visdom and dominate, FID).
For pip users, please type the command pip install -r requirements.txt.

JoliGAN training

With a dataset located in directory dataroot:

  • Train with cut :

You can modify the hyperparameters in ./scripts/train_cut.sh and then use the following line command.

bash ./scripts/train_cut.sh dataroot

  • Train with cut and labels :

You can modify the hyperparameters in ./scripts/train_cut_semantic.sh and then use the following line command.

bash ./scripts/train_cut_semantic.sh dataroot

  • Train with cut and mask labels :

You can modify the hyperparameters in ./scripts/train_cut_semantic_mask.sh and then use the following line command.

bash ./scripts/train_cut_semantic_mask.sh dataroot
  • Train with cycleGAN :

You can modify the hyperparameters in ./scripts/train_cyclegan.sh and then use the following line command.

bash ./scripts/train_cyclegan.sh dataroot

  • Train with cycleGAN and labels :

You can modify the hyperparameters in ./scripts/train_cyclegan_semantic.sh and then use the following line command.

bash ./scripts/train_cyclegan_semantic.sh dataroot

  • Train with cycleGAN and mask labels :

You can modify the hyperparameters in ./scripts/train_cyclegan_semantic_mask.sh and then use the following line command.

bash ./scripts/train_cyclegan_semantic_mask.sh dataroot

JoliGAN server

Ensure everything is installed

python3 -m pip install fastapi uvicorn

Then run server:

server/run.sh --host localhost --port 8000

Tests

To launch tests before new commits:

bash scripts/run_tests.sh /path/to/dir

Docker build

To build a docker for joliGAN server:

docker build -t jolibrain/joligan_build -f docker/Dockerfile.build .
docker build -t jolibrain/joligan_server -f docker/Dockerfile.server .

To run the joliGAN docker:

nvidia-docker run jolibrain/myjoligan

Code format

If you want to contribute please use black code format. Install:

pip install black 

Usage :

black .

If you want to format the code automatically before every commit :

pip install pre-commit
pre-commit install

Authors

JoliGAN is created and maintained by Jolibrain.

Our code is inspired by pytorch-CycleGAN-and-pix2pix, CUT and AttentionGAN among others.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].