Skip to content

Commit

Permalink
Code deployment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj Pai committed Sep 1, 2021
1 parent 8f6a8ac commit 3dfeb53
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 53 deletions.
56 changes: 32 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
![YAPF Formatting Check](https://github.com/Maastro-CDS-Imaging-Group/ganslate/workflows/YAPF%20Formatting%20Check/badge.svg)
# ganslate - GAN image-to-image translation framework made simple and extensible.

For comprehensive documentation, visit: https://ganslate.netlify.app

A [PyTorch](https://pytorch.org/) framework which aims to make GAN image-to-image translation more accessible for both beginner and advanced project with:

## Installation
To install apex run the
```
bash install_apex.sh
```
- Simple configuration system
- Extensibility for other datasets or architectures
- Documentation and [video walk-throughs](INSERT_YOUTUBE_PLAYLIST)

For all other dependencies use conda env
```
conda env update -f environment.yml
```
## Features

- 2D and 3D support
- Mixed precision
- Distributed training
- Tensorboard and [Weights&Biases](https://wandb.ai/site) logging
- Natural and medical image support
- A range of generator and discriminator architectures

## Available GANs

## Running the code
- Pix2Pix ([paper](https://www.google.com/search?q=pix2pix+paper&oq=pix2pix+paper&aqs=chrome.0.0l2j0i22i30l2j0i10i22i30.3304j0j7&sourceid=chrome&ie=UTF-8))
- CycleGAN ([paper](https://arxiv.org/abs/1703.10593))
- RevGAN ([paper](https://arxiv.org/abs/1902.02729))
- CUT (Contrastive Unpaired Translation) ([paper](https://arxiv.org/abs/2007.15651))

Run training:
```
python tools/train.py config="<PATH_TO_YAML>"
```
## Projects
`ganslate` was used in:

Override options from yaml config, example - change batch_size to 4:
```
python tools/train.py config="<PATH_TO_YAML>" batch_size=4
```
- Project 1
- Project 2

Run in distributed mode, single node example:
```
python -m torch.distributed.launch --use_env --nproc_per_node <NUM_GPUS_PER_NODE> tools/train.py config="<PATH_TO_YAML>"
```
Find more about other options by running `python -m torch.distributed.launch --help`
## Citation

If you used `ganslate` in your project, please cite:

```text
@article{ganslate,
title = {I implemented this first},
author = {Jurgen Schmidhuber}
}
```
1 change: 1 addition & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Contributing
25 changes: 6 additions & 19 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
# Installation

You can begin the install by cloning the repo,
```
git clone https://github.com/Maastro-CDS-Imaging-Group/ganslate.git
```

Once the repo is fetched, you can either use a docker-based install or a conda-based install on your local system.

!!! note
You can get to the repository root level after cloning,
```
cd ganslate
```


You can install `ganslate` either through a docker setup or directly on your system.
## Docker
*Supported operating systems: Linux, [Windows with WSL](https://docs.nvidia.com/cuda/wsl-user-guide/index.html)*

Expand Down Expand Up @@ -45,13 +32,13 @@ The docker container [mounts volumes from the host system](https://docs.docker.c

## Local

!!! note
It is recommended to use to setup a conda environment to install pytorch dependencies. You can do this by
[installing conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html#regular-installation) first, then followed by `conda create env -n ganslate_env python pytorch -c pytorch`.

You can install the ganslate package along with its dependencies using
```console
python setup.py install
pip install ganslate
```

!!! note
If you want to work on internals in the package then it is recommended to use `python setup.py develop`.
https://setuptools.readthedocs.io/en/latest/userguide/development_mode.html

The `ganslate` package is now installed. [You can now check out the quickstart page](quickstart.md)
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ nav:
- Training, Validation, Testing, Inference: tutorials/engines.md
- API:
- CLI: api/cli.md
- Contributing: contributing.md

theme: readthedocs

Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
21 changes: 11 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@ version = 0.1.0
author = "ganslate team"
# author-email =
url = https://github.com/Maastro-CDS-Imaging-Group/ganslate
description = Add a short description here!
long-description = file: README.rst
description = GAN image-to-image translation framework made simple and extensible.
long-description = file: README.md
long-description-content-type = text/markdown
license = mit
platforms = any
keywords = one, two
classifiers =
Development Status :: 2 - Pre-Alpha,
Intended Audience :: Science/Research,
Natural Language :: English,
Operating System :: OS Independent,
Programming Language :: Python :: 3.6,
Programming Language :: Python :: 3.7,
Programming Language :: Python :: 3.8,
Programming Language :: Python :: 3.9,
Development Status :: 3 - Alpha
Programming Language :: Python :: 3 :: Only
Intended Audience :: Science/Research
project-urls =
Documentation = https://ganslate.netlify.app/ # TODO: Update

Expand Down Expand Up @@ -52,7 +47,13 @@ install_requires =

[options.packages.find]
exclude =
docs
docker
tools
tests
notebooks
projects


[options.extras_require]
# Add here additional requirements for extra features, to install with:
Expand Down

0 comments on commit 3dfeb53

Please sign in to comment.