PlasmoSENet β€” Malaria Parasite Detection

A custom CNN designed from scratch for automated malaria parasite detection in Giemsa-stained thin blood smear microscopy images.

Results

Metric Value
Test Accuracy (with TTA) 97.93%
Test Accuracy (without TTA) 98.01%
Sensitivity 97.19%
Specificity 98.65%
Precision 98.57%
F1 Score 97.88%
Parameters 2,107,094 (~8 MB)

Trained from scratch on the NIH Malaria Cell Images Dataset (27,558 images). Achieves near-parity with MobileNetV2 fine-tuned baseline (97.97%) while using 38% fewer parameters and no pretrained weights.

Architecture

PlasmoSENet integrates five domain-specific design elements:

  1. Multi-scale stem β€” parallel 3x3/5x5/7x7 convolutions calibrated to Plasmodium erythrocytic stage dimensions
  2. SE channel attention β€” stain-aware feature weighting in every residual block
  3. Hybrid residual design β€” standard convolutions (stages 1-2) + depthwise separable inverted residuals (stages 3-4)
  4. Stochastic depth β€” linear drop path (0.0 to 0.1) across 9 blocks
  5. Kaiming initialization β€” stable from-scratch convergence without pretrained weights

Usage

import torch
from plasmosenet import PlasmoSENet
from torchvision import transforms
from PIL import Image

model = PlasmoSENet(num_classes=2)
model.load_state_dict(torch.load("model.pth", map_location="cpu"))
model.eval()

transform = transforms.Compose([
    transforms.Resize((224, 224)),
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
])

image = Image.open("cell_image.png").convert("RGB")
input_tensor = transform(image).unsqueeze(0)

with torch.no_grad():
    output = model(input_tensor)
    prediction = output.argmax(dim=1).item()

classes = ["Parasitized", "Uninfected"]
print(f"Prediction: {classes[prediction]}")

Training

git clone https://github.com/Svetozar-Technologies/LocalMedScan-Models.git
cd LocalMedScan-Models
pip install -r requirements.txt
python scripts/train_plasmosenet.py --data-dir test_data/malaria/cell_images

Citation

If you use this model, please cite the repository:

@software{plasmosenet2026,
  title={PlasmoSENet: A Multi-Scale Squeeze-and-Excitation Residual Network for Malaria Detection},
  author={Svetozar Technologies},
  year={2026},
  url={https://github.com/Svetozar-Technologies/LocalMedScan-Models}
}

License

MIT

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