Source-linked AI summary

CoSWA-YOLOv12: Scale-Invariant Tiny Object Detection and Segmentation of Malaria Parasites

Ahmed Tahiru Issah, Carine Mukamakuza

arXiv:2609.29527v1cs.CVcs.AI

TL;DR

Tiny early-stage P. falciparum rings are difficult to detect because overlap-based training signals weaken at their scale, while uniform Wasserstein treatment can loosen supervision for larger objects. CoSWA-YOLOv12 adapts that treatment to object size and adds transfer-safe components; it improves strict localisation across classes and raises P. falciparum recall.

  • Problem

    Overlap-based assignment starves tiny targets of positive samples and overlap-based regression gives weak gradients, while applying NWD uniformly can loosen supervision for larger objects.

    Source: §1 · p. 2
  • Method

    CoSWA-YOLOv12 uses size-adaptive Wasserstein assignment with a wavelet detail residual and M2-NWD, with each addition initialized to reproduce the pretrained model exactly.

    Source: §1 · pp. 2–3
  • Results

    CoSWA-YOLOv12 improves mAP@50-95 for both mask (0.630 →0.674) and box (0.642 →0.682), and P. falciparum recall rises from 0.63 to 0.74.

    Source: §4.2 · p. 6, §4.3 · p. 7
  • Takeaways & Limitations

    The reported results support selectively resolving the scale conflict to recover P. falciparum detection while larger classes retain or improve localisation.

    Source: §4.3 · p. 7, §5 · p. 8

    The evaluation is single-site, leaving cross-site robustness as a next step.

    Source: Limitations and future work · p. 8

Abstract

from arXiv · show

Automated microscopy could widen access to malaria diagnosis in low-resource settings, but the deadliest species, P. falciparum, presents in its early ring stage as an object only a few tens of pixels wide. Such tiny targets are systematically under-detected: overlap-based label assignment starves them of positive samples, and overlap-based box regression gives weak gradients at their scale. The Normalized Gaussian Wasserstein Distance (NWD) repairs both effects, but applied uniformly across a slide that also holds objects three to four times larger it loosens their supervision and erodes their localisation, so overall accuracy can fall even as the tiny class improves. We present CoSWA-YOLOv12, a compact YOLOv12 instance-segmentation detector whose core Cooperative Scale-adaptive Wasserstein Assignment routes the Wasserstein treatment to an object in inverse proportion to its size, tapering back to standard assignment for larger species. Two further components support it: a wavelet detail residual, and a min-max Gaussian regression loss (M2-NWD). All three additions are transfer-safe: each reproduces the standard pretrained model exactly at initialisation, so public pretrained weights load without any loss of accuracy. On a five-class Rwandan thick-smear dataset, CoSWA-YOLOv12 raises P. falciparum recall from 0.63 to 0.74 and mAP@50 from 0.73 to 0.81 (mask), cuts missed P. falciparum from 38% to 15%, and improves strict-localisation mAP@50-95 on all five classes for both detection and segmentation, while a 2x2 ablation shows the scale gate and the regression loss are synergistic.

1 Introduction and Background

CoSWA-YOLOv12 targets the scale conflict that makes early P. falciparum rings difficult to detect: it adapts Wasserstein assignment to object size and adds transfer-safe components. The work is motivated by the need for accurate, lightweight screening where skilled microscopists are scarce.

