How talhasaleemm/malaria-detection works
This is a malaria microscopy object-detection product: users upload slides or videos and receive localized parasite detections and annotated results. The documented image flow runs from the Streamlit dashboard through a FastAPI endpoint to SAHI/YOLO inference and back for display; the dashboard also processes videos frame by frame. The repository additionally includes dataset preparation, model training, and validation workflows. Edges follow the README or shown source references; some training and dataset-stage connections are omitted because their runtime wiring is not shown.
Main entry points: app.py Streamlit dashboard · production_model.pt YOLO weights · main.py Inference API · validate_real.py Real-data validation
Components 15
Clinical workflows
- Streamlit dashboard
src/app.py - Inference API
src/main.py - Slide results
src/app.py - Video processor
src/video_processor.py
Detection inference
- SAHI inference
src/main.py - YOLO weights
models/production_model.pt - Folder detection
src/detect_folder.py
Dataset preparation
- Cell image inputs
cell_images - Synthetic slide compositor
src/data_pipeline.py - IML dataset inputs
temp_iml_dataset - IML annotation converter
src/convert_iml_to_yolo.py - YOLO dataset
Model workflows
- YOLO training
src/train_yolo.py - Real-data validation
src/validate_real.py
Other components
- Clinical user
Connections 19
- Clinical user → Streamlit dashboard: uploads slide/video
README.md - Streamlit dashboard → Inference API: posts slide
README.md - Inference API → SAHI inference: runs inference
src/main.py - SAHI inference → YOLO weights: loads weights
- SAHI inference → Inference API: returns detections
README.md - Inference API → Streamlit dashboard: returns JSON
README.md - Streamlit dashboard → Slide results: renders annotations
src/app.py - Streamlit dashboard → Video processor: invokes processing
src/app.py - Video processor → YOLO weights: loads weights
src/video_processor.py - Streamlit dashboard → Clinical user: shows results
README.md - Cell image inputs → Synthetic slide compositor: supplies cells
src/data_pipeline.py - IML dataset inputs → IML annotation converter: supplies annotations
src/convert_iml_to_yolo.py - IML annotation converter → YOLO dataset: writes YOLO data
src/convert_iml_to_yolo.py - Synthetic slide compositor → YOLO dataset: generates training data
- YOLO dataset → YOLO training: trains on data
- YOLO training → YOLO weights: produces weights
- Folder detection → YOLO weights: loads weights
src/detect_folder.py - Real-data validation → YOLO weights: loads weights
src/validate_real.py - Real-data validation → YOLO dataset: reads test split
src/validate_real.py