Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rekalantar/patchbased_3dcyclegan_ct_synthesis
Patch-based 3D Cycle-GAN for volumetric medical image synthesis
https://github.com/rekalantar/patchbased_3dcyclegan_ct_synthesis
cyclegan-tensorflow deeplearning gan generative-adversarial-network generative-model medical-imaging synthesis tensorflow-tutorials
Last synced: 4 months ago
JSON representation
Patch-based 3D Cycle-GAN for volumetric medical image synthesis
- Host: GitHub
- URL: https://github.com/rekalantar/patchbased_3dcyclegan_ct_synthesis
- Owner: rekalantar
- License: mit
- Created: 2022-11-29T17:47:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-26T07:51:03.000Z (over 1 year ago)
- Last Synced: 2024-09-23T07:33:48.008Z (4 months ago)
- Topics: cyclegan-tensorflow, deeplearning, gan, generative-adversarial-network, generative-model, medical-imaging, synthesis, tensorflow-tutorials
- Language: Python
- Homepage:
- Size: 16.9 MB
- Stars: 18
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 3D Cycle-GAN TensorFlow
Cycle-consistent generative adversarial network (Cycle-GAN) is an unsupervised approach for image synthesis. In medical imaging, it promises to provide a tool for intricate data augmentation. Although some clinical studies report that GANs may generate unrealistic features in some cases, they are still promising tools for image generation with high visual fidelity. This repository provides the code for 3D patch-based synthesis of medical images using Cycle-GAN.
### Architecture
![](https://github.com/rekalantar/CycleGAN3D_Tensorflow/blob/main/images/cyclegan.png)### Contrast removal from CT
![](https://github.com/rekalantar/CycleGAN3D_Tensorflow/blob/main/images/contrastremoval.gif)## Usage
Create a virtual environment to install the prerequisites. If there are issues with tensorflow-gpu, cuda and cuDNN version mismatch, use Anaconda or conda-forge to install the requirements. The working versions of the Nvidia cuda driver, tensorflow-gpu, cudatoolkit and cudnn can be found [here](https://medium.com/@rekalantar/gpu-enabled-tensorflow-pytorch-setup-without-manually-installing-cuda-and-cudnn-conda-forge-52cf43b6ddd6).```bash
conda create -n tfgpu
conda activate tfgpu
conda install tensorflow-gpu -c conda-forge
```The code benefits from [Monai](https://monai.io/) which is a Torch-based medical imaging library for custom preprocessing and caching of medical images. The preprocessing operations are performed in the dataloader.py file with specifications defned in the config.py file. The training specifications can be defined via the arguments defiend in the main.py file.
The expected directories are as follows:
```bash
|--directory
|----train
|----A
|----xxx.nii.gz, xxx.nii.gz, ...
|----B
|----xxx.nii.gz, xxx.nii.gz, ...
|----test
|----A
|----xxx.nii.gz, xxx.nii.gz, ...
|----B
|----xxx.nii.gz, xxx.nii.gz, ...
```For using other image formats, make the desired changes in the dataloader.py file.
Train:
```bash
python main.py path/to/data/directory path/to/save/results
```The inference code will be released soon.