Domain-Guided YOLO26 with Composite BCE-Dice-Lovász Loss for Multi-Class Fetal Head Ultrasound Segmentation
Organizations: Informatics Engineering, Faculty of Computer Science Sriwijaya University
Abstract
Segmenting fetal head structures from prenatal ultrasound remains a practical bottleneck in obstetric imaging. The current state-of-the-art baseline, proposed alongside the published dataset, adapts the Segment Anything Model with per-class Dice and Lovász losses but still depends on bounding-box prompts at test time. We build a prompt-free pipeline on top of YOLO26-Seg that jointly detects and segments three structures, Brain, Cavum Septi Pellucidi (CSP), and Lateral Ventricles (LV), in a single forward pass. Three modifications are central to our approach: (i) a composite BCE-Dice-Lovász segmentation loss with inverse-frequency class weighting, injected into the YOLO26 training loop via runtime monkey-patching; (ii) domain-guided copy-paste augmentation that transplants minority-class structures while respecting their anatomical location relative to the brain boundary; and (iii) inter-patient stratified splitting to prevent data leakage. On 575 held-out test images, the composite loss variant reaches a mean Dice coefficient of 0.9253, exceeding the baseline (0.9012) by 2.68 percentage points, despite reporting over three foreground classes only, whereas the baseline's reported mean includes the easy background class. We further ablate each component and discuss annotation-quality and class-imbalance effects on CSP and LV performance.
Figures & tables
| Split | Images | Brain | CSP | LV | Total |
| Train | 2,654 | 2,697 | 921 | 1,052 | 4,670 |
| Val | 603 | 611 | 190 | 212 | 1,013 |
| Test | 575 | 568 | 172 | 212 | 952 |
| All | 3,832 | 3,792 | 1,283 | 1,476 | 6,551 |
| Variant | Speed CPU ONNX (ms) | Speed GPU T4 TRT10 (ms) | Params | FLOPs |
| YOLO26N-Seg | 53.3 0.5 | 2.1 0.0 | 2.7 M | 9.1 |
| YOLO26L-Seg | 387.0 3.7 | 8.0 0.1 | 28.0 M | 139.8 |
| Class | Instances | Weight | Normalised |
| Brain | 3,792 (57.9%) | 0.1 | 0.059 |
| CSP | 1,283 (19.6%) | 0.9 | 0.529 |
| LV | 1,476 (22.5%) | 0.7 | 0.412 |
| Parameter | Baseline | Domain-Guided | FetSAM Loss |
| Architecture | YOLO26N-Seg | YOLO26L-Seg | YOLO26N-Seg |
| Params | 2.7 M | 28.0 M | 2.7 M |
| Input size | 640 | 800 | 640 |
| Batch size | 64 | 16 | 128 |
| Epochs | 180 (early stop) | 300 (3 sess.) | 300 |
| Optimizer | AdamW | Auto MuSGD | Auto AdamW |
| Experiment | Sessions | Epochs | Total time | Per epoch |
| Baseline | 1 | 180 | 2.45 h | 48.8 s |
| Domain-Guided | 3 | 300 | 30.88 h | 368.3 s |
| FetSAM Loss | 1 | 300 | 4.04 h | 48.3 s |
| Metric | Baseline | Domain-Guided | FetSAM Loss |
| mAP@50 | 0.7423 | 0.8657 | 0.7700 |
| mAP@50-95 | 0.4736 | 0.5462 | 0.5046 |
| mDSC | 0.9229 | 0.9208 | 0.9253 |
| mIoU | 0.8661 | 0.8624 | 0.8697 |
| Precision | 0.7393 | 0.8244 | 0.7592 |
| Recall | 0.7810 | 0.8775 | 0.8178 |
| Class | Prec. | Rec. | F1 | IoU | DSC | TP | FP | FN |
| Brain | 0.939 | 0.982 | 0.960 | 0.943 | 0.971 | 558 | 36 | 10 |
| CSP | 0.624 | 0.762 | 0.686 | 0.704 | 0.823 | 131 | 79 | 41 |
| LV | 0.655 | 0.599 | 0.626 | 0.695 | 0.816 | 127 | 67 | 85 |
| Class | Prec. | Rec. | F1 | IoU | DSC | TP | FP | FN |
| Brain | 0.984 | 0.997 | 0.990 | 0.947 | 0.973 | 566 | 9 | 2 |
| CSP | 0.700 | 0.895 | 0.786 | 0.722 | 0.836 | 154 | 66 | 18 |
| LV | 0.789 | 0.741 | 0.764 | 0.693 | 0.816 | 157 | 42 | 55 |
| Class | Prec. | Rec. | F1 | IoU | DSC | TP | FP | FN |
| Brain | 0.983 | 0.998 | 0.990 | 0.946 | 0.972 | 567 | 10 | 1 |
| CSP | 0.640 | 0.837 | 0.725 | 0.715 | 0.831 | 144 | 81 | 28 |
| LV | 0.655 | 0.618 | 0.636 | 0.712 | 0.828 | 131 | 69 | 81 |
| Model | Backbone | Paradigm | Mean DSC |
| FetSAM [ 10 ] | SAM (ViT) | Prompt-based | 0.9012 |
| Efb0_DLabV3+ [ 10 ] | EffNet-B0 [ 36 ] | Semantic | 0.8532 |
| Mit_SegFormer_b0 [ 10 ] | MiT-B0 [ 7 ] | Semantic | 0.8323 |
| Efb0_Unet [ 10 ] | EffNet-B0 [ 36 ] | Semantic | 0.8466 |
| Efb0_Unet++ [ 10 ] | EffNet-B0 [ 36 ] | Semantic | 0.8495 |
| Efb0_Linknet [ 10 ] | EffNet-B0 [ 36 ] | Semantic | 0.8184 |
| Class | FetSAM | Ours (FetSAM Loss) | Ours (Dom.-Guided) |
| Brain | 0.9851 | 0.9718 | 0.9729 |
| CSP | 0.8037 | 0.8305 ( 3.3%) | 0.8359 ( 4.0%) |
| LV | 0.8208 | 0.8280 ( 0.9%) | 0.8162 |
| Mean (fg) | 0.9012* | 0.9253 | 0.9208 |
| *FetSAM’s published mean includes the background class. | |||
Ultrasound Image Segmentation
Ultrasound image segmentation delineates organs, lesions, and other structures in ultrasound scans for measurement, diagnosis, and image-guided care.
See all 73 papers