AI-assisted malaria risk assessment tool that combines deep learning-based blood smear image analysis with a clinical symptom checker.
- AI Image Analysis — MobileNetV2-based CNN classifies thin blood smear cell images as Parasitized or Uninfected
- Symptom Checker — Rule-based scoring with weighted malaria symptoms
- Risk Dashboard — Aggregated risk level (Low/Medium/High) with breakdown and recommendations
- Responsive UI — Medical-themed interface, works on desktop and tablet
python -m venv venv
source venv/bin/activate # Linux/macOS
# venv\Scripts\activate # Windows
pip install -r requirements.txtThe training script automatically downloads the NIH Malaria Cell Images dataset (~350 MB) on first run.
python model_train.pyThis will:
- Download and extract the dataset
- Train a MobileNetV2-based classifier (~20 epochs with early stopping)
- Save the model to
models/malaria_detector.keras - Generate evaluation metrics and plots in
models/
Training takes approximately 15–30 minutes on CPU, ~5 minutes with GPU.
python app.pyOpen http://127.0.0.1:5000 in your browser.
- Patient Intake — Enter patient details and select symptoms
- Image Upload — Drag-and-drop a Giemsa-stained thin blood smear cell image
- Analysis — The AI model classifies the cell image; symptoms are scored with weighted rules
- Risk Score — Final risk = 60% model confidence + 40% symptom score
- Results — Dashboard shows risk level, breakdown, and actionable recommendations
malaria/
├── app.py # Flask backend & API
├── config.py # Centralized configuration
├── model_train.py # ML training pipeline
├── requirements.txt # Python dependencies
├── .gitignore
├── templates/
│ ├── index.html # Patient intake form
│ └── result.html # Result dashboard
├── static/
│ ├── css/style.css # Medical-themed styling
│ └── js/script.js # Client-side logic
├── models/ # Trained model & evaluation artifacts
└── uploads/ # Temporary image storage (auto-cleaned)
| Component | Weight |
|---|---|
| ML Model Confidence | 60% |
| Symptom Score | 40% |
| Risk Level | Score Range |
|---|---|
| Low | < 35% |
| Medium | 35% – 65% |
| High | > 65% |
See roadmap.md Section 7 for full scoring specification.
- Source: NIH Malaria Cell Images Dataset
- Size: 27,558 cell images (13,779 parasitized, 13,779 uninfected)
- Format: PNG images of individual cells from Giemsa-stained thin blood smears
This tool is for research and educational purposes only. It is not a substitute for professional medical diagnosis. Always consult a qualified healthcare provider for definitive malaria testing and treatment.