The Short Answer
BruNet segments bruises across domains by combining a ViT-based visual encoder (DINOv3 or LingBot-Vision) with a SAM-based mask decoder, and it does so without bruise-specific fine-tuning. The framework is trained on HAM10000 and evaluated on an 86-image bruise set to test generalization.
For practitioners, this setup reduces the need for large, bruise-labeled datasets in each new imaging condition (different lighting, skin tones, or photo styles). It’s designed to handle the reality that bruise boundaries can be uncertain and appearance can shift.
The evaluation uses a pragmatic dual-region annotation protocol to match clinical uncertainty, so performance depends on how bruises are labeled in practice and how those uncertain boundaries are handled.
On this page
- Introduction: Bruises are messy—now the AI can handle that mess
- Why This Matters: Cross-domain segmentation is becoming the real test of medical AI
- What BruNet is doing differently: ViT features + SAM masks (and the bridge between them)
- Training where data is available: HAM10000 lesions become bruise priors
- Bruise evaluation that respects boundary uncertainty: the dual-region protocol
- How BruNet stacks up: metrics, comparisons, and what the numbers really suggest
- Why SAM + ViT works here: ablations show the “structure” and the resolution bridge matter
- Key Takeaways
Bruise Segmentation That Works Across Domains (BruNet)
Introduction: Bruises are messy—now the AI can handle that mess
If you’ve ever tried to outline a bruise in photos, you already know the problem: the edges are often blurry, the color fades gradually, and different lighting or skin tones make the same injury look totally different. That’s exactly why bruise segmentation (finding the bruise pixel-by-pixel) is such a tough medical imaging task—especially when annotated bruise data is scarce.
New research from the BruNet paper tackles this head-on. The authors introduce BruNet, a cross-domain transfer framework that combines a ViT-based visual encoder (either DINOv3 or LingBot-Vision) with a SAM-based mask decoder. The key idea: train on a large, labeled dataset for skin lesions and then evaluate on bruise images without bruise-specific fine-tuning, aiming for realistic “it works even when the data changes” behavior.
What makes this study especially interesting is that it’s not just another model for detecting or classifying bruises. The paper claims (to the authors’ knowledge) it’s the first deep learning framework specifically addressing automatic bruise segmentation. And because bruise boundaries are inherently uncertain, the authors also propose a pragmatic dual-region annotation protocol to evaluate performance in a way that matches clinical reality.
Why This Matters: Cross-domain segmentation is becoming the real test of medical AI
This research is significant right now because most medical imaging AI systems quietly assume the training and test data look similar. In practice—especially for bruises—that assumption breaks immediately: lighting varies, skin tone varies, bruises evolve over time, and boundaries can be ambiguous even for experts.
Here’s a scenario where this could be useful today: imagine a healthcare clinic or forensic workflow trying to document injuries from smartphone photos. A system that can segment bruises without being trained on that exact new photo style (or that exact bruise population) could reduce manual effort and improve consistency. The paper’s setup—training on HAM10000 (10,015 images) and evaluating on a separate bruise dataset of 86 expert-annotated images—is essentially a controlled version of “new domain, limited labels.”
And compared to earlier AI research: a lot of previous work on bruise analysis has focused on detection, classification, color analysis, or related tasks like age estimation. BruNet builds on a different trend in computer vision: foundation models (like ViTs trained for transferable features and SAM-like mask decoders). Instead of trying to “learn bruises from scratch,” it tries to reuse general visual understanding and adapt it in a structured way for pixel-level masks. In other words, it’s not just smart engineering—it’s a shift in how we tackle data scarcity and uncertainty.
What BruNet is doing differently: ViT features + SAM masks (and the bridge between them)
BruNet is built around a simple but powerful recipe:
- A visual encoder based on a Vision Transformer (ViT)
- A lightweight convolutional adapter that reshapes and upsamples features
- A SAM-based mask decoder that produces the final segmentation mask
The “why” is important: ViT tokens form a coarse grid, but SAM’s mask decoder expects feature maps at a certain resolution and structure. If you just reshape tokens directly, you get low-resolution masks—often with blocky artifacts and poorer boundary fidelity. BruNet’s adapter fixes that by restoring spatial detail and aligning feature dimensions.
The backbone variants: LingBot-Vision vs DINOv3
BruNet is trained in two variants depending on which ViT backbone is used:
- BruNet-LingBot: uses
LingBot-Vision ViT-B/16, pretrained with a masked boundary modeling approach - BruNet-DINOv3: uses
DINOv3 ViT-B/16, pretrained self-supervised on natural images
The paper describes how these backbones produce different token grid sizes at native input resolutions, which is one reason the adapter matters. BruNet maps either backbone’s output into a shared embedding shape:
- Projected to
56×56×256before entering the SAM mask decoder - This makes the interface “resolution-agnostic,” so the same SAM decoder can be used unchanged for both backbones
The adapter’s job: “turn coarse tokens back into something that looks spatial”
A good analogy: think of ViT tokens like zippered pixels—they hold information, but you can’t unfold them neatly into a high-detail image. BruNet’s adapter is the unzipping tool: it projects features to the right channel count and upsamples to a finer grid so SAM can draw coherent masks that follow boundaries more faithfully.
Training where data is available: HAM10000 lesions become bruise priors
The training strategy is what makes this work feel unusually practical. Instead of trying to build a large bruise labeling effort (hard, slow, and ethically sensitive), BruNet trains only on:
HAM10000: 10,015 high-resolution images with expert masks for skin lesions
Bruises aren’t the same as lesions, but they share key visual challenges:
- irregular shapes
- diffuse boundaries
- color variation
- heterogeneous texture
So the model learns general segmentation priors for “skin abnormalities,” then transfers them to bruises during evaluation.
Data augmentation tuned to real image conditions
The paper notes a specific issue with HAM10000: lesions were often captured with dermoscopes, which changes illumination/appearance. To help the model become invariant to lighting and contrast, they apply a Retinex-based augmentation:
MSRCP(Multi-scale Retinex with Chromaticity Preservation)
That matters because bruise visibility is notoriously sensitive to lighting, skin thickness, and tone—exactly the kind of variability that causes domain shift.
Unfrozen training + SAM with LoRA
BruNet trains with all backbone parameters unfrozen, and uses LoRA adaptation for the SAM mask decoder:
- LoRA rank
r=8 - scaling
α=8
Optimization details include AdamW with weight decay 1e-4 and mixed precision using bfloat16. The paper reports distinct training epochs and learning rates for the two backbones (e.g., DINOv3 trained for 150 epochs; LingBot for 50 epochs).
Bruise evaluation that respects boundary uncertainty: the dual-region protocol
One of the most thoughtful parts of the paper isn’t the model—it’s how they evaluate it.
Bruise boundaries are diffuse and clinically ambiguous. In an ideal multi-expert world, you’d collect several independent pixel-level annotations per image and evaluate agreement probabilistically (metrics like PRI or STAPLE-style consensus). But getting multiple bruise annotations per image by experts is impractical.
So the authors propose a workaround they call a dual-region evaluation protocol:
- Each image is first annotated by one medical expert
- A lightweight model generates candidate masks across multiple probability thresholds
- A second medical expert reviews candidates and selects two representative regions:
- Inner region: high-confidence bruise core
- Outer region: plausible bruise area that includes uncertain boundary extent
How this changes metric scoring
During evaluation:
- Only pixels in the high-confidence inner region are treated as positive ground truth
- Pixels between inner and outer regions are excluded from metric calculations
This prevents the model from being unfairly punished for uncertainty where even experts disagree. It’s a practical compromise that better reflects how bruises should be interpreted than forcing a single “perfect” contour.
How BruNet stacks up: metrics, comparisons, and what the numbers really suggest
The experiments evaluate BruNet on 86 bruise test images using metrics including:
- Dice score
- IoU
(and also precision/recall/accuracy, with boundary uncertainty handled by the dual-region protocol)
Head-to-head: BruNet vs the strongest baselines
Below is the overall comparison framed by the paper’s reported results. (The key point: BruNet is trained only on HAM10000, yet tested on bruise images without fine-tuning.)
| Model | Dice (mean) | IoU (mean) | Notes |
|---|---|---|---|
BruNet-LingBot |
0.8674 | 0.7897 | Best overall overlap + precision/recall balance |
BruNet-DINOv3 |
0.8386 | 0.7592 | Strong coverage; highest recall (0.8491) |
OneFormer |
0.7097 | 0.6352 | Good recall (0.8085), lower precision (0.7063) |
U-Net |
0.5198 | 0.4092 | Over-segmentation signals in qualitative examples |
MedGemma + MedSAM |
0.5157 | 0.3911 | Better than some SAM prompt pipelines |
SAM3 (text “skin bruise”) |
0.7053 | 0.5875 | High precision (0.9372), lower recall (0.5888) |
GPT-5 + SAM2 |
0.4116 | 0.2922 | Very conservative; recall 0.2924 |
GPT-4o + SAM2 |
0.2299 | 0.1494 | Extremely conservative; very low recall |
A few takeaways jump out from this pattern:
- Prompt-based SAM2 pipelines (LLM-guided) often become conservative for bruises, capturing only partial regions.
OneFormerperforms decently but tends to include extra non-bruise area (precision 0.7063), which aligns with qualitative predictions that extend beyond the annotated outer boundary.SAM3does surprisingly well in overlap (Dice 0.7053) but struggles with coverage (recall 0.5888) and sometimes returns no retained instances for some images.
BruNet’s recall/precision balance is the story
The paper reports:
- BruNet-LingBot: best overall Dice and IoU, strong precision/recall tradeoff
- BruNet-DINOv3: highest recall (0.8491), suggesting it captures more of the bruise extent
Statistical reliability: not just “looks better,” but “stays better”
To confirm differences weren’t random, the authors run paired statistical tests (two-sided Wilcoxon signed-rank) on per-image Dice/IoU scores across the same 86 images, applying Holm–Bonferroni correction.
They report that:
- BruNet-DINOv3 is statistically better than all eight non-BruNet baselines after correction (adjusted p-values reported as ≤ 0.0044 for Dice vs OneFormer, and even smaller vs others).
- The differences between BruNet-LingBot and BruNet-DINOv3 are not statistically significant for Dice or IoU (adjusted p-values 0.4096 and 0.5480), though the arithmetic means favor LingBot.
So the two variants behave similarly overall, with slightly different strengths (coverage vs balance).
Why SAM + ViT works here: ablations show the “structure” and the resolution bridge matter
The paper includes an ablation study using LingBot-Vision that isolates how much the SAM decoder and the intermediate upsampling contribute.
The ablation variants (LingBot backbone)
They test three setups:
- Full BruNet with SAM mask decoder + intermediate upsampling to 56×56
- Replace SAM mask decoder with a convolutional segmentation head
- Remove intermediate upsampling and feed native 32×32 features directly into SAM
| Variant | Dice | IoU | Precision | Recall | Interpretation |
|---|---|---|---|---|---|
Full BruNet-LingBot |
0.867 | 0.790 | 0.946 | 0.823 | Best boundary-aware overlap |
| Conv head instead of SAM | 0.848 | 0.764 | 0.866 | 0.881 | More over-segmentation (higher recall, lower precision) |
| No intermediate upsampling | 0.839 | 0.752 | 0.939 | 0.789 | Keeps precision but fragments masks / loses coverage |
These results tell a clear story:
- SAM’s mask decoder contributes meaningful boundary and coherence compared to a conventional convolutional head.
- The intermediate upsampling to 56×56 helps recover spatial continuity—without it, you get masks that tend to retain only “high-confidence core regions,” hurting recall and overall overlap.
Key Takeaways
- BruNet is a cross-domain bruise segmentation framework that trains on
HAM10000(skin lesions) and evaluates on bruise images without bruise fine-tuning. - The model uses a ViT visual encoder (
LingBot-VisionorDINOv3) and a SAM-based mask decoder, connected by a lightweight adapter that maps features into a shared56×56×256embedding space. - The paper’s dual-region evaluation protocol acknowledges that bruise boundaries are uncertain: metrics are computed using a high-confidence inner region, while ambiguous boundary pixels are excluded.
- Performance-wise, BruNet leads the pack on 86 annotated bruise test images, with best reported means:
BruNet-LingBot: Dice 0.8674, IoU 0.7897BruNet-DINOv3: Dice 0.8386, IoU 0.7592 (also highest recall 0.8491)
- Compared to baselines like
U-Net,OneFormer, prompt-driven SAM2/MedSAM pipelines, andMedSAM/SAM3, BruNet offers better overlap and a more clinically realistic balance of precision vs recall. - Ablations suggest that both SAM decoding and the intermediate upsampling step are crucial for avoiding fragmented or overconfident masks.
- Practically, this points toward a more scalable future: for rare, ambiguous injuries like bruises, the path may be foundation-model transfer rather than waiting for large bruise-specific annotation efforts.
If you want, I can also turn this into a “why this works” explainer diagram-style narrative (still non-technical) or summarize the paper’s experimental setup into a quick checklist for replication.
Sources Used
This article is a plain-English breakdown of the following peer-reviewed preprint. Read the original for full methodology and results:
- BruNet: A Cross-Domain Transfer Framework for Bruise Segmentation — arXiv
- Authors: Authors: Qiming Wang, Richard J. Motley, Ebube E. Obi, Xianfang Sun, Paul L. Rosin