1 Introduction and Background

  • Automated analysis of digitized smears could support screening in endemic districts where skilled microscopists are scarce, provided models are accurate and lightweight enough for modest hardware.The cited background reports 263 million malaria cases and 597,000 deaths worldwide in 2023, with more than 90% in sub-Saharan Africa.Source: §1 · pp. 1–2
  • Early P. falciparum rings are often under 20 × 20 pixels and are readily confused with debris, making recall on this class clinically decisive.The passage frames a missed parasite as a missed diagnosis.Source: §1 · p. 2
  • The scale conflict arises because overlap-based assignment and regression provide weak supervision for tiny boxes, while uniform Wasserstein treatment can loosen supervision for larger objects.The passages contrast a 34-pixel ring with a 100-pixel gametocyte or leukocyte.Source: §1 · p. 2
  • CoSWA-YOLOv12 scales Wasserstein assignment by object size, tapering toward standard overlap assignment for larger objects.Its components are initialized to reproduce the standard pretrained model exactly, allowing public weights to load without initial accuracy loss.Source: §1 · p. 2
  • The supporting components are a wavelet detail residual that preserves high-frequency structure and M2-NWD, a min-max Gaussian regression loss that collapses to baseline at initialization.The contributions also report a controlled factorial study with synergistic effects from the scale gate and regression loss.Source: §1 · pp. 2–3

2 Previous Work

Prior malaria microscopy work uses YOLO-family detectors for fast joint localization and classification, with attention and segmentation modules also explored. Tiny-object methods either preserve spatial resolution or change the training signal; CoSWA-YOLOv12 conditions the latter on object size.

Deep learning for malaria microscopy

  • YOLO-family single-stage detectors process whole fields of view, jointly localize and classify parasites, and run fast enough for point-of-care use.Prior work also reports sensitivity gains from attention and parasite-specific modules, and pixel-level segmentation masks for separating parasites from thick-smear debris.Source: Deep learning for malaria microscopy · p. 3
  • Early ring-stage P. falciparum remains the limiting case because it is the smallest target, is readily confused with staining artefacts, and is vulnerable to acquisition differences between laboratories.The passage identifies this as a recurring finding in prior malaria microscopy work.Source: Deep learning for malaria microscopy · p. 3

Tiny object detection

  • High-resolution stride-four detection heads preserve fine structure, while NWD and M2IoU target tiny-object training signals; these methods act on every object regardless of size.CoSWA-YOLOv12 instead makes Wasserstein treatment conditional on object size to retain tiny-object benefits without trading away large-object accuracy.Source: Tiny object detection · p. 3

3 Methodology

CoSWA-YOLOv12 adds a stride-four head and three transfer-safe components to a YOLOv12 instance-segmentation network. The method adapts assignment to object size, adds a Gaussian regression loss, and evaluates the model on a five-class Rwandan thick-smear dataset.

3 Methodology

  • The YOLOv12 instance-segmentation network adds a stride-four P2 head, with the wavelet branch in downsampling, scale-adaptive NWD in assignment, and M2-NWD at the box head.The P2 head and three component locations are described in the network overview.Source: §3 · p. 3, Figure 1 · p. 4

3.1 Wavelet Detail Residual Downsampling

  • The wavelet detail residual adds a projected Haar high-frequency branch to each strided convolution, initially disabled by γ = 0.The branch extracts three Haar detail sub-bands and opens during optimisation only where it helps.Source: §3.1 · pp. 3–4

3.2 Scale-Adaptive Wasserstein Assignment

  • Small objects receive close to the full NWD weight, while large objects fall back to pure CIoU in the size-adaptive assignment.The size-dependent blend lets one detector treat tiny objects without penalising larger ones on the same slide.Source: Wasserstein overlap · p. 4, Size gate · p. 5

3.3 Min-Max Gaussian Regression Loss

  • M2-NWD weights the nearer- and farther-corner Wasserstein similarities with α < 0.5, and its scale-invariant regression term is applied globally.Setting λ = 0 recovers pure CIoU regression.Source: §3.3 · p. 5

3.4 Transfer-Safety and Efficiency

  • At initialisation, γ = 0, ρ = 0, and λ = 0 make the additions reproduce the baseline numerically, while increasing model size by about one percent.The pretrained weights can therefore be loaded without an initial change to baseline accuracy.Source: §3.4 · p. 5

