Skip to main content


Log in

Comparison of different machine learning approaches to detect femoral neck fractures in x-ray images

  • Original Paper
  • Published:
Health and Technology Aims and scope Submit manuscript


Femoral neck fractures are a serious health problem, especially in the elderly population. Misdiagnosis leads to improper treatment and adversely affects the quality of life of the patients. On the other hand, when looking from the perspective of orthopedic surgeons, their workload increases during the pandemic, and the rates of correct diagnosis may decrease with fatigue. Therefore, it becomes essential to help healthcare professionals diagnose correctly and facilitate treatment planning. The main purpose of this study is to develop a framework to detect fractured femoral necks in PXRs (Pelvic X-ray, Pelvic Radiographs) while also researching how different machine learning approaches affect different data distributions. Conventional, LBP (Local Binary Patterns), and HOG (Histogram of Gradients) features were extracted manually from gray-level images to feed the canonical machine learning classifiers. Gray-level and three-channel images were used as inputs to extract the features automatically by CNNs (Convolutional Neural Network). LSTMs (Long Short-Term Memory) and BILSTMs (Bidirectional Long Short-Term Memory) were fed by automatically extracted features. Metaheuristic optimization algorithms, GA (Genetic Algorithm) and PSO (Particle Swarm Optimization), were utilized to optimize hyper-parameters such as the number of the feature maps and the size of the filters in the convolutional layers of the CNN architecture. The majority voting was applied to the results of the different classifiers. For the imbalanced dataset, the best performance was achieved by the 2-layer LSTM architecture that used features extracted from the fifth max-pooling layer of the CNN architecture optimized by GA. For the balanced dataset, the best performance was obtained by the CNN architecture optimized by PSO in terms of the Kappa evaluation metric. Although metaheuristic optimization algorithms such as GA and PSO do not guarantee the optimal solution, they can improve the performance on a not extremely imbalanced dataset especially in terms of sensitivity and Kappa evaluation metrics. On the other hand, for a balanced dataset, more reliable results can be obtained without using metaheuristic optimization algorithms but including them can result in an acceptable agreement in terms of the Kappa metric.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others


  1. Beyaz S. A brief history of artificial intelligence and robotic surgery in orthopedics & traumatology and future expectations. Jt Dis Relat Surg. 2020;31(3):653–5.

    Article  MathSciNet  Google Scholar 

  2. Esteva A, Kuprel B, Novoa RA, Ko J, Swetter SM, Blau HM, Thrun S. Dermatologist level classification of skin cancer with deep neural networks. Nature. 2017;542:115–8.

    Article  Google Scholar 

  3. Habib N, Hasan M, Reza M, Rahman MM. Ensemble of CheXNet and VGG-19 feature extractor with random forest classifier for pediatric pneumonia detection. SN Comput Sci. 2020;1:359.

    Article  Google Scholar 

  4. Lee J-G, Jun S, Cho Y-W, Lee H, Kim GB, Seo JB, Kim N. Deep learning in medical imaging: general overview. Korean J Radiol. 2017;18(4):570–84.

    Article  Google Scholar 

  5. Olczak J, Fahlberg N, Maki A, Razavian AS, Jilert A, Stark A, Sköldenberg O, Gordon M. Artificial intelligence for analyzing orthopedic trauma radiographs. Acta Orthop. 2017;88(6):581–6.

    Article  Google Scholar 

  6. Gulshan V, Peng L, Coram M, Stumpe MC, Wu D, Narayanaswamy A, Venugopalan S, Widner K, Madams T, Juadros J, Kim R, Raman R, Nelson PC, Mega JL, Webster DR. Development and validation of a deep learning algorithm for detection of diabetic retinopathy in retinal fundus photographs. JAMA. 2016;316(22):2402–10.

    Article  Google Scholar 

  7. Tang A, Tam R, Cadrin-Chenevert A, Guest W, Chong J, Barfett J, Chepelev L, Cairns R, Mitchell JR, Cicero MD, Poudrette MG, Jaremko JL, Reinhold C, Gallix B, Gray B, Geis R. Canadian association of radiologists white paper on artificial intelligence in radiology. Can Assoc Radiol J. 2018;69(2):120–35.

    Article  Google Scholar 

  8. Lakhani P, Sundaram B. Deep learning at chest radiography: automated classification of pulmonary tuberculosis by using convolutional neural networks. Radiology. 2017;284:574–82.

    Article  Google Scholar 

  9. Atik OŞ. There is an association between sarcopenia, osteoporosis, and the risk of hip fracture. Eklem Hastalik Cerrahisi. 2019;30:1.

    Article  Google Scholar 

  10. Bozkurt HH, Tokgöz MA, Yapar A, Atik OŞ. What is the importance of canal-to-diaphysis ratio on osteoporosisrelated hip fractures? Eklem Hastalik Cerrahisi. 2019;30(3):296–300.

    Article  Google Scholar 

  11. Leslie WD, O’Donnell S, Jean S, Lagacé C, Walsh P, Bancej C, Morin S, Hanley DA, Papaioannou A. Trends in hip fracture rates in Canada. JAMA. 2009;302(8):883–9.

    Article  Google Scholar 

  12. Lewiecki EM, Wright NC, Curtis JR, Siris E, Gagel RF, Saag KG, Singer AJ, Steven PM, Adler RA. Hip fracture trends in the United States, 2002 to 2015. Osteoporos Int. 2018;29(3):717–22.

    Article  Google Scholar 

  13. Bozkurt HH, Atik OŞ, Tokgöz MA. Can distal radius or vertebra fractures due to low-energy trauma be a harbinger of a hip fracture? Eklem Hastalik Cerrahisi. 2018;29(2):100–3.

    Article  Google Scholar 

  14. Dominguez S, Liu P, Roberts C, Mandell M, Richman PB. Prevalence of traumatic hip and pelvic fractures in patients with suspected hip fracture and negative initial standard radiographs–a study of emergency department patients. Acad Emerg Med. 2005;12(4):366–9.

    Google Scholar 

  15. Perron AD, Miller MD, Brady WJ. Orthopedic pitfalls in the ED: radiographically occult hip fracture. Am J Emerg Med. 2002;20(3):234–7.

    Article  Google Scholar 

  16. Al-Ayyoub M, Al-Zghool D. Determining the type of long bone fractures in X-ray images. WSEAS Trans Inf Sci Appl. 2013;10(8):261–70.

    Google Scholar 

  17. Lim SE, Xing Y, Chen Y, Leow WK, Howe TS, Png MA. Detection of femur and radius fractures in X-ray images. In: Proc. 2nd Int. Conf. on Advances in Medical Signal and Information Processing. 2004, pp. 249–56.

  18. Lum VLF, Leow WK, Chen Y, Howe TS, Png MA. Combining classifiers for bone fracture detection in X-ray images. In: IEEE International Conference on Image Processing, Genova, 2005, pp. 1149–52.

  19. Mahendran SK, Baboo SS. An enhanced tibia fracture detection tool using image processing and classification fusion techniques in X-ray images. Global J Comput Sci Technol. 2011;11(14):22–8.

    Google Scholar 

  20. He JC, Leow WK, Howe TS. (2007) Hierarchical Classifiers for Detection of Fractures in X-ray Images. In: Kropatsch WG, Kampel M, Hanbury A, editors. Computer Analysis of Images and Patterns. CAIP 2007. Lecture Notes in Computer Science, vol 4673. Springer, Berlin, Heidelberg; 2007. pp. 962–9.

  21. Cheng C-T, Ho T-Y, Lee T-Y, Chang C-C, Chou C-C, Chen C-C, Chung I-F, Liao C-H. Application of a deep learning algorithm for detection and visualization of hip fractures on plain pelvic radiographs. Eur Radiol. 2019;29(10):5469–77.

    Article  Google Scholar 

  22. Pranata YD, Wang KC, Wang JC, Idram I, Lai JY, Liu JW, Hsieh IH. Deep learning and SURF for automated classification and detection of calcaneus fractures in CT images. Comput Methods Programs Biomed. 2019;171:27–37.

    Article  Google Scholar 

  23. Adams M, Chen W, Holcdorf D, McCusker MW, Howe PDL, Gaillard F. Computer vs human: Deep learning versus perceptual training for the detection of neck of femur fractures. J Med Imaging Radiat Oncol. 2019;63(1):27–32.

    Article  Google Scholar 

  24. Chung SW, Han SS, Lee JW, Oh KS, Kim NR, Yoon JP, Kim JY, Moon SH, Kwon J, Lee HJ, Noh YM, Kim Y. Automated detection and classification of the proximal humerus fracture by using deep learning algorithm. Acta Orthop. 2018;89(4):468–73.

    Article  Google Scholar 

  25. Urakawa T, Tanaka Y, Goto S, Matsuzawa H, Watanabe K, Endo N. Detecting intertrochanteric hip fractures with orthopedist-level accuracy using a deep convolutional neural network. Skeletal Radiol. 2019;48(2):239–44.

    Article  Google Scholar 

  26. Fernández A, García S, Galar M, Prati RC, Krawczyk B, Herrera F. Foundations on Imbalanced Classification. In: Learning from Imbalanced Data Sets. Springer, Cham. 2018. pp. 19–46.

  27. Krawczyk B. Learning from imbalanced data: open challenges and future directions. Prog Artif Intell. 2016;5:221–32.

    Article  Google Scholar 

  28. Joshi MV. Learning classifier models for predicting rare phenomena. Ph.D. Thesis, University of Minnesota, Twin Cites, MN, USA, 2002.

  29. Kubat M, Matwin S. Addressing the curse of imbalanced training sets: One-sided selection. In: Proceedings of the 14th International Conference on Machine Learning, ICML, Nashville, TN, 1997, pp. 179–186.

  30. Beyaz S, Açıcı K, Sümer E. Femoral neck fracture detection in X-ray images using deep learning and genetic algorithm approaches. Jt Dis Relat Surg. 2020;31(2):175–83.

    Article  Google Scholar 

  31. Sharma N, Ray AK, Sharma S, Shukla KK, Pradhan S, Aggarwal LM. Segmentation and classification of medical images using texture-primitive features: Application of BAM-type artificial neural network. J Med Phys. 2008;33(3):119–26.

    Article  Google Scholar 

  32. Dalal N, Triggs B. Histograms of oriented gradients for human detection. In: IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05), San Diego, CA, USA, 2005, vol. 1, pp. 886–93.

  33. Ojala T, Pietikainen M, Maenpaa T. Multiresolution gray-scale and rotation invariant texture classification with local binary patterns. IEEE Trans Pattern Anal Mach Intell. 2002;24(7):971–87.

    Article  Google Scholar 

  34. Kubat M. An introduction to machine learning. Springer; 2016.

  35. Duda RO, Hart PE, Stork DG. Pattern classification. 2nd ed. New York: Wiley; 2001.

    MATH  Google Scholar 

  36. Boser BE, Guyon IM, Vapnik VN. A training algorithm for optimal margin classifiers. In: Proceedings of the Fifth Annual Workshop on Computational Learning Theory. 1992, pp. 144–152.

  37. Breiman L. Random Forests. Mach Learn. 2001;45(1):5–32.

    Article  Google Scholar 

  38. LeCun Y, Bengio Y, Hinton G. Deep learning. Nature. 2015;521:436–44.

    Article  Google Scholar 

  39. Bengio Y, Simard P, Frasconi P. Learning long-term dependencies with gradient descent is difficult. IEEE Trans Neural Networks. 1994;5:157–66.

    Article  Google Scholar 

  40. Hochreiter S, Schmidhuber J. Long short-term memory. Neural Comput. 1997;9:1735–80.

    Article  Google Scholar 

  41. Karim AM, Güzel MS, Tolun MR, Kaya H, Çelebi FV. A new framework using deep auto-encoder and energy spectral density for medical waveform data classification and processing. Biocybern Biomed Eng. 2019;39(1):148–59.

    Article  Google Scholar 

  42. Karim AM, Güzel MS, Tolun MR, Kaya H, Çelebi FV. A new generalized deep learning framework combining sparse autoencoder and taguchi method for novel data classification and processing. Math Probl Eng. vol. 2018, Article ID 3145947, 13 pages, 2018.

  43. Sivanandam S, Deepa S. Genetic Algorithms. In: Introduction to Genetic Algorithms. Springer, Berlin, Heidelberg; 2008. pp. 15–37.

  44. Kennedy J, Eberhart R. Particle Swarm Optimization. In: Proceedings of IEEE International Conference on Neural Networks. 1995, vol. 4, pp. 1942–1948.

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Koray Açıcı.

Ethics declarations

Availability of data and material

The datasets generated during and/or analyzed during the current study are not publicly available due to privacy issues.

Ethics approval

The study was conducted in accordance with the principles of the Declaration of Helsinki.

Consent to participate

Informed consent was obtained from all individual participants included in the study.

Consent for publication

All authors consent to the publication of the manuscript in SN Computer Science, should the article be accepted by the Editor-in-chief upon completion of the refereeing process.

Conflicts of interest/competing interest

The authors declared no conflicts of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Açıcı, K., Sümer, E. & Beyaz, S. Comparison of different machine learning approaches to detect femoral neck fractures in x-ray images. Health Technol. 11, 643–653 (2021).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: