Skip to content
ModelListedExternal
Download

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.

KindOtherVersionRevision 326a639

Model source

Kind
Other
File size
128 MB
Version
vRevision 326a639
Updated
Sep 28, 2026
Downloads
0
Source
Hugging Face

Source description

🦟 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

MetricValue
Test Accuracy97.51%
ROC AUC0.0054
ArchitectureEfficientNet-B3
Training Images19,292
Test Images4,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:

SeverityParasitemiaRecommendation
βœ… Negative0%No treatment
🟑 Mild< 10%ACT, outpatient
🟠 Moderate10–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

Sources

1 source
Hugging FacePrimaryVersion 326a639a2547b694c0b9121b6eee710505de8ecb
huggingface.co/AndreaOcepa/malaria-blood-smear-detector/tree/326a639a2547b694c0b9121b6eee710505de8ecb

Verified Sep 28

Model artifacts

1 artifact

best_model.pth

pth Β· 128 MB Β· SHA-256 e336d3634501…e666 Β· Hugging Face

Download

Source excerpts

2 excerpts

--- language: en license: apache-2.0 tags: - image-classification - medical - malaria - pytorch - efficientnet - computer-vision - africa - global-health metrics: - accuracy - roc_auc model-index: - name: efficientnet_b3-malaria-detector results: - task: type: image-classification metrics: - type: accuracy value: 0.9751 - type: roc_auc value: 0.0054 --- # 🦟 Malaria Blood Smear Detector An **EfficientNet-B3** model fine-tuned on the [NIH Malaria Cell Images Dataset](https://www.kaggle.com/datasets/iarunava/cell-images-for-detecting-malaria) 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 ```python 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 m...

Source context: 0 downloads Β· 0 likes Β· Pipeline image-classification Β· Repo AndreaOcepa/malaria-blood-smear-detector