Fine-Tuned SAM and MedSAM for Automatic Bone Fracture Segmentation in Radiographs

Authors

  • Muhammad Ilyas University of Engineering and Technology, Taxila
  • Muhammad Javed Iqbal Department of Computer Science, University of Engineering and Technology, Taxila
  • Moavia Hassan Department of Computer Science, University of Engineering and Technology, Taxila
  • Syed Mushhad M. Gilani Department of Computer Science, University of Agriculture, Faisalabad

Keywords:

Bone fracture segmentation, Segment Anything Model, MedSAM, RT-DETR, FracAtlas

Abstract

Bone fractures are common in emergency radiology, and outlining them at pixel level supports measurement and treatment planning. Existing studies mostly focus on classification or box detection, and segmentation networks need many pixel labels for targets that cover less than 1% of a radiograph. This study proposes a two-stage pipeline in which an RT-DETR detector proposes fracture boxes and a box-prompted foundation model, the Segment Anything Model (SAM) or MedSAM, delineates each fracture. Only the mask decoder was fine-tuned on the 717 fractured radiographs of the public FracAtlas dataset (573 training, 86 validation and 58 test images), and the detector threshold was chosen on validation Dice. The detector reached a test precision of 0.709, recall of 0.557 and F1-score of 0.624. With ground-truth boxes, fine-tuning raised mean Dice from 0.701 to 0.843 for SAM (IoU 0.735) and from 0.736 to 0.833 for MedSAM (IoU 0.720), both with p < 0.001, and the two fine-tuned models did not differ significantly (p = 0.26). In the automatic pipeline, the transformer detector and the Dice-based threshold raised mean Dice from 0.465 to 0.558 (IoU 0.450) and reduced the test images without a prediction from 17 to 3. The pipeline matched an end-to-end YOLO11-seg model in mean Dice (0.558 against 0.540, p = 0.97) with a lower median HD95 (12.9 against 17.2 pixels). In practice, one box drawn by a clinician or proposed by a detector yields an accurate fracture outline for measurement, and detection recall is the main remaining limit.

References

R. Lindsey, A. Daluiski, S. Chopra, A. Lachapelle, M. Mozer, S. Sicular, D. Hanel, M. Gardner, A. Gupta, R. Hotchkiss, and H. Potter, “Deep neural network improves fracture detection by clinicians,” Proc. Natl. Acad. Sci. U. S. A., vol. 115, no. 45, pp. 11591–11596, Nov. 2018, doi: 10.1073/PNAS.1806905115.

M. Kutbi, “Artificial Intelligence-Based Applications for Bone Fracture Detection Using Medical Images: A Systematic Review,” Diagnostics (Basel, Switzerland), vol. 14, no. 17, p. 1879, Sep. 2024, doi: 10.3390/DIAGNOSTICS14171879.

R. Y. L. Kuo, C. Harrison, T.-A. Curran, B. Jones, A. Freethy, D. Cussons, M. Stewart, G. S. Collins, and D. Furniss, “Artificial Intelligence in Fracture Detection: A Systematic Review and Meta-Analysis,” Radiology, vol. 304, no. 1, pp. 50–62, Jul. 2022, doi: 10.1148/RADIOL.211785.

S. Lee, K. G. Kim, Y. J. Kim, J. S. Jeon, G. P. Lee, K.-C. Kim, and S. H. Jeon, “Automatic Segmentation and Radiologic Measurement of Distal Radius Fractures Using Deep Learning,” Clin. Orthop. Surg., vol. 16, no. 1, pp. 113–124, Feb. 2024, doi: 10.4055/CIOS23130.

X. Wang and Y. Wang, “Composite Attention Residual U-Net for Rib Fracture Detection,” Entropy, vol. 25, no. 3, p. 466, Mar. 2023, doi: 10.3390/E25030466.

I. Abedeen, M. A. Rahman, F. Z. Prottyasha, T. Ahmed, T. M. Chowdhury, and S. Shatabda, “FracAtlas: A Dataset for Fracture Classification, Localization and Segmentation of Musculoskeletal Radiographs,” Sci. Data, vol. 10, no. 1, pp. 521-, Aug. 2023, doi: 10.1038/s41597-023-02432-4.

A. Kirillov, E. Mintun, N. Ravi, H. Mao, C. Rolland, L. Gustafson, T. Xiao, S. Whitehead, A. C. Berg, W.-Y. Lo, P. Dollár, and R. Girshick, “Segment Anything,” Proc. IEEE Int. Conf. Comput. Vis., pp. 3992–4003, Apr. 2023, doi: 10.1109/ICCV51070.2023.00371.

J. Ma, Y. He, F. Li, L. Han, C. You, and B. Wang, “Segment Anything in Medical Images,” Nat. Commun., vol. 15, no. 1, p. 654, Jan. 2024, doi: 10.1038/s41467-024-44824-z.

M. A. Mazurowski, H. Dong, H. Gu, J. Yang, N. Konz, and Y. Zhang, “Segment anything model for medical image analysis: An experimental study,” Med. Image Anal., vol. 89, p. 102918, Oct. 2023, doi: 10.1016/J.MEDIA.2023.102918.

Y. Huang, X. Yang, L. Liu, H. Zhou, A. Chang, X. Zhou, R. Chen, J. Yu, J. Chen, C. Chen, S. Liu, H. Chi, X. Hu, K. Yue, L. Li, V. Grau, D.-P. Fan, F. Dong, and D. Ni, “Segment anything model for medical images?,” Med. Image Anal., vol. 92, p. 103061, Feb. 2024, doi: 10.1016/J.MEDIA.2023.103061.

Y. Zhang, Z. Shen, and R. Jiao, “Segment anything model for medical image segmentation: Current applications and future directions,” Comput. Biol. Med., vol. 171, p. 108238, Mar. 2024, doi: 10.1016/J.COMPBIOMED.2024.108238.

H. Gu, H. Dong, J. Yang, and M. A. Mazurowski, “How to build the best medical image segmentation algorithm using foundation models: a comprehensive empirical study with Segment Anything Model,” Mach. Learn. Biomed. Imaging, vol. 2025, no. May 2025, pp. 88–120, May 2025, doi: 10.59275/j.melba.2025-86a6.

C. Magg, H. Kervadec, and C. I. Sánchez, “Zero-shot capability of SAM-family models for bone segmentation in CT scans,” Nov. 2024, Accessed: Nov. 10, 2026. [Online]. Available: https://arxiv.org/pdf/2411.08629

J. Wu, W. Ji, Y. Liu, H. Fu, M. Xu, Y. Xu, and Y. Jin, “Medical sam adapter: Adapting segment anything model for medical image segmentation,” arXiv Prepr. arXiv2304.12620, vol. 1, 2023, doi: https://doi.org/10.48550/arXiv.2304.12620.

S. Pandey, K.-F. Chen, and E. B. Dam, “Comprehensive Multimodal Segmentation in Medical Imaging: Combining YOLOv8 with SAM and HQ-SAM Models,” Oct. 2023, Accessed: Nov. 10, 2026. [Online]. Available: https://arxiv.org/pdf/2310.12995

A. Ahmed, A. S. Imran, Z. Kastrati, and S. M. Daudpota, “Beyond prompt-only segmentation: Foundation model–guided trust-region label refinement for single-stage bone fracture instance segmentation,” Eng. Appl. Artif. Intell., vol. 182, p. 115849, Oct. 2026, doi: 10.1016/J.ENGAPPAI.2026.115849.

M. Ilyas, “Bone fracture detection and segmentation using deep learning,” unpublished M.S. thesis, Department of Computer Science, University of Engineering and Technology, Taxila, Pakistan, 2026.

U. Muhammad, W. Wang, A. Hadid, and S. Pervez, “Bag of words KAZE (BoWK) with two-step classification for high-resolution remote sensing images,” IET Comput. Vis., vol. 13, no. 4, pp. 395–403, Jun. 2019, doi: 10.1049/IET-CVI.2018.5069.

N. Carion, F. Massa, G. Synnaeve, N. Usunier, A. Kirillov, and S. Zagoruyko, “End-to-End Object Detection with Transformers,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 12346 LNCS, pp. 213–229, 2020, doi: 10.1007/978-3-030-58452-8_13.

