upit

A fastai/PyTorch package for unpaired image-to-image translation.

https://github.com/tmabraham/upit

Science Score: 59.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Committers with academic emails
    1 of 4 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

cyclegan deep-learning fastai image-to-image-translation nbdev pytorch

Keywords from Contributors

mesh interactive
Last synced: 6 months ago · JSON representation

Repository

A fastai/PyTorch package for unpaired image-to-image translation.

Basic Info
Statistics
  • Stars: 136
  • Watchers: 4
  • Forks: 21
  • Open Issues: 6
  • Releases: 4
Topics
cyclegan deep-learning fastai image-to-image-translation nbdev pytorch
Created over 5 years ago · Last pushed almost 3 years ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

Unpaired image-to-image translation

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.

DOI

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:

python from upit.data.unpaired import * from upit.models.cyclegan import * from upit.train.cyclegan import *

python 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 (thats meant to strike a better balance between style and content), so the same cycle_learner class can be used.

python from upit.models.ganilla import *

python 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:

python from upit.models.dualgan import * from upit.train.dualgan import *

python 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: @software{Abraham_UPIT_-_A, author = {Abraham, Tanishq Mathew}, doi = {10.5281/zenodo.7889405}, title = {{UPIT - A fastai/PyTorch package for unpaired image-to-image translation.}}, url = {https://github.com/tmabraham/UPIT}, version = {0.2.3} }

Owner

  • Name: Tanishq Abraham
  • Login: tmabraham
  • Kind: user

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 146
  • Total Committers: 4
  • Avg Commits per committer: 36.5
  • Development Distribution Score (DDS): 0.082
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Tanishq Abraham t****m@u****u 134
dependabot[bot] 4****] 8
loh04 l****a@g****m 2
Hamel Husain h****u@g****m 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 21
  • Total pull requests: 24
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 10 days
  • Total issue authors: 7
  • Total pull request authors: 5
  • Average comments per issue: 2.19
  • Average comments per pull request: 0.58
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 10
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tmabraham (8)
  • hno2 (4)
  • rbunn80110 (3)
  • turgut090 (3)
  • lohithmunakala (1)
  • SHREYAS290601 (1)
  • many-hats (1)
Pull Request Authors
  • dependabot[bot] (10)
  • tmabraham (9)
  • lohithmunakala (3)
  • hamelsmu (1)
  • drscotthawley (1)
Top Labels
Issue Labels
enhancement (8)
Pull Request Labels
dependencies (10)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 15 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 4
  • Total maintainers: 1
pypi.org: upit

Unpaired Image-to-Image Translation with PyTorch+fastai

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 15 Last month
Rankings
Stargazers count: 6.3%
Forks count: 8.6%
Dependent packages count: 10.0%
Average: 18.3%
Dependent repos count: 21.8%
Downloads: 45.1%
Maintainers (1)
Last synced: 7 months ago

Dependencies

examples/hf_space/requirements.txt pypi
  • gradio *
  • torchvision *
  • upit *
examples/web_app_old/requirements.txt pypi
  • gradio *
.github/workflows/deploy.yaml actions
  • fastai/workflows/quarto-ghp master composite
.github/workflows/test.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
setup.py pypi