3.5 Data, Compute, and Inference

  • The five-class Rwandan thick-smear dataset has median object side lengths of 34 pixels for P. falciparum and 78 to 115 pixels for the other classes.Models were trained for 70 epochs at 2048×2048 using public YOLOv12n segmentation weights; all reported metrics use the held-out test set.Source: Dataset and split · p. 5, Training and compute · p. 6

4 Results

CoSWA-YOLOv12 leads the overall screening metrics, improves P. falciparum detection without sacrificing all-class performance, and strengthens strict localisation across classes. A factorial ablation finds the scale gate and regression loss synergistic.

4.2 Detecting the Critical Class: Recall and mAP@50

  • P. falciparum recall rises from 0.63 to 0.74 and mAP@50 from 0.73 to 0.81 for segmentation.P. malariae recall improves from 0.84 to 0.89 and mAP@50 from 0.89 to 0.92.Source: §4.2 · p. 6, Table 2 · p. 7

4.1 Overall Performance

  • Mask recall/mAP@50 reach 0.850/0.888 and box recall/mAP@50 reach 0.851/0.889; CoSWA-YOLOv12 leads both tasks on these metrics.It improves precision over the baseline but trails the WDR-plus-global-NWD variant on precision.Source: §4.1 · p. 6, Table 1 · p. 7

4.2 Detecting the Critical Class: Recall and mAP@50

  • Overall recall improves from 0.828 to 0.850 and mAP@50 from 0.871 to 0.888, while missed P. falciparum falls from 0.38 to 0.15.Cross-species confusion stays at or below 0.02; the reported difficulty is detection against background, not species discrimination.Source: §4.2 · p. 7, Table 2 · p. 7

4.3 Strict Localisation: mAP@50-95

  • mAP@50-95 improves on all five classes and overall, reaching 0.674 from 0.630 for mask and 0.682 from 0.642 for box.Gains are broadest on P. ovale, P. vivax, and WBC, classes already saturated on detection.Source: §4.3 · p. 7, Table 2 · p. 7
  • On mask mAP@50-95, the gate and min-max loss add 0.026 and 0.018 separately but 0.071 together, a synergy of 0.027.The data-sized gate opens to 0.94 for P. falciparum and below 0.06 for every larger class; removing it drops overall mask mAP@50-95 from 0.637 to 0.603.Source: Synergy and necessity of the gate · p. 8

5 Discussion

The discussion attributes the gains to resolving a scale conflict in training rather than increasing model capacity, while noting that evaluation remains limited to one site.

5 Discussion

  • The authors identify a training-scale conflict, not model capacity, as the obstacle to detecting tiny P. falciparum on multi-species slides.Selective scale routing recovers its recall and mAP@50 while larger classes retain or tighten localisation.Source: §5 · p. 8
  • The gate and min-max loss are synergistic because the gate frees the loss from repairing large objects mis-assigned by global NWD.Box and mask move together, which the authors interpret as locating the improvement upstream of either head, in assignment and feature preservation.Source: §5 · p. 8
  • Evaluation at a single site leaves cross-site robustness untested, which the authors identify as a natural next step for tiny parasites.Inspection also suggests some residual P. falciparum false positives fall on unlabelled parasite-like structures, making reported precision likely a lower bound.Source: Limitations and future work · p. 8

6 Impact in Resource-Constrained Settings

CoSWA-YOLOv12 is presented as a compact, transfer-safe option for resource-constrained malaria screening, with gains focused on missed P. falciparum diagnoses.

6 Impact in Resource-Constrained Settings

  • The detector retains a 2.8M-parameter, edge-deployable nano-model size with zero added inference cost.The paper frames this as suitable for modest hardware.Source: §6 · p. 8
  • Transfer-safety lets the model adapt to a new laboratory from small local data without degrading.Source: §6 · p. 8
  • Missed P. falciparum falls from 38% to 15%, which the authors connect to fewer missed diagnoses where no second reader is available.Source: §6 · p. 8
Loading 2609.29527v1…