Learn

How Fecal Classification works

From raw slide to annotated result in three gated phases. Every step is designed to reduce noise and surface actionable findings for trained clinicians.

0

Ensemble models

0

Pipeline phases

0

Detectable species

What is fecal microscopy?

Fecal microscopy is a routine clinical laboratory technique in which stool samples are examined under a microscope to detect parasitic organisms, their eggs (ova), or larvae. It remains a cornerstone of parasitology diagnostics worldwide, especially in resource-limited settings.

Experienced microscopists can identify helminth eggs by their characteristic size, shape, and internal structures. However, manual screening is time-consuming, subjective, and dependent on the operator's expertise. AI-assisted classification offers a way to standardize and accelerate this process without replacing human judgment.

The pipeline

Three phases, each a gate

Only slides that pass a phase advance to the next. This reduces false positives and ensures compute is spent where it matters most.

Phase 1

Fecal detection (ensemble)
Seven independently fine-tuned TensorFlow models — VGG19, ResNet50, DenseNet169, EfficientNetB0, MobileNetV2, NASNetMobile, and ConvNeXtBase — each analyze the uploaded slide. Their binary outputs (fecal vs non-fecal) are combined through majority voting. If four or more models agree the slide contains fecal matter, it advances. Otherwise the pipeline reports non-fecal and stops.

Phase 2

Helminth screening
A dedicated binary classifier examines the confirmed fecal sample to determine whether parasitic helminths are present. If no helminths are detected, the result is recorded and the pipeline stops. Helminth-positive slides move to species-level identification.

Phase 3

Species identification
An object-detection model scans the slide for 11 known parasitic helminth species. For each species found, a bounding box is drawn directly on the microscopy image along with a confidence score, so clinicians can see exactly where the model attended.

Ensemble voting explained

Instead of relying on one model, Phase 1 runs the same image through seven distinct architectures. Each model was fine-tuned on the same fecal-detection dataset but learns different features due to its unique network design.

The seven predictions are combined via simple majority voting: if four or more models classify the slide as fecal, the consensus is “fecal.” This ensemble approach consistently outperforms any single model because individual errors are diluted by the group's agreement.

All seven models (VGG19, ResNet50, DenseNet169, EfficientNetB0, MobileNetV2, NASNetMobile, ConvNeXtBase) are available on Hugging Face.

Phase 3 species

11 detectable helminth species

When helminths are confirmed in Phase 2, the object-detection model localizes and labels eggs or organisms from these species.

Ascaris lumbricoides

Giant roundworm — most common soil-transmitted helminth worldwide

Capillaria philippinensis

Intestinal capillariasis — causes chronic diarrhea and malabsorption

Enterobius vermicularis

Pinworm — the most common helminth in temperate climates

Fasciolopsis buski

Giant intestinal fluke — largest fluke infecting humans

Hookworm egg

Ancylostoma / Necator — leading cause of iron-deficiency anemia

Hymenolepis diminuta

Rat tapeworm — uncommon in humans, usually asymptomatic

Hymenolepis nana

Dwarf tapeworm — most common cestode in humans

Opisthorchis viverrine

Liver fluke — linked to cholangiocarcinoma risk

Paragonimus spp

Lung fluke — causes paragonimiasis, mimics tuberculosis

Taenia spp. egg

Tapeworm — beef (T. saginata) or pork (T. solium) tapeworm

Trichuris trichiura

Whipworm — infects the large intestine, common in tropics

Ready to try it?

Create a free account, upload a slide, and see the pipeline in action.