This repository contains the implementation of a Conditional Generative Adversarial Network (cGAN) for image generation, specifically designed for biomedical data augmentation. The project focuses on generating synthetic biomedical images to overcome challenges related to limited and diverse datasets in the medical domain.
- Introduction
- Environment Setup
- Data Loading and Preprocessing
- Model Architecture
- Training Strategy
- Output Interpretation
- Conclusion
Biomedical imaging is crucial for medical research and diagnosis, but limited annotated datasets pose challenges for machine learning models. This project leverages cGANs to generate synthetic biomedical images for data augmentation. Two datasets, MNIST and CelebA, are used to showcase the model's versatility.
- Use GPU if available (
cuda
). - Set the number of workers for the data loader (
workers
). - Configure batch size, image size, and other hyperparameters in
config.py
.
- MNIST dataset: Grayscale handwritten digits.
- CelebA dataset: Color images of celebrity faces.
- Preprocessing involves resizing, normalization, and transformations.
- Weight initialization function for stable training.
- Transpose convolutional layers for generating synthetic images.
- Conditional information is incorporated for targeted synthesis.
- Convolutional layers for binary classification of real and generated images.
- Leaky ReLU activations and batch normalization for stability.
- Binary Cross Entropy (BCE) loss for discriminator and generator.
- Adam optimizers for efficient gradient-based optimization.
- Alternating updates for discriminator and generator.
- Key performance metrics include Loss_D, Loss_G, D(x), and D(G(z)).
- Loss_D: Discriminator loss.
- Loss_G: Generator loss.
- D(x): Average output of discriminator for real batch.
- D(G(z)): Average discriminator outputs for fake batch.
- Interpretation of training loop output metrics.
- Understanding Loss_D, Loss_G, D(x), and D(G(z)).
In conclusion, this project demonstrates the implementation and training of a cGAN for biomedical data augmentation. The model's ability to conditionally generate images with specific attributes enhances its adaptability to different biomedical applications.
- [MUHIRWA SALOMON]
This project is licensed under the African Masters in Machine Intelligence.