Liver Observation Segmentation on Contrast-Enhanced MRI: SAM and MedSAM Performance in Patients With Probable or Definite Hepatocellular Carcinoma

Can Assoc Radiol J. 2024 May 7:8465371241250215. doi: 10.1177/08465371241250215. Online ahead of print.

Abstract

Purpose: To evaluate factors impacting the Segment Anything Model (SAM) and variant MedSAM performance for segmenting liver observations on contrast-enhanced (CE) magnetic resonance imaging (MRI) in high-risk patients with probable hepatocellular carcinoma (HCC) (LR-4) and definite HCC (LR-5). Methods: A retrospective cohort of liver observations (LR-4/LR-5) on CE-MRI from 97 patients at high-risk for HCC was derived (2013-2018). Using bounding-boxes as prompts under 5-fold cross-validation, segmentation performance was evaluated at the model and liver observation-levels for: (1) model types: SAM versus MedSAM, (2) image sizes: 256 × 256 versus 512 × 512, (3) image channel composition: CE sequences at 3 phases of enhancement independently and combined, (4) liver observation size: >10 mm versus >20 mm, (5) certainty of diagnosis: LR-4 versus LR-5, and (6) contrast-agent type: hepatobiliary versus extracellular. Segmentation performance, quantified using Dice coefficient, were compared using univariate (Wilcoxon signed-rank and t-test) and multivariable analyses (multiple correspondence analysis and subsequent linear modelling). Results: MedSAM trained on 512 × 512 combined CE sequences performed best with mean Dice coefficient 0.68 (95% confidence interval 0.66, 0.69). Overall, all factors except contrast-agent type affected performance, with larger image size resulting in the highest performance improvement (512 × 512: 0.57, 256 × 256: 0.26, P < .001) at the model-level. Contrast-agents affected performance for patients with LR-4 observations using MedSAM-based models (P < .03). Larger observation size, image size, and higher certainty of diagnosis were associated with better segmentation on multivariable analysis. Conclusion: A variety of factors were found to impact SAM/MedSAM performance for segmenting liver observations in patients with probable and definite HCC on CE-MRI. Future models may be optimized by accounting for these factors.

Keywords: factors impacting segmentation; hepatocellular carcinoma; liver MRI; prompting; segmentation.