Y. Zhao, W. Lv, S. Xu, J. Wei, G. Wang, Q. Dang, Y. Liu, and J. Chen, “DETRs Beat YOLOs on Real-time Object Detection,” Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., pp. 16965–16974, Jun. 2024, doi: 10.1109/CVPR52733.2024.01605.

J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You Only Look Once: Unified, Real-Time Object Detection,” Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., vol. 2016-December, pp. 779–788, Jun. 2016, doi: 10.1109/CVPR.2016.91.

Y. L. Thian, Y. Li, P. Jagmohan, D. Sia, V. E. Yao Chan, and R. T. Tan, “Convolutional Neural Networks for Automated Fracture Detection and Localization on Wrist Radiographs,” Radiol. Artif. Intell., vol. 1, no. 1, p. e180001, Jan. 2019, doi: 10.1148/RYAI.2019180001.

E. Nagy, M. Janisch, F. Hržić, E. Sorantin, and S. Tschauner, “A pediatric wrist trauma X-ray dataset (GRAZPEDWRI-DX) for machine learning,” Sci. Data, vol. 9, no. 1, p. 222, May 2022, doi: 10.1038/S41597-022-01328-Z.

R. Y. Ju and W. Cai, “Fracture detection in pediatric wrist trauma X-ray images using YOLOv8 algorithm,” Sci. Rep., vol. 13, no. 1, p. 20077, Nov. 2023, doi: 10.1038/S41598-023-47460-7.

D. Bhattacharya, S. Das, T. Biswas, and G. Mandal, “ResNet based backbone integrated YOLO framework for bone fracture detection,” Sci. Rep., vol. 16, no. 1, pp. 12954-, Mar. 2026, doi: 10.1038/s41598-026-41782-y.

P. Chen, S. Liu, W. Lu, F. Lu, and B. Ding, “WCAY object detection of fractures for X-ray images of multiple sites,” Sci. Rep., vol. 14, no. 1, pp. 26702-, Nov. 2024, doi: 10.1038/s41598-024-77878-6.

J. Zou and M. R. Arshad, “Detection of whole body bone fractures based on improved YOLOv7,” Biomed. Signal Process. Control, vol. 91, p. 105995, May 2024, doi: 10.1016/J.BSPC.2024.105995.

O. Ronneberger, P. Fischer, and T. Brox, “U-Net: Convolutional Networks for Biomedical Image Segmentation,” Lect. Notes Comput. Sci., vol. 9351, pp. 234–241, Oct. 2015, doi: 10.1007/978-3-319-24574-4_28.

F. Milletari, N. Navab, and S.-A. Ahmadi, “V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation,” arXiv:1606.04797, 2016, doi: https://doi.org/10.48550/arXiv.1606.04797.

T. Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollar, “Focal Loss for Dense Object Detection,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 42, no. 2, pp. 318–327, Feb. 2020, doi: 10.1109/TPAMI.2018.2858826.

S. Turk, O. Bingol, A. Coskuncay, and T. Aydin, “The impact of implementing backbone architectures on fracture segmentation in X-ray images,” Eng. Sci. Technol. an Int. J., vol. 59, p. 101883, Nov. 2024, doi: 10.1016/J.JESTCH.2024.101883.

G. González, J. Galant, J. M. Salinas, E. Benítez, M. D. Sánchez-Valverde, J. Calbo, and N. Cerrolaza, “Classification and segmentation of hip fractures in x-rays: highlighting fracture regions for interpretable diagnosis,” Insights Imaging, vol. 16, no. 1, pp. 86-, Apr. 2025, doi: 10.1186/S13244-025-01958-Y.

Y. Liu, S. Yibulayimu, G. Zhu, C. Shi, C. Liang, C. Zhao, X. Wu, Y. Sang, and Y. Wang, “Automatic pelvic fracture segmentation: a deep learning approach and benchmark dataset,” Front. Med., vol. 12, p. 1511487, Apr. 2025, doi: 10.3389/FMED.2025.1511487.

F. Isensee, P. F. Jaeger, S. A. A. Kohl, J. Petersen, and K. H. Maier-Hein, “nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation,” Nat. Methods, vol. 18, no. 2, pp. 203–211, Dec. 2020, doi: 10.1038/s41592-020-01008-z.

