Skip to content

This project explores the use of Generative Adversarial Networks (GANs) including DCGAN, ACGAN, and ProGAN to create realistic synthetic chest X-ray images. It aims to enhance medical imaging datasets and improve the performance of diagnostic AI models, especially in data-scarce scenarios.

Notifications You must be signed in to change notification settings

fahadmujawar/X-Ray-GAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-Ray GAN

Overview

X-Ray GAN is a deep learning project aimed at generating synthetic chest X-ray images using various Generative Adversarial Network (GAN) architectures. The primary goal is to augment medical imaging datasets, facilitating improved training for diagnostic models, especially in scenarios with limited data availability.

Table of Contents

Project Structure

  • ACGAN/: Contains implementation details for the Auxiliary Classifier GAN.
  • DCGAN/: Contains implementation details for the Deep Convolutional GAN.
  • ProGAN/: Contains implementation details for the Progressive Growing GAN.
  • Generated-images/: Stores the synthetic images generated by the models.
  • PSNR.py: Script to compute the Peak Signal-to-Noise Ratio between images.
  • pre-processing.py: Script for preprocessing the dataset before training.
  • ssim-progan.ipynb: Jupyter Notebook to compute the Structural Similarity Index Measure for ProGAN outputs.

Dataset

The project utilizes chest X-ray images sourced from publicly available datasets. Ensure that the dataset is organized appropriately before initiating the training process.

Preprocessing

Before training, images undergo preprocessing steps such as resizing, normalization, and, if necessary, augmentation. The pre-processing.py script automates this process.

Model Architectures

ACGAN

The Auxiliary Classifier GAN introduces a classifier in the discriminator to provide additional label information, enhancing the quality of generated images.

DCGAN

The Deep Convolutional GAN employs convolutional layers in both the generator and discriminator, suitable for generating high-quality images.

ProGAN

The Progressive Growing GAN starts with low-resolution images and progressively increases the resolution during training, leading to more stable training and better quality outputs.

Training

Each GAN architecture has its dedicated training scripts and configurations within their respective directories. Training involves:

  • Setting up the environment and dependencies.
  • Running the training script specific to the chosen GAN architecture.
  • Monitoring the training process and saving model checkpoints.

Evaluation Metrics

  • PSNR (Peak Signal-to-Noise Ratio): Evaluates the quality of the generated images compared to real images.
  • SSIM (Structural Similarity Index Measure): Measures the similarity between two images, focusing on structural information.

Use PSNR.py and ssim-progan.ipynb to compute these metrics for the generated images.

Generated Images

Synthetic images produced by the GAN models are stored in the Generated-images/ directory. These images can be used for further analysis, augmentation, or training of other models.

Usage

Clone the Repository:

git clone https://github.com/fahadmujawar/X-Ray-GAN.git
cd X-Ray-GAN

Preprocess the Dataset:

python pre-processing.py

Train the Model:

Navigate to the desired GAN directory and run the training script:

cd DCGAN  # or ACGAN, ProGAN
python train.py

Evaluate the Model:

Use the provided scripts to compute PSNR and SSIM for the generated images:

python PSNR.py
# or open and run the Jupyter notebook:
jupyter notebook ssim-progan.ipynb

About

This project explores the use of Generative Adversarial Networks (GANs) including DCGAN, ACGAN, and ProGAN to create realistic synthetic chest X-ray images. It aims to enhance medical imaging datasets and improve the performance of diagnostic AI models, especially in data-scarce scenarios.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •