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.
- Host: GitHub
- URL: https://github.com/stifler7/medmnist-edgeai
- Owner: STiFLeR7
- License: mit
- Created: 2025-05-24T06:31:27.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-06-06T06:42:31.000Z (5 months ago)
- Last Synced: 2025-06-06T07:28:32.571Z (5 months ago)
- Topics: aiforgood, deep-learning, edge-ai, knowledge-distillation, medmnist, model-optimization, open-source-research, scalable-ai, strategic-ai
- Language: Python
- Homepage:
- Size: 88.8 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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.