This project aims to generate synthetic chest X-ray images using conditional Generative Adversarial Networks (cGANs) and further improve the accuracy of pneumonia detection using these generated images.
Chest X-ray images are crucial for diagnosing various respiratory diseases, including pneumonia. However, obtaining a large and diverse dataset of chest X-ray images for training machine learning models can be challenging due to privacy concerns and data availability. This project addresses this challenge by generating synthetic chest X-ray images using cGANs, which can then be used to augment existing datasets.
- Synthetic Image Generation: Utilizes conditional Generative Adversarial Networks (GANs) to generate synthetic chest X-ray images.
- Data Augmentation: Augments existing chest X-ray datasets with synthetic images to improve model performance.
- Pneumonia Detection: Trains a deep learning model for pneumonia detection using the augmented dataset.
- Web Application: Provides a Streamlit-based web application for users to upload chest X-ray images and receive predictions on pneumonia diagnosis.
The project utilizes a pre-trained Vision Transformer (ViT) model that has been fine-tuned on the Chest X-ray Pneumonia dataset. The model was initially pre-trained on the ImageNet 1K dataset and then customized to classify normal or pneumonia images.
To run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Raghucharan16/SyntheticImageGeneration.git cd SyntheticImageGeneration pip install -r requirements.txt
- Generate Synthetic Images:
Run the GAN model to generate synthetic chest X-ray images.
- Data Augmentation:
Augment existing chest X-ray datasets with the generated synthetic images. Train Pneumonia Detection Model:
- Train a deep learning model for pneumonia detection using the augmented dataset.
- Run the Web Application:
Start the Streamlit web application to allow users to upload chest X-ray images for pneumonia diagnosis.
Contributions are welcome! Please feel free to submit issues or pull requests.