{"id":14958738,"url":"https://github.com/rekalantar/patchbased_3dcyclegan_ct_synthesis","last_synced_at":"2025-10-24T16:30:30.042Z","repository":{"id":63967351,"uuid":"572171156","full_name":"rekalantar/PatchBased_3DCycleGAN_CT_Synthesis","owner":"rekalantar","description":"Patch-based 3D Cycle-GAN for volumetric medical image synthesis","archived":false,"fork":false,"pushed_at":"2023-10-26T07:51:03.000Z","size":17765,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-31T02:37:26.357Z","etag":null,"topics":["cyclegan-tensorflow","deeplearning","gan","generative-adversarial-network","generative-model","medical-imaging","synthesis","tensorflow-tutorials"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rekalantar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-29T17:47:13.000Z","updated_at":"2024-11-28T16:55:24.000Z","dependencies_parsed_at":"2023-01-14T16:45:38.977Z","dependency_job_id":"d259b497-c521-4ce6-9dec-1cc7ca60c76a","html_url":"https://github.com/rekalantar/PatchBased_3DCycleGAN_CT_Synthesis","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"10f6ff3a78a7a0abe7136d8fff94a77a264c3f3d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalantar%2FPatchBased_3DCycleGAN_CT_Synthesis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalantar%2FPatchBased_3DCycleGAN_CT_Synthesis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalantar%2FPatchBased_3DCycleGAN_CT_Synthesis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalantar%2FPatchBased_3DCycleGAN_CT_Synthesis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rekalantar","download_url":"https://codeload.github.com/rekalantar/PatchBased_3DCycleGAN_CT_Synthesis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237999434,"owners_count":19399880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cyclegan-tensorflow","deeplearning","gan","generative-adversarial-network","generative-model","medical-imaging","synthesis","tensorflow-tutorials"],"created_at":"2024-09-24T13:18:11.159Z","updated_at":"2025-10-24T16:30:25.378Z","avatar_url":"https://github.com/rekalantar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 3D Cycle-GAN TensorFlow\n\nCycle-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. \n\n### Architecture\n![](https://github.com/rekalantar/CycleGAN3D_Tensorflow/blob/main/images/cyclegan.png)\n\n### Contrast removal from CT\n![](https://github.com/rekalantar/CycleGAN3D_Tensorflow/blob/main/images/contrastremoval.gif)\n\n## Usage\nCreate 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). \n\n```bash\nconda create -n tfgpu\nconda activate tfgpu\nconda install tensorflow-gpu -c conda-forge\n```\n\nThe 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.\n\nThe expected directories are as follows:\n\n```bash\n|--directory\n       |----train\n              |----A\n                   |----xxx.nii.gz, xxx.nii.gz, ...\n              |----B\n                   |----xxx.nii.gz, xxx.nii.gz, ...\n       |----test\n              |----A\n                   |----xxx.nii.gz, xxx.nii.gz, ...\n              |----B\n                   |----xxx.nii.gz, xxx.nii.gz, ...\n```\n\nFor using other image formats, make the desired changes in the dataloader.py file.\n\nTrain:\n```bash\npython main.py path/to/data/directory path/to/save/results\n```\n\nThe inference code will be released soon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frekalantar%2Fpatchbased_3dcyclegan_ct_synthesis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frekalantar%2Fpatchbased_3dcyclegan_ct_synthesis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frekalantar%2Fpatchbased_3dcyclegan_ct_synthesis/lists"}