← All projects

Medical Imaging · Digital Pathology

Pathology artifact segmentation

An instance-segmentation model that flags 11 artifact types in whole-slide pathology images — dust, pen, folds, air bubbles, tissue scratches, focus blur — rebuilt to beat the client's existing baseline.

ROLECV Engineer TYPEUpwork · Freelance STATUSDelivered
Pathology slide instance segmentation: input, human ground-truth mask, and YOLO11x-seg prediction side by side

The challenge

An underperforming baseline

The client already had an artifact model — its accuracy simply wasn't good enough to rely on.

11 subtle artifact types

Dust, pen, folds, air bubbles, and scratches look alike and are easily confused with tissue.

Severe class imbalance

Some artifacts appear in hundreds of instances, others in only one or two.

The approach

01

Dataset audit & cleanup

Consolidated 356 images and 423 instances across the 11 artifact classes, fixing label noise.

02

YOLO11x-seg model

Replaced the baseline with a 62M-parameter YOLO11x instance-segmentation backbone.

03

Imbalance-aware training

Tuned training to lift long-tail classes without sacrificing the dominant ones.

04

Per-class error analysis

Per-class Dice, COCO mask mAP, and a confusion matrix to expose where classes bled together.

Outcomes

0.77

Mask mAP@50

YOLO11x-seg across all 11 classes (mask mAP@50–95 0.48).

0.97

Best-class Dice

Clean artifacts like debris segmented near-perfectly.

11 classes

Full artifact taxonomy

Every slide-artifact type covered by one model.

Stack YOLO11x-seg Ultralytics Instance segmentation PyTorch COCO mAP Dice score Digital pathology