Medical Image Segmentation: Foundation Model Adaptation versus Task-Specific Training
Organizations: Department of Computer Science, Brunel University of London, Uxbridge, UB8 3PH, United Kingdom
Abstract
Foundation models pretrained on large natural-image collections are increasingly adapted for medical image segmentation, in the expectation that they will replace models trained for each task. Most comparisons, however, use data from the training distribution and a single task-specific baseline whose configuration is rarely justified, and therefore provide limited evidence of performance at new clinical sites. It also remains unclear how much of a foundation model must be adapted, and what determines this. We adapted a foundation model, DINOv2, with strategies ranging from tuning only its bias terms to full fine-tuning, and compared it with U-Nets and ResU-Nets trained from scratch. Experiments covered colonoscopy, breast ultrasound and dermoscopy, with testing on held-out data from the training source and on independent datasets from other institutions. The adapted foundation model generalised better on every external dataset. Within the training distribution, the task-specific models remained competitive when training data were abundant, and delineated boundaries more precisely, while the foundation model more often missed small lesions. Only a small fraction of the foundation model required adaptation, and the capacity needed was determined by the imaging domain rather than by the adaptation method. A widely used polyp test set was also found to duplicate images from another benchmark. Foundation-model adaptation is therefore warranted where models must work across sites, with capacity selected on the target domain.
Figures & tables
| Configuration | Trainable | % of full FT | Encoder parameters updated |
|---|---|---|---|
| Frozen | 385 | 0.002 | None |
| BitFit | 51,841 | 0.24 | All bias terms |
| LoRA | 74,113 | 0.34 | Rank-4 factors on Q and V |
| LoRA | 147,841 | 0.67 | Rank-8 factors on Q and V |
| LoRA | 295,297 | 1.34 | Rank-16 factors on Q and V |
| LoRA | 590,209 | 2.68 | Rank-32 factors on Q and V |
| Configuration | Polyp | Breast | Skin |
|---|---|---|---|
| Adaptation, capacity axis | 40 | 40 | 20 |
| Adaptation, core multi-seed comparison | 20 | – | 20 |
| From-scratch | 300 | 300 | 100 |
| Data-size sweep | scaled inversely with subset size | ||
| Test set | Model | DSC | IoU | Sens | Prec | HD95 | ASSD | NSD | ||
| Polyp | ||||||||||
| Kvasir (in) | 100 | Plain U-Net | 0.8804 | 0.813 | 0.875 | 0.917 | 0.071 | 0.017 | 0.682 | 0 |
| ResU-Net | 0.8611 | 0.793 | 0.858 | 0.907 | 0.067 | 0.018 | 0.669 | 0 | ||
| LoRA | 0.8877 | 0.823 | 0.883 | 0.918 | 0.058 | 0.016 | 0.649 | 0 | ||
| CVC-ClinicDB (in) | 62 | Plain U-Net | 0.8803 | 0.831 | 0.892 | 0.874 | 0.042 | 0.016 | 0.782 | 0 |
| ResU-Net | 0.8826 | 0.833 | 0.886 | 0.889 | 0.047 | 0.027 | 0.791 | 1 | ||
| All images | Non-empty predictions | |||||||
| Domain | Test set | Model | HD95 (px) | ASSD (px) | NSD 4 | HD95 | ASSD | NSD 2 |
| Polyp | Kvasir | Plain U-Net | 22.6 | 5.5 | 0.794 | 0.071 | 0.017 | 0.682 |
| ResU-Net | 21.3 | 5.8 | 0.776 | 0.067 | 0.018 | 0.669 | ||
| LoRA | 18.4 | 5.2 | 0.821 | 0.058 | 0.016 | 0.649 | ||
| CVC-ClinicDB | Plain U-Net | 13.2 | 5.1 | 0.868 | 0.042 | 0.016 | 0.782 | |
| ResU-Net | 14.9 | 8.5 | 0.881 | 0.031 | 0.011 | 0.804 | ||
| Model | CVC-ColonDB | ETIS | CVC-T |
|---|---|---|---|
| U-Net [ 52 ] | 0.512 | 0.398 | 0.710 |
| U-Net++ [ 68 ] | 0.483 | 0.401 | 0.707 |
| ACSNet [ 67 ] | 0.716 | 0.578 | 0.863 |
| MSEG [ 29 ] | 0.735 | 0.700 | 0.874 |
| Polyp-PVT [ 16 ] | 0.808 | 0.787 | 0.900 |
| SAM-Mamba [ 18 ] | 0.853 | 0.848 | 0.920 |
| Domain | Lesion | Area (%) | Plain | ResU | LoRA | ||
|---|---|---|---|---|---|---|---|
| Polyp | Small | 0.1–2.0 | 212 | 0.542 | 0.531 | 0.560 | |
| Medium | 2.0–5.0 | 212 | 0.819 | 0.804 | 0.870 | ||
| Large | 5.0–63.1 | 212 | 0.785 | 0.759 | 0.840 | ||
| Breast | Small | 0.2–2.8 | 171 | 0.547 | 0.507 | 0.612 | |
| Medium | 2.8–7.2 | 171 | 0.676 | 0.636 | 0.740 | ||
| Large | 7.2–46.2 | 170 | 0.707 | 0.723 | 0.775 |
| DSC | NSD (2/224) | NSD (4/224) | HD95 | |||||
| Test set | L | R | L | R | L | R | L | R |
| 224 px for both models (data-size sweep, 100%) | ||||||||
| ISIC 2016* | 0.920 | 0.910 | 0.432 | 0.459 | 0.676 | 0.663 | 0.031 | 0.038 |
| ISIC 2017* | 0.859 | 0.856 | 0.402 | 0.415 | 0.581 | 0.576 | 0.053 | 0.054 |
| PH2 | 0.918 | 0.917 | 0.380 | 0.402 | 0.591 | 0.626 | 0.033 | 0.038 |
| Native resolution, 392 px (L) and 384 px (R) (Table 5 ) | ||||||||
| In-domain gap | Out-of-distribution gap | ||||||
| Domain | Fraction | DSC | HD95 | NSD | DSC | HD95 | NSD |
| Polyp | 10% | ||||||
| 25% | |||||||
| 50% | |||||||
| 100% | |||||||
| Breast | 25% | ||||||
| Test set | LoRA | Full FT | Verdict | ||
|---|---|---|---|---|---|
| Kvasir (in-domain) | 0.8825 | 0.8767 | 0.0003 | LoRA | |
| CVC-ClinicDB (in-domain) | 0.8485 | 0.8384 | 0.0194 | LoRA | |
| CVC-ColonDB | 0.7401 | 0.7380 | 0.0001 | LoRA | |
| ETIS | 0.6986 | 0.6856 | 0.1191 | No difference | |
| CVC-T | 0.8671 | 0.8665 | 0.3931 | No difference |
| Test set | DSC | IoU | Sens | Prec | HD95 | NSD |
|---|---|---|---|---|---|---|
| Polyp, LoRA full FT | ||||||
| Kvasir | ||||||
| CVC-ClinicDB | ||||||
| CVC-ColonDB | ||||||
| ETIS | ||||||
| CVC-T | ||||||
| Domain | Test set | Regime | 20 epochs | 40 epochs |
|---|---|---|---|---|
| Breast | BrEaST | OOD | ||
| Breast | BUS-UCLM | OOD | ||
| Breast | BUSI-val | in-domain | ||
| Polyp | CVC-ColonDB | OOD |
| Learning rate | Val | Kvasir | ClinicDB | ColonDB | ETIS | CVC-T |
|---|---|---|---|---|---|---|
| 1e-2 | 0.8866 | 0.8480 | 0.8359 | 0.7256 | 0.6509 | 0.8558 |
| 3e-3 | 0.8712 | 0.8503 | 0.7691 | 0.7293 | 0.5689 | 0.8273 |
| 1e-3 | 0.8958 | 0.8960 | 0.8306 | 0.7204 | 0.6867 | 0.8634 |
| 3e-4 | 0.8826 | 0.8731 | 0.8158 | 0.6892 | 0.6604 | 0.8587 |
| Domain | Directions at 90% | at 95% | at 99% | Effective rank |
|---|---|---|---|---|
| Skin | 28.4 | 48.5 | 113.2 | 21.3 |
| Breast (20 epochs) | 39.0 | 65.1 | 139.3 | 26.1 |
| Polyp | 42.1 | 69.8 | 146.2 | 27.0 |
| Breast (40 epochs) | 44.3 | 71.7 | 145.5 | 30.7 |
| Test set | Full FT | Trunc | LoRA | Trunc | LoRA |
|---|---|---|---|---|---|
| Kvasir | 0.8753 | 0.8638 | 0.8609 | 0.8743 | 0.8765 |
| CVC-ClinicDB | 0.8369 | 0.7838 | 0.8166 | 0.8295 | 0.8481 |
| CVC-ColonDB | 0.7482 | 0.7244 | 0.7237 | 0.7469 | 0.7700 |
| ETIS | 0.6983 | 0.6610 | 0.6582 | 0.6957 | 0.6961 |
| CVC-T | 0.8690 | 0.8561 | 0.8701 | 0.8682 | 0.8578 |
| Quantity | Configuration | With CVC-T | Without CVC-T |
|---|---|---|---|
| Mean DSC (Table 5 ) | Plain U-Net | 0.7370 | 0.6852 |
| ResU-Net | 0.7120 | 0.6709 | |
| LoRA | 0.7781 | 0.7339 | |
| Deficit (Table 7 ) | Plain U-Net | ||
| ResU-Net | |||
| OOD gap, data-size sweep (Table 14 ) | 10% |
Medical Image Segmentation
Medical image segmentation delineates organs, lesions, and other structures in scans to support measurement, diagnosis, treatment planning, and research.
See all 834 papers