Self-Healing Specimen Segmentation

From detector boxes to a model that corrects its own training labels. Each step below cleans the previous step's noise; the images are raw QC overlays (no annotations).

1

Detection

A YOLO detector locates the pressed specimen on each herbarium sheet (yellow box), separating the plant from labels, rulers and colour cards.

cassia
chrysophyllum
macaranga
chc21
2

SAM3 masks

Each Specimen box prompts SAM3 to produce a first foreground mask. It is a good start but noisy — it bleeds onto the mounting paper and misses thin parts.

cassia
chrysophyllum
macaranga
chc21
3

UNet self-labeling

A UNet is trained on the SAM3 masks, then its own predictions replace them. Averaging over the dataset cancels much of SAM3's per-image noise.

cassia
chrysophyllum
macaranga
chc21
4

Paper removal

Informed HSV colour segmentation strips the white/yellow mounting paper from inside the mask (shown in red) — interior gaps and the edge halo.

cassia
chrysophyllum
macaranga
chc21
5

Noise reweighting

During training the model tracks each image's loss. Labels that stay hard to fit after the model has learned the clean majority are flagged as bad ground truth (red) and down-weighted so they stop poisoning the gradient.

3d2xfs6m
4a98feh6
0b8m7oz6
gd9p6c0v
6

Self-relabeling

Every few epochs, each flagged image's label is replaced by the model's own prediction (green) — recovering plant material the original mask dropped. The model then trusts its learned prior over the noisy target.

Original Groundtruth MaskSelf-Relabeled Groundtruth Mask
7

Production model

The final self-healed model produces clean, paper-free specimen masks — tight to the plant, interior gaps removed, thin structures kept.

cassia
chrysophyllum
macaranga
chc21

Honeycomb Segmentation

The same arc — cheap weak labels to a dense model — on beehive comb frames. A few labelled points per tile, lifted to full segmentation via DINOv2 features and a distilled ResUNet.

1

Raw comb frames

Beekeepers photograph each frame. One frame packs thousands of hexagonal cells whose contents — capped honey, nectar, pollen, brood at many stages, bees, empty comb — are exactly what we need to map.

frame_1
frame_2
frame_3
2

Tiles — why not just trace it?

Frames are cut into 224px tiles. Up close the labelling problem is obvious: dozens of cell types blend together with no crisp edges. Hand-tracing every region across 24 classes and thousands of cells, on every frame, is infeasible.

tile_1
tile_2
tile_3
tile_4
3

Weakly Supervised Training

So we don't trace regions — we drop a few labelled points per tile, coloured by class (honey = gold, empty = green, nectar = pink, brood = blue …). A handful of clicks per tile instead of pixel-perfect outlines.

29.4.B.V_pick060
13.5.B.R_pick041
2.4.B.W_pick031
16.2.B.W_pick001
4

DINOv2 embeddings

A frozen DINOv2 vision transformer turns each tile into per-patch embeddings. The PCA-coloured features (right) already separate cell types before any training — honey, comb and brood fall into distinct feature clusters.

dinov2_features_single
dinov2_features_collage
dinov2_untrained_vs_trained
5

Points → training masks

The sparse points supervise a light probe on those embeddings — loss is computed only at the labelled points, everything else ignored. Each panel shows a labelled point and the patch embedding the probe reads there per class. The probe then labels every patch by its embedding and DenseCRF snaps regions to the comb — turning a few points into dense pseudo-masks that train the final model.

point_probe_per_class
6

ResUNet — final model

A ResUNet (ResNet-101) is distilled on the pseudo-masks, so inference is a single fast forward pass — no DINOv2 or CRF needed. It maps a whole frame into all 24 classes with per-class coverage %.

0.0.A.B_collage_with_original
1.6.B.V_collage_with_original
2.4.A.W_collage_with_original
7.8.A.V_collage_with_original