🦟 Malaria Blood Smear Detector

An EfficientNet-B3 model fine-tuned on the NIH Malaria Cell Images Dataset to automatically detect and classify malaria parasites in blood smear microscopy images.

Developed to address the critical diagnostic bottleneck in Uganda and Sub-Saharan Africa, where malaria remains the leading cause of death and rural health centers are severely understaffed.

🎯 Model Performance

Metric Value
Test Accuracy 97.51%
ROC AUC 0.0054
Architecture EfficientNet-B3
Training Images 19,292
Test Images 4,135

πŸ“‹ Classes

  • Parasitized (0): Blood cell infected with Plasmodium parasite
  • Uninfected (1): Healthy red blood cell

πŸ₯ Severity Classification

Cell-level predictions aggregate to smear-level severity:

Severity Parasitemia Recommendation
βœ… Negative 0% No treatment
🟑 Mild < 10% ACT, outpatient
🟠 Moderate 10–25% Hospital observation
πŸ”΄ Severe > 25% Urgent: IV artesunate

πŸš€ Quick Start

import torch
import timm
import json
from huggingface_hub import hf_hub_download
from PIL import Image
import albumentations as A
from albumentations.pytorch import ToTensorV2
import numpy as np

# Download model weights
model_path = hf_hub_download(
    repo_id="YOUR_HF_USERNAME/malaria-blood-smear-detector",
    filename="best_model.pth"
)

# Load model
backbone = timm.create_model('efficientnet_b3', pretrained=False, num_classes=0, global_pool='avg')
# ... (see full example in the Gradio Space)

🌍 Context & Impact

In Uganda, malaria accounts for 30–50% of outpatient visits and is the #1 killer of children under 5. Manual microscopy diagnosis requires trained technicians, takes 30+ minutes per slide, and is prone to fatigue-induced errors. This model enables:

  • ⚑ 10-second automated diagnosis replacing 30-minute manual reading
  • 🎯 Consistent results regardless of technician experience or fatigue
  • πŸ“± Deployable anywhere β€” runs on any internet-connected device
  • πŸ₯ Clinical triage support for overwhelmed rural health centers

⚠️ Disclaimer

This model is intended as a clinical decision support tool, not a replacement for medical diagnosis. All results should be reviewed by a qualified healthcare professional. Not for standalone diagnostic use.

πŸ“š Dataset

  • Source: NIH Malaria Cell Images Dataset
  • Size: 27,558 cell images (balanced: 13,779 per class)
  • Original paper: Rajaraman et al. (2018), Pre-trained convolutional neural networks as feature extractors for malaria parasite detection β€” PeerJ
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using AndreaOcepa/malaria-blood-smear-detector 1

Evaluation results