Skip to main content

Cheap Lunch for Medical Image Segmentation by Fine-Tuning SAM on Few Exemplars

  • Conference paper
  • First Online:
Brainlesion: Glioma, Multiple Sclerosis, Stroke and Traumatic Brain Injuries (BrainLes 2023, SWITCH 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14668))

  • 177 Accesses

Abstract

The Segment Anything Model (SAM) has demonstrated remarkable capabilities of scaled-up segmentation models, enabling zero-shot generalization across a variety of domains. By leveraging large-scale foundational models as pre-trained models, it is a natural progression to fine-tune SAM for specific domains to further enhance performances. However, the adoption of foundational models in the medical domain presents a challenge due to the difficulty and expense of labeling sufficient data for adaptation within hospital systems. In this paper, we introduce an efficient and practical approach for fine-tuning SAM using a limited number of exemplars, making it suitable for such scenarios. Our approach combines two established techniques from the literature: an exemplar-guided synthesis module and the widely recognized Low-Rank Adaptation (LoRA) fine-tuning strategy, serving as data-level and model-level attempts respectively. Interestingly, our empirical findings suggest that SAM can be effectively aligned within the medical domain even with few labeled data. We validate our approach through experiments on brain tumor segmentation (BraTS) and multi-organ CT segmentation (Synapse). The comprehensive results underscore the feasibility and effectiveness of such an approach, paving the way for the practical application of SAM in the medical domain.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://www.synapse.org/#!Synapse:syn3193805/wiki/217789.

References

  1. Bakas, S., et al.: Advancing the cancer genome atlas glioma MRI collections with expert segmentation labels and radiomic features. Sci. Data 4(1), 1–13 (2017)

    Article  Google Scholar 

  2. Bakas, S., et al.: Identifying the best machine learning algorithms for brain tumor segmentation, progression assessment, and overall survival prediction in the brats challenge. arXiv preprint arXiv:1811.02629 (2018)

  3. Bommasani, R., et al.: On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258 (2021)

  4. Brown, T., et al.: Language models are few-shot learners. Adv. Neural. Inf. Process. Syst. 33, 1877–1901 (2020)

    Google Scholar 

  5. Chaitanya, K., Erdil, E., Karani, N., Konukoglu, E.: Contrastive learning of global and local features for medical image segmentation with limited annotations. Adv. Neural. Inf. Process. Syst. 33, 12546–12558 (2020)

    Google Scholar 

  6. Chen, J., et al.: Transunet: transformers make strong encoders for medical image segmentation. arXiv preprint arXiv:2102.04306 (2021)

  7. Chen, T., et al.: Sam fails to segment anything?–sam-adapter: adapting sam in underperformed scenes: camouflage, shadow, and more. arXiv preprint arXiv:2304.09148 (2023)

  8. Chowdhery, A., et al.: Palm: scaling language modeling with pathways. arXiv preprint arXiv:2204.02311 (2022)

  9. En, Q., Guo, Y.: Exemplar learning for medical image segmentation. arXiv preprint arXiv:2204.01713 (2022)

  10. Ghorbel, A., Aldahdooh, A., Albarqouni, S., Hamidouche, W.: Transformer based models for unsupervised anomaly segmentation in brain mr images. arXiv preprint arXiv:2207.02059 (2022)

  11. Hu, E.J., et al.: Lora: low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685 (2021)

  12. Huang, Y., et al.: Segment anything model for medical images? arXiv preprint arXiv:2304.14660 (2023)

  13. Ke, L., et al.: Segment anything in high quality. arXiv preprint arXiv:2306.01567 (2023)

  14. Kirillov, A., et al.: Segment anything. arXiv preprint arXiv:2304.02643 (2023)

  15. Loshchilov, I., Hutter, F.: Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101 (2017)

  16. Ma, J., He, Y., Li, F., Han, L., Chenyu, Y., Wang, B.: Segment anything in medical images. arXiv preprint arXiv:2304.12306 (2023)

  17. Menze, B.H., et al.: The multimodal brain tumor image segmentation benchmark (brats). IEEE Trans. Med. Imaging 34(10), 1993–2024 (2014)

    Article  Google Scholar 

  18. Oktay, O., et al.: Attention u-net: learning where to look for the pancreas. arXiv preprint arXiv:1804.03999 (2018)

  19. Vaswani, A., et al.: Attention is all you need. Adv. Neural Inf. Process. Syst. 30 (2017)

    Google Scholar 

  20. Wang, S., et al.: Annotation-efficient deep learning for automatic medical image segmentation. Nat. Commun. 12(1), 5915 (2021)

    Article  Google Scholar 

  21. Zhang, K., Liu, D.: Customized segment anything model for medical image segmentation. arXiv preprint arXiv:2304.13785 (2023)

Download references

Acknowledgement

The work described in this paper was partially supported by grants from the National Natural Science Fund (62201483) and the Research Grants Council of the Hong Kong Special Administrative Region, China (T45-401/22-N).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Lequan Yu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Feng, W., Zhu, L., Yu, L. (2024). Cheap Lunch for Medical Image Segmentation by Fine-Tuning SAM on Few Exemplars. In: Baid, U., et al. Brainlesion: Glioma, Multiple Sclerosis, Stroke and Traumatic Brain Injuries. BrainLes SWITCH 2023 2023. Lecture Notes in Computer Science, vol 14668. Springer, Cham. https://doi.org/10.1007/978-3-031-76160-7_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-76160-7_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-76159-1

  • Online ISBN: 978-3-031-76160-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics