Lightweight open-source fine-tuning of SAM2 enables domain-specific microscopy segmentation
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Quantitation of structures is a critical step in analyzing images. Automated segmentation of biological samples remains a central challenge in microscopy, where variations in signal/noise, intensity, texture, and edges hinder accurate delineation of cellular and tissue structures. Adaptations of foundation models such as Segment Anything Model (SAM) remain computationally intensive and require large training datasets. Here, we introduce a lightweight, open-source Google Colab pipeline that enables efficient fine-tuning of SAM2 on domain-specific datasets without additional architectural layers or specialized hardware. By coupling mask-decoder fine-tuning with biologically informed post-processing, our framework achieves robust segmentation across diverse imaging modalities. Applied to hippocampal segmentation in brain images and single-cell segmentation in cell images, fine-tuned SAM2 demonstrates substantial gains of accuracy relative to basic SAM2 and matches leading tools. This work establishes a scalable and accessible paradigm for domain-specific adaptations of SAM2 in microscopy, lowering computational and data barriers to advanced image segmentation.
Highlights
-
Lightweight fine-tuning with no added architectural complexity.
-
High segmentation accuracy (Dice/Jaccard scores) achieved with small datasets.
-
Cross-domain generalization across tissue and cell imaging with biologically informed post-processing.
-
Comparable or superior performance to widely used tools (Cellpose, Imaris, ilastik) at substantially lower computational cost.
-
Open-source and executable in a single Colab notebook , ensuring reproducibility and accessibility for non-computational users.
-
Turnkey adaptability , allowing researchers to transform raw microscopy data into fine-tuned SAM2 models with minimal input.