⚠️ Research & Demonstration Only: This system is an educational benchmark trained on the MedMNIST v2 DermaMNIST dataset. It is not an FDA-approved medical diagnostic device and must never be used for actual clinical decision-making.
DermaMNIST AI is a full-stack, production-ready machine learning application designed to classify dermatoscopic images into one of 7 distinct skin lesion categories. Transitioning from a raw Jupyter Notebook to a deployable microservice architecture, this project features an ultra-fast REST API and a premium, glassmorphic Next.js web interface.
- Input Tensor:
3 × 28 × 28(RGB) - Architecture: 7-Class Diagnostic Triage (SimpleCNN / ResNet18)
- Base Accuracy: ~69.99%
- Macro OvR AUC: ~0.8803
The application is decoupled into a frontend client and a stateless backend inference API, connected seamlessly via Docker.
- Framework: Next.js 14+ (App Router)
- Styling: Tailwind CSS (Dark HUD / Glassmorphic Aesthetic)
- Language: TypeScript
- Features: Drag-and-drop file upload, fluid animations, dynamic layout shifts, visual probability distribution bars.
- Framework: FastAPI
- ML Engine: PyTorch (
torch,torchvision) - Features: Asynchronous request handling, deterministic preprocessing pipeline, CORS configuration, isolated virtual environment (Dockerized).
The easiest way to run the entire stack locally is using Docker.
- Docker installed on your machine.
-
Clone the repository:
git clone https://github.com/0xNunana/DermaMNIST.git cd DermaMNIST -
Spin up the services:
docker-compose up --build
-
Access the application:
- Frontend UI: http://localhost:3000
- Backend API Docs: http://localhost:8000/docs
This repository is structured for effortless cloud deployment using split hosting.
The backend requires a Docker container environment to serve the PyTorch model.
- Connect your GitHub repository to Render.
- Create a new Web Service.
- Set the Root Directory to
backend. - Render will automatically build the
Dockerfileand expose your API. - Note the generated URL (e.g.,
https://your-api.onrender.com).
Next.js applications deploy natively to Vercel with zero configuration.
- Connect your GitHub repository to Vercel.
- Select the
frontendfolder as the Root Directory. - Add the Environment Variable:
NEXT_PUBLIC_API_URL=https://your-api.onrender.com
- Deploy!
Security Tip: Once the frontend is live, go back to your backend hosting platform and set the
ALLOWED_ORIGINSenvironment variable to your frontend's Vercel URL to secure the API.
- Actinic Keratoses and Intraepithelial Carcinoma
- Basal Cell Carcinoma
- Benign Keratosis-like Lesions
- Dermatofibroma
- Melanoma (High Risk)
- Melanocytic Nevi
- Vascular Lesions
The underlying DermaMNIST model and experimental work were developed as part of a collaborative academic project at the OTH Regensburg as part of the International Summer School 2026: Trustworthy AI – Machine Learning Meets Blockchain programme, under the supervision of Tobias Rueckert.
- Sean Chye
- Tan Xian Guang
- Paul Yao Kudaya
- Tan Zheng Liang
- Paul Yao Kudaya
This deployment extends the original collaborative research work with a production-oriented web interface and model inference service, providing an interactive demonstration of the trained computer vision model.