A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale,” ICLR 2021 - 9th Int. Conf. Learn. Represent., Oct. 2020, Accessed: Feb. 21, 2024. [Online]. Available: https://arxiv.org/abs/2010.11929v2

K. He, X. Chen, S. Xie, Y. Li, P. Dollar, and R. Girshick, “Masked Autoencoders Are Scalable Vision Learners,” Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., vol. 2022-June, pp. 15979–15988, 2022, doi: 10.1109/CVPR52688.2022.01553.

E. J. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, L. Wang, and W. Chen, “LoRA: Low-Rank Adaptation of Large Language Models,” arXiv:2106.09685, 2021, [Online]. Available: https://arxiv.org/abs/2106.09685

N. Ravi, V. Gabeur, Y.-T. Hu, R. Hu, C. Ryali, T. Ma, H. Khedr, R. Rädle, C. Rolland, L. Gustafson, E. Mintun, J. Pan, K. V. Alwala, N. Carion, C.-Y. Wu, R. Girshick, P. Dollár, and C. Feichtenhofer, “Sam 2: Segment anything in images and videos,” arXiv Prepr. arXiv2408.00714, 2024, doi: https://doi.org/10.48550/arXiv.2408.00714.

C. Chang, H. Law, C. Poon, S. Yen, K. Lall, A. Jamshidi, V. Malis, D. Hwang, and W. C. Bae, “Segment Anything Model (SAM) and Medical SAM (MedSAM) for Lumbar Spine MRI,” Sensors, vol. 25, no. 12, p. 3596, Jun. 2025, doi: 10.3390/S25123596.

R. Solovyev, W. Wang, and T. Gabruseva, “Weighted boxes fusion: Ensembling boxes from different object detection models,” Image Vis. Comput., vol. 107, p. 104117, Mar. 2021, doi: 10.1016/J.IMAVIS.2021.104117.

N. Bodla, B. Singh, R. Chellappa, and L. S. Davis, “Soft-NMS -- Improving Object Detection With One Line of Code,” Proc. IEEE Int. Conf. Comput. Vis., vol. 2017-October, pp. 5562–5570, Apr. 2017, doi: 10.1109/ICCV.2017.593.

G. Jocher, A. Chaurasia, and J. Qiu, “Ultralytics YOLO, GitHub repository,” 2023. Accessed: Nov. 11, 2026. [Online]. Available: https://github.com/ultralytics/ultralytics

T. Wolf, L. Debut, V. Sanh, J. Chaumond, C. Delangue, A. Moi, P. Cistac, T. Rault, R. Louf, M. Funtowicz, J. Davison, S. Shleifer, P. von Platen, C. Ma, Y. Jernite, J. Plu, C. Xu, T. Le Scao, S. Gugger, M. Drame, Q. Lhoest, and A. M. Rush, “Transformers: State-of-the-Art Natural Language Processing,” EMNLP 2020 - Conf. Empir. Methods Nat. Lang. Process. Proc. Syst. Demonstr., pp. 38–45, 2020, doi: 10.18653/V1/2020.EMNLP-DEMOS.6.

A. A. Taha and A. Hanbury, “Metrics for evaluating 3D medical image segmentation: analysis, selection, and tool,” BMC Med. Imaging, vol. 15, no. 1, pp. 29-, Aug. 2015, doi: 10.1186/S12880-015-0068-X.

B. Efron and R. J. Tibshirani, “An Introduction to the Bootstrap,” Chapman and Hall/CRC, May 1994, doi: 10.1201/9780429246593.

F. Wilcoxon, “Individual Comparisons by Ranking Methods,” Biometrics Bulletin, vol. 1, no. 6, pp. 80–83, 1945, doi: 10.2307/3001968.

S. Holm, “A Simple Sequentially Rejective Multiple Test Procedure,” Scand. J. Stat., vol. 6, no. 2, pp. 65–70, 1979, doi: 10.2307/4615733.

Downloads

Published

2026-11-17

How to Cite

Muhammad Ilyas, Iqbal, M. J., Hassan, M., & Gilani, S. M. M. (2026). Fine-Tuned SAM and MedSAM for Automatic Bone Fracture Segmentation in Radiographs. International Journal of Innovations in Science & Technology, 8(11), 4212–4234. Retrieved from https://journal.50sea.com/index.php/IJIST/article/view/2144