<<<<<<< HEAD Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

CI Docker Image CI

MedGAN: Advanced Medical Image Generation

medgan Logo

Overview

MedGAN is a comprehensive framework for generating high-quality synthetic medical images using state-of-the-art Generative Adversarial Networks (GANs). The project focuses on brain tumor MRI scans and includes implementations of multiple cutting-edge GAN architectures optimized for medical imaging applications.

Features

Architecture Performance Comparison

Architecture Image Quality Training Stability Generation Diversity Training Speed
ProGAN ⭐⭐⭐⭐ ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐
StyleGAN2 ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐⭐⭐ ⭐⭐
WGAN-GP ⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐ ⭐⭐⭐⭐
DCGAN ⭐⭐⭐ ⭐⭐⭐ ⭐⭐ ⭐⭐⭐⭐⭐

Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/mozaloom/medgan.git
cd medgan
  1. Install required packages:
pip install -r requirements.txt
  1. Run the web application:
python app.py
  1. Access the web interface at http://localhost:5000

Usage

Web Application

The MedGAN web application offers two primary functionalities:

  1. Generate synthetic brain MRI scans:

    • Select tumor type (Glioma, Meningioma, Pituitary)
    • Choose GAN architecture
    • Generate high-quality synthetic MRI images
  2. Detect tumor types:

    • Upload brain MRI scans
    • Receive AI-powered tumor classification
    • View detection confidence scores

Check the individual model implementation files for specific training parameters.

Project Structure

medgan/
├── app.py                   # Flask web application
├── medgan/                  # Core GAN implementations
│   ├── dcgan.py
│   ├── progan.py
│   ├── stylegan.py
│   ├── wgan.py
│   └── vit.py
├── models/                  # Pre-trained model weights
├── notebooks/               # Training notebooks
│   ├── dcgan/
│   ├── progan/
│   ├── stylegan/
│   └── wgan/
├── static/                  # Web assets
└── templates/               # HTML templates

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments