An open API service indexing awesome lists of open source software.

https://github.com/stifler7/medmnist-edgeai

MedMNIST-EdgeAI -> an end-to-end exploration into model distillation, optimization, and deployment for resource-constrained environments, all centered around the MedMNIST medical imaging dataset.
https://github.com/stifler7/medmnist-edgeai

aiforgood deep-learning edge-ai knowledge-distillation medmnist model-optimization open-source-research scalable-ai strategic-ai

Last synced: 3 months ago
JSON representation

MedMNIST-EdgeAI -> an end-to-end exploration into model distillation, optimization, and deployment for resource-constrained environments, all centered around the MedMNIST medical imaging dataset.

Awesome Lists containing this project

README

          

Here’s a simplified, casual version of the README.md with emojis, avoiding code formatting. This should make it more user-friendly and easier to follow:

---

# MedMNIST-EdgeAI πŸ©ΊπŸ€–

Welcome to **MedMNIST-EdgeAI**! This project focuses on classifying medical images efficiently using deep learning, specifically **EfficientNetB3**. The goal is to create a model optimized for edge devices by using the **MedMNIST** dataset. Our current implementation is designed to train and evaluate the model, with plans to make it even more efficient for deployment on edge devices. πŸš€

---

## Table of Contents πŸ“‘

- [Overview](#overview)
- [Requirements](#requirements)
- [Installation](#installation)
- [Dataset](#dataset)
- [Model Architecture](#model-architecture)
- [Training](#training)
- [Evaluation](#evaluation)
- [Usage](#usage)
- [Results](#results)
- [Future Work](#future-work)
- [License](#license)

---

## Overview πŸ’‘

MedMNIST-EdgeAI is all about optimizing **EfficientNetB3** for medical image classification tasks. The project is designed to run efficiently on edge devices (like mobile or embedded systems), so the model size and computational requirements are reduced.

Key Features:
- **EfficientNetB3** architecture for high accuracy and efficiency πŸ’ͺ
- Optimized for running on **edge devices** πŸ–₯️
- Using **MedMNIST** dataset for medical image classification 🩺

---

## Requirements πŸ› οΈ

Before running the project, make sure you have the following installed:

- **TensorFlow** (for model training)
- **Keras** (for building models)
- **NumPy** (for data handling)
- **Matplotlib** (for plotting)
- **Pandas** (for data manipulation)
- **Scikit-learn** (for model evaluation)
- **Wandb** (for experiment tracking)

To install the required dependencies, simply run:

```
pip install -r requirements.txt
```

---

## Installation πŸ”§

1. Clone the repository:

```bash
git clone https://github.com/your-username/MedMNIST-EdgeAI.git
cd MedMNIST-EdgeAI
```

2. Install dependencies:

```bash
pip install -r requirements.txt
```

3. Download the **MedMNIST** dataset or place it in the `data/` directory.

---

## Dataset πŸ“š

The project uses the **MedMNIST** dataset, which contains various medical images (e.g., dermatology, X-ray). The data should be placed in the following structure:

```
MedMNIST-EdgeAI/
β”‚
β”œβ”€β”€ data/
β”‚ β”œβ”€β”€ train/
β”‚ β”œβ”€β”€ val/
β”‚ └── test/
└── ...
```

Make sure to download the dataset from [here](https://github.com/MedMNIST/MedMNIST) and place it in the `data/` folder.

---

## Model Architecture πŸ—οΈ

We’re using **EfficientNetB3**, a state-of-the-art convolutional neural network architecture known for its balance between performance and computational efficiency. It’s perfect for edge deployment.

Key details:
- **EfficientNetB3** as the base model
- Input size: `(300, 300, 3)`
- Fine-tuned for medical images with reduced complexity

---

## Training πŸš‚

### Steps to Train:

1. Ensure the dataset is in the `data/` folder, with subfolders for `train/`, `val/`, and `test/`.

2. Run the training script by simply executing:

```bash
python train.py
```

### Hyperparameters:
- **Epochs**: 20 (or adjust based on your needs)
- **Batch Size**: 32 (or adjust as needed)

---

## Evaluation 🧐

After training, you can evaluate the model on the test set to see how well it performs. To evaluate the model, run:

```bash
python evaluate.py
```

The evaluation will give you metrics such as accuracy, precision, recall, and F1 score to assess the model’s performance. πŸ“Š

---

## Usage 🧠

Once the model is trained, you can use it to make predictions on new medical images. Here’s how to do it:

1. Load the trained model.
2. Prepare your image (make sure it’s resized to `300x300`).
3. Run the model to predict the class.

---

## Results πŸ“ˆ

Current model performance on the test set:

- **Accuracy**: 85% βœ…
- **Precision**: 0.83 πŸ”
- **Recall**: 0.80 πŸ’―
- **F1 Score**: 0.81 🌟

(These numbers are placeholders, so replace them with your actual results after evaluation.)

---

## Future Work πŸš€

Here’s what’s next on the agenda:

- **Quantization** to make the model even more lightweight for edge deployment πŸƒβ€β™‚οΈ
- **Distillation** for creating smaller models without sacrificing too much accuracy πŸ§‘β€πŸ«
- Add more datasets for **multi-class classification** πŸ”¬

---

## License πŸ“

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

---

Feel free to reach out if you have any questions or suggestions! Let’s make healthcare smarter and more efficient together. πŸ’‘πŸŒ

---

This format is more approachable, with explanations and emojis to make it easier to read and understand. You can always adjust or add more details as your project progresses! Let me know if you need further modifications.