All Projects → tmabraham → UPIT

tmabraham / UPIT

Licence: Apache-2.0 license
A fastai/PyTorch package for unpaired image-to-image translation.

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to UPIT

Fastpages
An easy to use blogging platform, with enhanced support for Jupyter Notebooks.
Stars: ✭ 2,888 (+2972.34%)
Mutual labels:  fastai, nbdev
Nbdev
Create delightful python projects using Jupyter Notebooks
Stars: ✭ 3,061 (+3156.38%)
Mutual labels:  fastai, nbdev
ganslate
Simple and extensible GAN image-to-image translation framework. Supports natural and medical images.
Stars: ✭ 17 (-81.91%)
Mutual labels:  cyclegan, image-to-image-translation
pix2pix
This project uses a conditional generative adversarial network (cGAN) named Pix2Pix for the Image to image translation task.
Stars: ✭ 28 (-70.21%)
Mutual labels:  cyclegan, image-to-image-translation
day2night
Image2Image Translation Research
Stars: ✭ 46 (-51.06%)
Mutual labels:  cyclegan
fastai sequence tagging
sequence tagging for NER for ULMFiT
Stars: ✭ 21 (-77.66%)
Mutual labels:  fastai
encrypted-skin-cancer-detection
Detecting skin cancer in encrypted images with TensorFlow
Stars: ✭ 27 (-71.28%)
Mutual labels:  fastai
fastblog
My fastai blog
Stars: ✭ 20 (-78.72%)
Mutual labels:  fastai
nnanno
Sample, annotate and apply computer vision to the Newspaper Navigator dataset
Stars: ✭ 16 (-82.98%)
Mutual labels:  nbdev
labml
🔎 Monitor deep learning model training and hardware usage from your mobile phone 📱
Stars: ✭ 1,213 (+1190.43%)
Mutual labels:  fastai
UnityImageSynthesisTutorial1
Use Unity to generate synthetic images for deep learning image segmentation in PyTorch and fastai
Stars: ✭ 93 (-1.06%)
Mutual labels:  fastai
FAI-notes
Some notes, tutorials, and some experimentation with the fast.ai library (https://github.com/fastai/fastai)
Stars: ✭ 58 (-38.3%)
Mutual labels:  fastai
AffineGAN
PyTorch Implementation of "Facial Image-to-Video Translation by a Hidden Affine Transformation" in MM'19.
Stars: ✭ 46 (-51.06%)
Mutual labels:  image-to-image-translation
Plant Disease Detection
Plant Disease Detector Web Application
Stars: ✭ 181 (+92.55%)
Mutual labels:  fastai
deep-learning
🦅 Deep Learning awesome cheatsheet
Stars: ✭ 24 (-74.47%)
Mutual labels:  fastai
fastdownload
Easily download, verify, and extract archives
Stars: ✭ 35 (-62.77%)
Mutual labels:  fastai
fasterai1
FasterAI: A repository for making smaller and faster models with the FastAI library.
Stars: ✭ 34 (-63.83%)
Mutual labels:  fastai
DeepLearning-IDS
Network Intrusion Detection System using Deep Learning Techniques
Stars: ✭ 76 (-19.15%)
Mutual labels:  fastai
DeepSIM
Official PyTorch implementation of the paper: "DeepSIM: Image Shape Manipulation from a Single Augmented Training Sample" (ICCV 2021 Oral)
Stars: ✭ 389 (+313.83%)
Mutual labels:  image-to-image-translation
fastai-docker
Fast.AI course complete docker container for Paperspace and Gradient
Stars: ✭ 52 (-44.68%)
Mutual labels:  fastai

Unpaired image-to-image translation

A fastai/PyTorch package for unpaired image-to-image translation currently with CycleGAN implementation.

This is a package for training and testing unpaired image-to-image translation models. It currently only includes the CycleGAN, DualGAN, and GANILLA models, but other models will be implemented in the future.

This package uses fastai to accelerate deep learning experimentation. Additionally, nbdev was used to develop the package and produce documentation based on a series of notebooks.

Install

To install, use pip:

pip install git+https://github.com/tmabraham/UPIT.git

The package uses torch 1.7.1, torchvision 0.8.2, and fastai 2.3.0 (and its dependencies). It also requires nbdev 1.1.13 if you would like to add features to the package. Finally, for creating a web app model interface, gradio 1.1.6 is used.

How to use

Training a CycleGAN model is easy with UPIT! Given the paths of the images from the two domains trainA_path and trainB_path, you can do the following:

#cuda
from upit.data.unpaired import *
from upit.models.cyclegan import *
from upit.train.cyclegan import *
dls = get_dls(trainA_path, trainB_path)
cycle_gan = CycleGAN(3,3,64)
learn = cycle_learner(dls, cycle_gan,opt_func=partial(Adam,mom=0.5,sqr_mom=0.999))
learn.fit_flat_lin(100,100,2e-4)

The GANILLA model is only a different generator model architecture (that's meant to strike a better balance between style and content), so the same cycle_learner class can be used.

#cuda
from upit.models.ganilla import *
ganilla = GANILLA(3,3,64)
learn = cycle_learner(dls, ganilla,opt_func=partial(Adam,mom=0.5,sqr_mom=0.999))
learn.fit_flat_lin(100,100,2e-4)

Finally, we provide separate functions/classes for DualGAN model and training:

#cuda
from upit.models.dualgan import *
from upit.train.dualgan import *
dual_gan = DualGAN(3,64,3)
learn = dual_learner(dls, dual_gan, opt_func=RMSProp)
learn.fit_flat_lin(100,100,2e-4)

Additionally, we provide metrics for quantitative evaluation of the models, as well as experiment tracking with Weights and Biases. Check the documentation for more information!

Citing UPIT

If you use UPIT in your research please use the following BibTeX entry:

@Misc{UPIT,
    author =       {Tanishq Mathew Abraham},
    title =        {UPIT - A fastai/PyTorch package for unpaired image-to-image translation.},
    howpublished = {Github},
    year =         {2021},
    url =          {https://github.com/tmabraham/UPIT}
}
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].