-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,3 +125,5 @@ results | |
*.nrrd | ||
Untitled.ipynb | ||
core.* | ||
|
||
projects/maastro_lung_proton_cbct_to_ct/experiments/2d_vnet_local.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Wish to contribute? Here, you can find guidelines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Documentation | ||
|
||
Our documentation is based on ![Mkdocs](https://github.com/mkdocs/mkdocs) | ||
|
||
The `/docs` folder contains pages of the documentation website, `/imgs` the media used in them. | ||
Mkdocs is configured with `../mkdocs.yaml`, located in the root of the project. | ||
|
||
To host locally, run this command from the root of the project: | ||
``` | ||
mkdocs serve | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# GANslate | ||
|
||
`ganslate` is a GAN image-to-image translation framework that is accessible both to beginners, through readable code and documentation, and to advanced users, through easy extensibility for their use-cases or ideas. | ||
|
||
Features: | ||
|
||
- 2D and 3D support | ||
- Mixed precison | ||
- Distributed training | ||
- Transparent configuration | ||
- Weights&Biases and Tensorboard logging | ||
- Natural and medical image utilities | ||
- Various generator and discriminator architectures (more coming) | ||
|
||
Available GANs: | ||
|
||
- 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)) | ||
|
||
## Table of Contents | ||
|
||
1. [Installation](installation.md) | ||
2. Usage | ||
3. Work using GANslate | ||
4. Citation | ||
|
||
## Work using GANslate | ||
|
||
- Our media paper | ||
- Our medphys paper | ||
|
||
## Citation | ||
|
||
If you use our code, please cite: | ||
|
||
```text | ||
@article{ganslate, | ||
title = {I implemented this first}, | ||
author = {Jurgen Schmidhuber} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Installation | ||
|
||
## Docker | ||
|
||
Dockerized setup is the easiest way to get started with the framework. | ||
|
||
Supported operating systems: Linux, [Windows with WSL](https://docs.nvidia.com/cuda/wsl-user-guide/index.html) | ||
|
||
Here is a step-by-step walkthrough of how to install the framework with docker, | ||
|
||
1. The docker image can be built using, | ||
|
||
```console | ||
cd docker/ | ||
docker build -t ganslate:latest . | ||
``` | ||
|
||
2. Once the docker image is built, it can be run using, | ||
|
||
```console | ||
docker run --gpus all -it \ | ||
--shm-size=24gb --volume=<data_dir>:/data --volume=<code_dir>:/code \ | ||
--name=ganslate ganslate:latest /bin/bash | ||
``` | ||
|
||
|
||
|
||
The docker container [mounts volumes from the host system](https://docs.docker.com/storage/volumes/) to allow easier persistence of data. | ||
|
||
`<data_dir>` must be replaced with the full path of a directory where your data is located. It can also point to an empty directory during setup (Data can be moved into this directory later as docker mounts the directory to the container). | ||
|
||
`<code_dir>` must be replaced with the path to the `ganslate` repository. | ||
|
||
## Conda | ||
|
||
The framework can be installed with Conda through following the steps, | ||
|
||
1. Create a [conda environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) from the `environment.yaml` file | ||
|
||
```console | ||
conda env create -f environment.yml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Your First Run With horse2zebra Dataset | ||
|
||
**Docker:** | ||
|
||
The horse2zebra dataset can be downloaded to the `<data_dir>` in the host system using instructions below, | ||
|
||
1. Open a terminal inside the cloned repository and run, | ||
|
||
```console | ||
cd projects/horse2zebra | ||
bash download_cyclegan_dataset.sh horse2zebra <data_dir> | ||
``` | ||
|
||
2. Next, the following commands are to be run in the docker container shell | ||
|
||
![docker_commands](../imgs/your_first_run_docker.png) | ||
|
||
Run the training using, | ||
|
||
```console | ||
cd /code | ||
python tools/train.py config=projects/horse2zebra/experiments/default_docker.yaml | ||
``` | ||
|
||
NOTE: If you have more than one GPU, then you can either run the training in distributed mode or set CUDA_VISIBLE_DEVICES environment variable to use only single GPUs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
site_name: GANslate | ||
|
||
nav: | ||
- Home: index.md | ||
- Installation: installation.md | ||
- Tutorials: | ||
- Your First Run: tutorials/your_first_run.md | ||
|
||
theme: readthedocs |