Skip to content

Krut007/MedMNIST_Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MedMNIST Classification Project

This project was developed as a BA3 school project in EPFL. It provides a framework to train and evaluate deep learning models for medical image classification using the MedMNIST dataset. It supports 2 different neural network architectures with Multi-Layer Perceptrons (MLPs) and Convolutional Neural Networks (CNNs).

Contributors

  • @Krut007
  • @Jakub-Kliment
  • @GuillaumeLepin

Installation

  1. Clone the repository:

    git clone git@github.com:Krut007/MedMNIST_Classification.git
    cd MedMNIST_Classification
  2. Install dependencies: It is recommended to use a virtual environment.

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt

Usage

The main script for training and evaluation is main.py. You can specify different options through command-line arguments.

Available arguments:

  • --data: Path to the dataset (default: "dataset").
  • --nn_type: Network architecture to use. Options: mlp, cnn (default: mlp).
  • --nn_batch_size: Batch size for training (default: 64).
  • --device: Device to use for training. Options: cpu, cuda, mps (default: mps).
  • --lr: Learning rate (default: 2e-4).
  • --max_iters: Maximum number of training epochs (default: 50).
  • --test: Use the test set for evaluation instead of a validation set.

Examples:

  • Train an MLP with default parameters:

    python main.py --nn_type mlp
  • Train a CNN for 100 epochs with a learning rate of 0.001:

    python main.py --nn_type cnn --max_iters 100 --lr 0.001
  • Evaluate on the test set:

    python main.py --test

Project Structure

.
├── main.py                # Main script to run the experiments
├── requirements.txt       # Python dependencies
├── src
│   ├── data.py            # Data loading and preprocessing
│   ├── utils.py           # Utility functions
│   └── methods
│       ├── deep_network.py  # MLP and CNN model definitions
│       └── dummy_methods.py # Dummy classifier for baseline
└── readme.md              # This file

Performance

You can find a resume of our work and performace analysis in report.pdf. Your own performance may differ from the one we find

Dependencies

The main dependencies are:

About

Neural network for data classification on MedMNIST

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages