Enhancing Medical Imaging Segmentation with GB-SAM: A Novel Approach to Tissue Segmentation Using Granular Box Prompts
Abstract
:Simple Summary
Abstract
1. Introduction
- Introducing a new strategy for fine-tuning the SAM model using granular box prompts derived from ground truth masks, enhancing gland morphology segmentation accuracy.
- Demonstrating through experiments on CRAG, GlaS, and Camelyon16 datasets, our training strategy improves SAM’s segmentation performance.
- Showcasing SAM’s superior performance and adaptability in digital pathology is particularly beneficial for cases with limited data availability.
- Highlighting SAM’s consistent performance and exceptional ability to generalize to new and complex data types, such as lymph node segmentation.
2. Related Work
3. Material and Methods
3.1. Datasets
3.1.1. CRAG for Training and Validation
3.1.2. External Testing Datasets
3.1.3. Datasets Representation
3.2. Granular Box Prompts SAM
3.2.1. Segment Anything Model
3.2.2. Object Selection and Bounding Box Prompt
3.2.3. Training Procedures
Image Preprocessing and Augmentation
Model Optimizations
- measures the overlap between the predicted and ground truth masks.
- represents the cross-entropy loss, penalizing the pixel-wise differences between the predicted mask M and the ground truth .
- is a balancing coefficient.
- is the reduction factor.
- measures the change in validation loss.
- is a threshold for determining if the change in loss is significant.
3.3. Comparison and Evaluation
3.3.1. Compared Methods: U-Net, Path-SAM, Med-SAM
U-Net Model
SAM-Path
MedSAM: Segment Anything in Medical Images
Evaluation Metrics
3.3.2. Intersection over Union (IoU)
3.3.3. Dice Similarity Coefficient (DSC)
3.3.4. Mean Average Precision (mAP)
4. Results and Discussion
4.1. Impact of Dataset Size on Tuning GB-SAM and U-Net Models with CRAG
4.1.1. Comparative Results
4.1.2. Segmentation Performance
4.2. Assessing Model Generalizability across Diverse Datasets
4.2.1. Evaluating on GlaS
4.2.2. Evaluating on Camelyon16
4.2.3. Comparative Analysis: GB-SAM, SAM-Path, and Med-SAM
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Tizhoosh, H.R.; Pantanowitz, L. Artificial intelligence and digital pathology: Challenges and opportunities. J. Pathol. Inform. 2018, 9, 38. [Google Scholar] [CrossRef] [PubMed]
- Farahani, N.; Parwani, A.V.; Pantanowitz, L. Whole slide imaging in pathology: Advantages, limitations, and emerging perspectives. Pathol. Lab. Med. Int. 2015, 2015, 23–33. [Google Scholar]
- Yang, Y.; Sun, K.; Gao, Y.; Wang, K.; Yu, G. Preparing data for artificial intelligence in pathology with clinical-grade performance. Diagnostics 2023, 13, 3115. [Google Scholar] [CrossRef]
- Huang, Z.; Yang, E.; Shen, J.; Gratzinger, D.; Eyerer, F.; Liang, B.; Nirschl, J.; Bingham, D.; Dussaq, A.M.; Kunder, C.; et al. A pathologist–AI collaboration framework for enhancing diagnostic accuracies and efficiencies. Nat. Biomed. Eng. 2024, 1–16, Online ahead of print. [Google Scholar] [CrossRef]
- Go, H. Digital pathology and artificial intelligence applications in pathology. Brain Tumor Res. Treat. 2022, 10, 76–82. [Google Scholar] [CrossRef]
- Xu, Y.; Jia, Z.; Wang, L.-B.; Ai, Y.; Zhang, F.; Lai, M.; Chang, E.I.-C. Large scale tissue histopathology image classification, segmentation, and visualization via deep convolutional activation features. BMC Bioinform. 2017, 18, 281. [Google Scholar] [CrossRef]
- Browning, L.; Jesus, C.; Malacrino, S.; Guan, Y.; White, K.; Puddle, A.; Alham, N.K.; Haghighat, M.; Colling, R.; Birks, J.; et al. Artificial Intelligence-Based Quality Assessment of Histopathology Whole-Slide Images within a Clinical Workflow: Assessment of ‘PathProfiler’ in a Diagnostic Pathology Setting. Diagnostics 2024, 14, 990. [Google Scholar] [CrossRef] [PubMed]
- Wu, H.; Brémond-Martin, C.; Bouaou, K.; Clouchoux, C. Tumor segmentation on whole slide images: Training or prompting? arXiv 2024, arXiv:2402.13932. [Google Scholar]
- Schutte, S.; Uddin, J. Deep Segmentation Techniques for Breast Cancer Diagnosis. BioMedInformatics 2024, 4, 921–945. [Google Scholar] [CrossRef]
- Matsuda, T.; Saito, Y.; Fujii, T.; Uraoka, T.; Nakajima, T.; Kobayashi, N.; Emura, F.; Ono, A.; Shimoda, T.; Ikematsu, H.; et al. Size does not determine the grade of malignancy of early invasive colorectal cancer. World J. Gastroenterol. WJG 2009, 15, 2708. [Google Scholar] [CrossRef]
- Ubink, I.; Van Eden, W.J.; Snaebjornsson, P.; Kok, N.F.M.; Van Kuik, J.; Van Grevenstein, W.M.U.; Laclé, M.M.; Sanders, J.; Fijneman, R.J.A.; Elias, S.G.; et al. Histopathological and molecular classification of colorectal cancer and corresponding peritoneal metastases. J. Br. Surg. 2018, 105, e204–e211. [Google Scholar] [CrossRef] [PubMed]
- García-Figueiras, R.; Baleato-González, S.; Padhani, A.R.; Marhuenda, A.; Luna, A.; Alcalá, L.; Carballo-Castro, A.; Álvarez-Castro, A. Advanced imaging of colorectal cancer: From anatomy to molecular imaging. Insights Into Imaging 2016, 7, 285–309. [Google Scholar] [CrossRef] [PubMed]
- Adams, L.C.; Busch, F.; Truhn, D.; Makowski, M.R.; Aerts, H.J.; Bressem, K.K. What does DALL-E 2 know about radiology? J. Med. Internet Res. 2023, 25, e43110. [Google Scholar] [CrossRef] [PubMed]
- Achiam, J.; Adler, S.; Agarwal, S.; Ahmad, L.; Akkaya, I.; Aleman, F.L.; Almeida, D.; Altenschmidt, J.; Altman, S.; Anadkat, S.; et al. Gpt-4 technical report. arXiv 2023, arXiv:2303.08774. [Google Scholar]
- Kirillov, A.; Mintun, E.; Ravi, N.; Mao, H.; Rolland, C.; Gustafson, L.; Xiao, T.; Whitehead, S.; Berg, A.C.; Lo, W.Y.; et al. Segment anything. arXiv 2023, arXiv:2304.02643. [Google Scholar]
- Zhang, J.; Ma, K.; Kapse, S.; Saltz, J.; Vakalopoulou, M.; Prasanna, P.; Samaras, D. Sam-path: A segment anything model for semantic segmentation in digital pathology. In Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention, Vancouver, BC, Canada, 8–12 October 2023; Springer: Berlin/Heidelberg, Germany, 2023; pp. 161–170. [Google Scholar]
- Deng, R.; Cui, C.; Liu, Q.; Yao, T.; Remedios, L.W.; Bao, S.; Landman, B.A.; Wheless, L.E.; Coburn, L.A.; Wilson, K.T.; et al. Segment anything model (sam) for digital pathology: Assess zero-shot segmentation on whole slide imaging. arXiv 2023, arXiv:2304.04155. [Google Scholar]
- Liu, H.; Yang, H.; van Diest, P.J.; Pluim, J.P.; Veta, M. WSI-SAM: Multi-resolution Segment Anything Model (SAM) for histopathology whole-slide images. arXiv 2024, arXiv:2403.09257. [Google Scholar]
- Ma, J.; He, Y.; Li, F.; Han, L.; You, C.; Wang, B. Segment anything in medical images. Nat. Commun. 2024, 15, 654. [Google Scholar] [CrossRef]
- Ranem, A.; Babendererde, N.; Fuchs, M.; Mukhopadhyay, A. Exploring sam ablations for enhancing medical segmentation in radiology and pathology. arXiv 2023, arXiv:2310.00504. [Google Scholar]
- Cui, C.; Deng, R.; Liu, Q.; Yao, T.; Bao, S.; Remedios, L.W.; Tang, Y.; Huo, Y. All-in-sam: From weak annotation to pixel-wise nuclei segmentation with prompt-based finetuning. arXiv 2023, arXiv:2307.00290. [Google Scholar] [CrossRef]
- Graham, S.; Chen, H.; Gamper, J.; Dou, Q.; Heng, P.-A.; Snead, D.; Tsang, Y.W.; Rajpoot, N. MILD-Net: Minimal information loss dilated network for gland instance segmentation in colon histology images. Med. Image Anal. 2019, 52, 199–211. [Google Scholar] [CrossRef] [PubMed]
- Sirinukunwattana, K.; Pluim, J.P.W.; Chen, H.; Qi, X.; Heng, P.-A.; Guo, Y.B.; Wang, L.Y.; Matuszewski, B.J.; Bruni, E.; Sanchez, U.; et al. Gland segmentation in colon histology images: The glas challenge contest. Med. Image Anal. 2017, 35, 489–502. [Google Scholar] [CrossRef] [PubMed]
- Bejnordi, B.E.; Veta, M.; Van Diest, P.J.; Van Ginneken, B.; Karssemeijer, N.; Litjens, G.; Van Der Laak, J.A.W.M.; Hermsen, M.; Manson, Q.F.; Balkenhol, M.; et al. Diagnostic assessment of deep learning algorithms for detection of lymph node metastases in women with breast cancer. JAMA 2017, 318, 2199–2210. [Google Scholar] [CrossRef]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
- Sudre, C.H.; Li, W.; Vercauteren, T.; Ourselin, S.; Cardoso, M.J. Generalised dice overlap as a deep learning loss function for highly unbalanced segmentations. In Proceedings of the Third International Workshop, DLMIA 2017, and 7th International Workshop, ML-CDS 2017, Conjunction with MICCAI 2017, Québec City, QC, Canada, 14 September 2017; Springer: Berlin/Heidelberg, Germany, 2017; pp. 240–248. [Google Scholar]
- Mao, A.; Mohri, M.; Zhong, Y. Cross-entropy loss functions: Theoretical analysis and applications. In Proceedings of the International Conference on Machine Learning, Honolulu, HI, USA, 23–29 July 2023; pp. 23803–23828. [Google Scholar]
- Al-Kababji, A.; Bensaali, F.; Dakua, S.P. Scheduling techniques for liver segmentation: Reducelronplateau vs onecyclelr. In Proceedings of the International Conference on Intelligent Systems and Pattern Recognition, Hammamet, Tunisia, 24–26 March 2022; Springer: Berlin/Heidelberg, Germany, 2022; pp. 204–212. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- Deng, J.; Dong, W.; Socher, R.; Li, L.-J.; Li, K.; Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA, 20–25 June 2009; pp. 248–255. [Google Scholar]
Study | Method | Dataset(s) | Key Findings | Limitations |
---|---|---|---|---|
Zhang et al. (2023) [16] | SAM-Path | BCSS, CRAG | Improvements in Dice score by 27.52% and IOU by 71.63% compared to vanilla SAM. Additional pathology foundation model further improves Dice by 5.07–5.12% and IOU by 4.50–8.48%. | Dependent on quality of trainable class prompts; complexity increases with additional models and fine-tuning. |
Deng et al. (2023) [17] | SAM Zero-Shot | WSI | Good results on large objects; struggles with dense objects. Dice: Tumor—58.71–74.98, Tissue—49.72–96.49, Cell—1.95–88.30. | Ineffective for dense instance object segmentation; requires many prompts for better performance. |
Liu et al. (2024) [18] | WSI-SAM | Histopathology images | Superior performance with multiresolution patches (Dice of 57.37); significant improvement in segmentation tasks. | Complexity in dual mask decoding; high computational resources required. |
Ma et al. (2024) [19] | MedSAM | Multiple modalities | Outperforms specialist models; Dice: Various tasks—95.6% for colon gland segmentation, 96.5% for Skin cancer. | Requires large and diverse training datasets; high dependency on training data availability. |
Ranem et al. (2024) [20] | SAM in radiology | Radiology, pathology | Improved segmentation accuracy; Dice for radiology: 84.49%; pathology: 39.05–77.80%. | Limited to specific medical imaging applications; need for robust annotation strategies. |
Cui et al. (2024) [21] | All-in-SAM | Nuclei segmentation | Enhances SAM with weak prompts; competitive performance; Dice: 82.54%, IOU: 69.74%. | Dependent on quality of weak annotations; limited scalability for large datasets. |
Dice | IoU | mAP | ||||
---|---|---|---|---|---|---|
Training Size | GB-SAM | U-NET | GB-SAM | U-NET | GB-SAM | U-NET |
100% | 0.900 | 0.937 | 0.813 | 0.883 | 0.814 | 0.904 |
50% | 0.876 | 0.914 | 0.781 | 0.845 | 0.778 | 0.883 |
25% | 0.885 | 0.857 | 0.793 | 0.758 | 0.788 | 0.765 |
SD | 0.012 | 0.041 | 0.016 | 0.064 | 0.019 | 0.075 |
Metric | Model | Train Size | Min. Score | Image |
---|---|---|---|---|
GB-SAM | Dice | 100% | 0.629 | test_23 |
50% | 0.648 | test_23 | ||
25% | 0.640 | test_23 | ||
IoU | 100% | 0.489 | test_23 | |
50% | 0.450 | test_23 | ||
25% | 0.491 | test_23 | ||
mAP | 100% | 0.577 | test_23 | |
50% | 0.470 | test_23 | ||
25% | 0.567 | test_23 | ||
U-Net | Dice | 100% | 0.840 | test_39 |
50% | 0.759 | test_15 | ||
25% | 0.624 | test_18 | ||
IoU | 100% | 0.724 | test_39 | |
50% | 0.612 | test_15 | ||
25% | 0.453 | test_18 | ||
mAP | 100% | 0.720 | test_39 | |
50% | 0.662 | test_15 | ||
25% | 0.452 | test_18 |
Model | Grade | Metric | Average |
---|---|---|---|
GB-SAM | Benign | Dice | 0.901 |
IoU | 0.820 | ||
mAP | 0.840 | ||
U-Net | Dice | 0.878 | |
IoU | 0.797 | ||
mAP | 0.873 | ||
GB-SAM | Malignant | Dice | 0.871 |
IoU | 0.781 | ||
mAP | 0.796 | ||
U-Net | Dice | 0.831 | |
IoU | 0.745 | ||
mAP | 0.821 |
Model | Metric | Average |
---|---|---|
GB-SAM | Dice | 0.740 |
IoU | 0.612 | |
mAP | 0.632 | |
U-Net | Dice | 0.491 |
IoU | 0.366 | |
mAP | 0.565 |
Model | Metric | CRAG | GlaS | Camelyon16 |
---|---|---|---|---|
GB-SAM (Our model) | Dice | 0.900 | 0.885 | 0.740 |
IoU | 0.813 | 0.799 | 0.612 | |
mAP | 0.814 | 0.816 | 0.632 | |
SAM-Path | Dice | 0.884 | - | - |
IoU | 0.883 | - | - | |
mAP | - | - | - | |
Med-SAM | Dice | - | 0.956 | - |
IoU | - | - | - | |
mAP | - | - | - |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Villanueva-Miranda, I.; Rong, R.; Quan, P.; Wen, Z.; Zhan, X.; Yang, D.M.; Chi, Z.; Xie, Y.; Xiao, G. Enhancing Medical Imaging Segmentation with GB-SAM: A Novel Approach to Tissue Segmentation Using Granular Box Prompts. Cancers 2024, 16, 2391. https://doi.org/10.3390/cancers16132391
Villanueva-Miranda I, Rong R, Quan P, Wen Z, Zhan X, Yang DM, Chi Z, Xie Y, Xiao G. Enhancing Medical Imaging Segmentation with GB-SAM: A Novel Approach to Tissue Segmentation Using Granular Box Prompts. Cancers. 2024; 16(13):2391. https://doi.org/10.3390/cancers16132391
Chicago/Turabian StyleVillanueva-Miranda, Ismael, Ruichen Rong, Peiran Quan, Zhuoyu Wen, Xiaowei Zhan, Donghan M. Yang, Zhikai Chi, Yang Xie, and Guanghua Xiao. 2024. "Enhancing Medical Imaging Segmentation with GB-SAM: A Novel Approach to Tissue Segmentation Using Granular Box Prompts" Cancers 16, no. 13: 2391. https://doi.org/10.3390/cancers16132391
APA StyleVillanueva-Miranda, I., Rong, R., Quan, P., Wen, Z., Zhan, X., Yang, D. M., Chi, Z., Xie, Y., & Xiao, G. (2024). Enhancing Medical Imaging Segmentation with GB-SAM: A Novel Approach to Tissue Segmentation Using Granular Box Prompts. Cancers, 16(13), 2391. https://doi.org/10.3390/cancers16132391