Convolutional Neural Network-Based Approach for Cobb Angle Measurement Using Mask R-CNN
Abstract
:1. Introduction
2. Related Works
3. Materials and Methods
3.1. Materials
3.2. Methods
3.2.1. Preprocessing Stage
3.2.2. Processing Stage 1: Network Training
3.2.3. Processing Stage 2: Cobb Angle Quantification and Scoliosis Severity Assessment
- Image acquisition is visualized in Figure 7a. The process begins with image acquisition through a user interface that allows the upload of an anteroposterior (AP) full spine X-ray image.
- Figure 7b shows the spine segmentation step using Mask R-CNN. Before inference, the input image is rescaled to a height of 2000 pixels. Once the model is loaded, the inference is initiated on the input image. We defined the confidence value during training. Only masks with a confidence score above this threshold are considered as detected regions. The mask with the largest segmented area is selected as the spinal region, assuming it corresponds to the spine. The Cobb angle quantification is highly dependent on the precision of the generated mask. The more accurate the mask, the more precise the assessment. To this end, the prediction of the model was optimized during training, and the best epoch was used for inference, aiming to ensure the highest possible accuracy in the generation of the mask.
- In Figure 7c, contour extraction and midpoint detection are illustrated. Once the segmentation mask is obtained, the spinal contour is extracted using OpenCV’s cv2.findContours() function, which is employed for contour detection in binary images. This contour with the largest segmented area is overlaid onto the image. Our approach is based on the capacity of the algorithms developed to build the spinal curvature within the contour extracted. To this end, we proposed the use of a grid, only considering the horizontal lines drawn in the image, to establish points that will be used to connect and build the spinal curvature. The interface provides a widget to define the grid interval, offering flexibility during the adjustment process. The objective of this method is to ensure that these horizontal lines fall within the lumbar and thoracic vertebrae with the highest possible accuracy. This technique facilitates an approximation of individual vertebrae segmentation. Each vertebra is segmented, without the need to train the model to detect each vertebra individually. The optimal grid interval value, predefined to 50 pixels, was defined through experimental testing using the widget and observing that the estimation of the midline spine curvature replicates the contour shape. At each grid line, two intersection points are detected where the line crosses the spinal contour. The algorithm calculates the mean distance between these two points, defining the midpoint on the image. These midpoints are the key reference for spinal curve construction through their connection. The extracted midpoints approximate the spinal curve, with the first and last point identified as upper and lower, limiting the length of the spine. A spline interpolation is applied to refine the connections between midpoints, smoothing the spinal path. Then, the algorithm draws a line perpendicular to the tangent of the curve at each midpoint, excluding the upper and lower points. The angle between these perpendicular lines with respect to the horizontal represents the vertebrae inclination at each midpoint and is computed and annotated on the image. The algorithm is designed to draw these tilted lines within the contour as a simplified representation of the vertebrae. This approach just described, which enables the spinal curvature estimation, has been designed as a proof of concept for the proposed methodology. It clearly depends on prior segmentation and assumptions such as local vertebral symmetry. However, these elements are part of an improvement process, and its optimization further strengthens the results of this initial proposal.
- Figure 7d depicts spinal curve estimation and Cobb angle calculation, based on the analysis of the curvature. The algorithm swipes the curvature and identifies the key anatomical landmarks following their definition: tilted vertebrae are defined as the vertebrae with the greatest inclination angle. They represent the greatest spinal deviation. Apex points correspond to the locations where the spinal curvature reaches its maximum deformation; that is, the points with the greatest lateral displacement relative to a vertical reference line. In our study, this reference is defined as the vertical line drawn from the upper reference point. It is important to note that when the algorithm addresses complex curvatures, two apex points are detected, one on the left (corresponding to negative distances), and one on the right (corresponding to positive distances). The algorithm was designed with a logic to distinguish the type of the curvature, simple or complex, in order to detect the correct number of tilted vertebrae and apex points, to provide either a single Cobb angle measurement or separate upper and lower Cobb angle measurement. The apex point, which refers to the peak of the spinal deviation, is critical for scoliosis assessment. To emulate the manual method, the most tilted vertebrae are isolated and represented on the image, remarked with red lines. Then, the algorithm draws perpendicular green lines from the midpoints corresponding to the most tilted vertebrae and connects them, as performed by clinical experts. The algorithm identifies the intersection point between these green lines, and the angle formed at their intersection is calculated. The Cobb angle and the severity classification are annotated on the image.
- Finally, the visualization and data export stage is presented in Figure 7e. The output is displayed in a multi-panel layout including the input X-ray image; the result of the Mask R-CNN segmentation; the extracted spinal contour with the computed midpoints, midline, and vertebral inclinations; the image showing Cobb angle measurement and severity classification; and the data table containing geometrical information, anatomical landmarks such as tilted vertebrae and upper, lower, and apex points. Processed images and the data table are exported as structured reports in .png and .csv formats, providing a comprehensive representation of the entire process.
3.2.4. Postprocessing Stage: Agreement Between Manual and the Automated Cobb Angle Method
- A Bland–Altman analysis [46] was carried out to evaluate the agreement between two methods by plotting the difference between the two measurements against their average. This graphical method allows the identification of any systematic bias and the definition of the limits of agreement. It is commonly used in medical applications to evaluate whether an automated method can replace or complement manual approaches.
- The intraclass correlation coefficient (ICC) with 95% confidence interval [47] is used to evaluate the reliability of measurements between two or more observers. In this case, it assessed the level of agreement between automatic and manual Cobb angle quantifications. The 95% confidence interval provides an estimate of the precision and stability of the ICC value.
- The median absolute difference (MAD) [47] is a robust measure of dispersion that is calculated as the median of the absolute differences from the median of any dataset. MAD is less affected by outliers than the standard deviation, making it a suitable tool for assessing variability when there are a few extreme values. In this case, it provided a typical error estimation that was more robust against outliers or occasional discrepancies.
- The mean absolute error (MAE) [47] was also included to quantify the average of the differences between the Cobb angles obtained manually and those obtained automatically.
- The standard deviation (SD) [47] measures the variability of the differences between measurements.
4. Experimental Analysis and Results
4.1. Instance Segmentation
4.2. Cobb Angle Measurement
5. Discussion and Scope
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Scoliosis | Scoliosis Research Society. Available online: https://www.srs.org/Patients/Conditions/Scoliosis (accessed on 12 September 2024).
- Horng, M.H.; Kuok, C.P.; Fu, M.J.; Lin, C.J.; Sun, Y.N. Cobb Angle Measurement of Spine from X-Ray Images Using Convolutional Neural Network. Comput. Math. Methods Med. 2019, 2019, 6357171. [Google Scholar] [CrossRef] [PubMed]
- Thalengala, A.; Bhat, S.N.; Anitha, H. Computerized image understanding system for reliable estimation of spinal curvature in idiopathic scoliosis. Sci. Rep. 2021, 11, 7144. [Google Scholar] [CrossRef] [PubMed]
- Han, S.; Zhao, H.; Zhang, Y.; Yang, C.; Han, X.; Wu, H.; Cao, L.; Yu, B.; Wen, J.X.; Wu, T.; et al. Application of machine learning standardized integral area algorithm in measuring the scoliosis. Sci. Rep. 2023, 13, 19255. [Google Scholar] [CrossRef]
- Wiliński, P.; Piekutin, A.; Dmowska, K.; Zawieja, W.; Janusz, P. Which Method of the Radiologic Measurements of the Angle of Curvature in Idiopathic Scoliosis is the Most Reliable for an Inexperienced Researcher? Indian J. Orthop. 2025, 59, 140–147. [Google Scholar] [CrossRef]
- Vertebral column | Anatomy & Function | Britannica. Available online: https://www.britannica.com/science/vertebral-column (accessed on 6 February 2025).
- Li, K.; Gu, H.; Colglazier, R.; Lark, R.; Hubbard, E.; French, R.; Smith, D.; Zhang, J.; McCrum, E.; Catanzano, A.; et al. Deep Learning Automates Cobb Angle Measurement Compared with Multi-Expert Observers. arXiv 2024, arXiv:2403.12115. [Google Scholar] [CrossRef]
- Gstoettner, M.; Sekyra, K.; Walochnik, N.; Winter, P.; Wachter, R.; Bach, C.M. Inter- and intraobserver reliability assessment of the Cobb angle: Manual versus digital measurement tools. Eur. Spine J. 2007, 16, 1587–1592. [Google Scholar] [CrossRef] [PubMed]
- Anitha, H.; Karunakar, A.K.; Dinesh, K.V.N. Automatic extraction of vertebral endplates from scoliotic radiographs using customized filter. Biomed. Eng. Lett. 2014, 4, 158–165. [Google Scholar] [CrossRef]
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask R-CNN. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar] [CrossRef]
- Khanal, B.; Dahal, L.; Adhikari, P.; Khanal, B. Automatic Cobb Angle Detection Using Vertebra Detector and Vertebra Corners Regression. In Computational Methods and Clinical Applications for Spine Imaging; Cai, Y., Wang, L., Audette, M., Zheng, G., Li, S., Eds.; Springer International Publishing: Cham, Switzerland, 2020; pp. 81–87. [Google Scholar] [CrossRef]
- Fu, X.; Yang, G.; Zhang, K.; Xu, N.; Wu, J. An automated estimator for Cobb angle measurement using multi-task networks. Neural Comput. Appl. 2021, 33, 4755–4761. [Google Scholar] [CrossRef]
- Huang, X.; Luo, M.; Liu, L.; Wu, D.; You, X.; Deng, Z.; Xiu, P.; Yang, X.; Zhou, C.; Feng, G.; et al. The Comparison of Convolutional Neural Networks and the Manual Measurement of Cobb Angle in Adolescent Idiopathic Scoliosis. Glob. Spine J. 2024, 14, 159–168. [Google Scholar] [CrossRef]
- Caesarendra, W.; Rahmaniar, W.; Mathew, J.; Thien, A. Automated Cobb Angle Measurement for Adolescent Idiopathic Scoliosis Using Convolutional Neural Network. Diagnostics 2022, 12, 396. [Google Scholar] [CrossRef]
- Chui, C.S.; He, Z.; Lam, T.P.; Mak, K.K.; Ng, H.T.; Fung, C.H.; Chan, M.S.; Law, S.W.; Lee, Y.W.; Hung, L.H.; et al. Deep Learning-Based Prediction Model for the Cobb Angle in Adolescent Idiopathic Scoliosis Patients. Diagnostics 2024, 14, 1263. [Google Scholar] [CrossRef]
- Vrtovec, T.; Pernuš, F.; Likar, B. A review of methods for quantitative evaluation of spinal curvature. Eur. Spine J. 2009, 18, 593–607. [Google Scholar] [CrossRef] [PubMed]
- Jin, C.; Wang, S.; Yang, G.; Li, E.; Liang, Z. A Review of the Methods on Cobb Angle Measurements for Spinal Curvature. Sensors 2022, 22, 3258. [Google Scholar] [CrossRef] [PubMed]
- Sun, H.; Zhen, X.; Bailey, C.; Rasoulinejad, P.; Yin, Y.; Li, S. Direct Estimation of Spinal Cobb Angles by Structured Multi-output Regression. In Information Processing in Medical Imaging; Niethammer, M., Styner, M., Aylward, S., Zhu, H., Oguz, I., Yap, P.T., Shen, D., Eds.; Springer International Publishing: Cham, Switzerland, 2017; pp. 529–540. [Google Scholar] [CrossRef]
- Wu, H.; Bailey, C.; Rasoulinejad, P.; Li, S. Automatic Landmark Estimation for Adolescent Idiopathic Scoliosis Assessment Using BoostNet. In Medical Image Computing and Computer Assisted Intervention—MICCAI 2017; Descoteaux, M., Maier-Hein, L., Franz, A., Jannin, P., Collins, D.L., Duchesne, S., Eds.; Springer International Publishing: Cham, Switzerland, 2017; pp. 127–135. [Google Scholar] [CrossRef]
- Wu, H.; Bailey, C.; Rasoulinejad, P.; Li, S. Automated comprehensive Adolescent Idiopathic Scoliosis assessment using MVC-Net. Med. Image Anal. 2018, 48, 1–11. [Google Scholar] [CrossRef] [PubMed]
- Chen, B.; Xu, Q.; Wang, L.; Leung, S.; Chung, J.; Li, S. An Automated and Accurate Spine Curve Analysis System. IEEE Access 2019, 7, 124596–124605. [Google Scholar] [CrossRef]
- Yang, J.; Zhang, K.; Fan, H.; Huang, Z.; Xiang, Y.; Yang, J.; He, L.; Zhang, L.; Yang, Y.; Li, R.; et al. Development and validation of deep learning algorithms for scoliosis screening using back images. Commun. Biol. 2019, 2, 390. [Google Scholar] [CrossRef]
- Yi, J.; Wu, P.; Huang, Q.; Qu, H.; Dimitris, D.N. Vertebra-Focused Landmark Detection for Scoliosis Assessment. Available online: https://ieeexplore.ieee.org/document/9098675 (accessed on 8 April 2025).
- Cerqueiro, J.; Comesaña-Campos, A.; Casal-Guisande, M.; Bouza-Rodríguez, J. A proposal for using active contour parametrical models in Cobb angle determination. In Proceedings of the Ninth International Conference on Technological Ecosystems for Enhancing Multiculturality, Barcelona, Spain, 26–29 October 2021. [Google Scholar] [CrossRef]
- Sun, Y.; Xing, Y.; Zhao, Z.; Meng, X.; Xu, G.; Hai, Y. Comparison of manual versus automated measurement of Cobb angle in idiopathic scoliosis based on a deep learning keypoint detection technology. Eur. Spine J. 2022, 31, 1969–1978. [Google Scholar] [CrossRef]
- Maeda, Y.; Nagura, T.; Nakamura, M.; Watanabe, K. Automatic measurement of the Cobb angle for adolescent idiopathic scoliosis using convolutional neural network. Sci. Rep. 2023, 13, 14576. [Google Scholar] [CrossRef]
- Qiu, Z.; Yang, J.; Wang, J. MMA-Net: Multiple Morphology-Aware Network for Automated Cobb Angle Measurement. In Proceedings of the 2024 IEEE International Conference on Robotics and Automation (ICRA), Yokohama, Japan, 13–17 May 2024; pp. 9139–9145. [Google Scholar] [CrossRef]
- Suri, A.; Tang, S.; Kargilis, D.; Taratuta, E.; Kneeland, B.J.; Choi, G.; Agarwal, A.; Anabaraonye, N.; Xu, W.; Parente, J.B.; et al. Conquering the Cobb Angle: A Deep Learning Algorithm for Automated, Hardware-Invariant Measurement of Cobb Angle on Radiographs in Patients with Scoliosis. Radiol. Artif. Intell. 2023, 5, e220158. [Google Scholar] [CrossRef]
- Hoblidar, A.; Prabhu, G. Automatic Quantification of Spinal Curvature in Scoliotic Radiograph using Image Processing. J. Med. Syst. 2011, 36, 1943–1951. [Google Scholar] [CrossRef]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. In Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015; Navab, N., Hornegger, J., Wells, W.M., Frangi, A.F., Eds.; Springer International Publishing: Cham, Switzerland, 2015; pp. 234–241. [Google Scholar] [CrossRef]
- Vuola, A.O.; Akram, S.U.; Kannala, J. Mask-RCNN and U-Net Ensembled for Nuclei Segmentation. In Proceedings of the 2019 IEEE 16th International Symposium on Biomedical Imaging (ISBI 2019), Venice, Italy, 8–11 April 2019; pp. 208–212. [Google Scholar] [CrossRef]
- Alharbi, R.H.; Alshaye, M.B.; Alkanhal, M.M.; Alharbi, N.M.; Alzahrani, M.A.; Alrehaili, O.A. Deep Learning Based Algorithm For Automatic Scoliosis Angle Measurement. In Proceedings of the 2020 3rd International Conference on Computer Applications & Information Security (ICCAIS), Riyadh, Saudi Arabia, 19–21 March 2020; pp. 1–5. [Google Scholar] [CrossRef]
- Zhang, L.; Shi, L.; Cheng, J.C.Y.; Chu, W.C.W.; Yu, S.C.H. LPAQR-Net: Efficient Vertebra Segmentation From Biplanar Whole-Spine Radiographs. IEEE J. Biomed. Health Inform. 2021, 25, 2710–2721. [Google Scholar] [CrossRef] [PubMed]
- Zhao, Y.; Zhang, J.; Li, H.; Gu, X.; Li, Z.; Zhang, S. Automatic Cobb angle measurement method based on vertebra segmentation by deep learning. Med. Biol. Eng. Comput. 2022, 60, 2257–2269. [Google Scholar] [CrossRef] [PubMed]
- Jason, C.W.; Reformat, M.Z.; Parent, E.C.; Stampe, K.P.; Hryniuk, S.C.S.; Edmond, H.L. Validation of an artificial intelligence-based method to automate Cobb angle measurement on spinal radiographs of children with adolescent idiopathic scoliosis. Eur. J. Phys. Rehabil. Med. 2023, 54, 535–542. [Google Scholar] [CrossRef]
- Low, X.Z.; Furqan, M.S.; Makmur, A.; Lim, D.S.W.; Liu, R.W.; Lim, X.; Chan, Y.H.; Tan, J.H.; Lau, L.L.; Hallinan, J.T.P.D. Automated Cobb angle measurement in scoliosis radiographs: A deep learning approach for screening. Ann. Acad. Med. Singap. 2024, 53, 635–637. [Google Scholar] [CrossRef]
- Liang, Z.; Wang, Q.; Xia, C.; Chen, Z.; Xu, M.; Liang, G.; Zhang, Y.; Ye, C.; Zhang, Y.; Yu, X.; et al. From 2D to 3D: Automatic measurement of the Cobb angle in adolescent idiopathic scoliosis with the weight-bearing 3D imaging. Spine J. 2024, 24, 1282–1292. [Google Scholar] [CrossRef]
- Rahmaniar, W.; Suzuki, K.; Lin, T.L. Auto-CA: Automated Cobb Angle Measurement Based on Vertebrae Detection for Assessment of Spinal Curvature Deformity. IEEE Trans. Biomed. Eng. 2024, 71, 640–649. [Google Scholar] [CrossRef]
- Kassab, D.K.I.; Kamyshanskaya, I.G.; Pershin, A.A. Automatic scoliosis angle measurement using deep learning methods, how far we are from clinical application: A narrative review. Medicine 2021, 16, 85–94. [Google Scholar]
- Maharasi, M.; Senthilnayaki, N.; Snehaprabha, K. Vertebrae Landmark Detection and Scoliosis Assessment Using Deep Learning. In Proceedings of the 2024 International Conference on Communication, Computing and Internet of Things (IC3IoT), Chennai, India, 17–18 April 2024; pp. 1–6. [Google Scholar] [CrossRef]
- Pan, Y.; Chen, Q.; Chen, T.; Wang, H.; Zhu, X.; Fang, Z.; Lu, Y. Evaluation of a computer-aided method for measuring the Cobb angle on chest X-rays. Eur. Spine J. 2019, 28, 3035–3043. [Google Scholar] [CrossRef]
- AASCE | AASCE—MICCAI 2019 Challenge: Accurate Automated Spinal Curvature Estimation. Available online: https://aasce19.github.io/ (accessed on 1 February 2025).
- GitHub—Matterport/Mask_RCNN: Mask R-CNN for Object Detection and Instance Segmentation on Keras and TensorFlow. Available online: https://github.com/matterport/Mask_RCNN (accessed on 12 September 2024).
- Gad, A. Ahmedfgad/Mask-RCNN-TF2. (February, 2025). Python. Available online: https://github.com/ahmedfgad/Mask-RCNN-TF2 (accessed on 8 February 2025).
- Kundu, R.; Lenka, P.; Kumar, R.; Chakrabarti, A. Cobb angle quantification for scoliosis using image processing techniques. In Proceedings of the International Conference on Recent Advances and Future Trends in Information Technology (iRAFIT2012), Tamil Nadu, India, 19–21 April 2012. [Google Scholar]
- Altman, D.G. Practical Statistics for Medical Research; Chapman and Hall/CRC: New York, NY, USA, 1990. [Google Scholar] [CrossRef]
- Armitage, P.; Berry, G.; Matthews, J.N.S. Statistical Methods in Medical Research; John Wiley & Sons: Hoboken, NJ, USA, 2013. [Google Scholar]
Cobb Angle | Definition |
---|---|
0–10° | Spinal curve |
10–20° | Mild scoliosis |
20–40° | Moderate scoliosis |
>40° | Severe scoliosis |
Threshold | mIoU | mDSC | mAP | Mean Precision | Mean Recall | Over-Seg | Under-Seg |
---|---|---|---|---|---|---|---|
0.85 (epoch 146) | 0.8012 | 0.8878 | 0.645 | 0.9145 | 0.8643 | 0.0855 | 0.1357 |
0.85 (epoch 155) | 0.7980 | 0.8857 | 0.655 | 0.9150 | 0.8599 | 0.0850 | 0.1401 |
0.85 (epoch 287) | 0.7818 | 0.8750 | 0.625 | 0.9313 | 0.8268 | 0.0687 | 0.1732 |
Analysis | ICC (95% CI) | MAD ± SD | MAE ± SD |
---|---|---|---|
Observer A vs. Observer B | 0.939 (0.868, 0.971) | 3.00° ± 1.67° | 3.31° ± 1.53° |
Cobb Angle Measurements | Mean ± Standard Deviation (Range) |
---|---|
Manual measurement by observer A | 25.43° ± 10.85° (range 11.50–54.00°) |
Manual measurement by observer B | 25.89° ± 10.00° (range 10.00–53.00°) |
Measured by the automated method | 26.69° ± 12.50° (range 10.29–59.34°) |
Analysis | ICC (95% CI) | MAD ± SD | MAE ± SD |
---|---|---|---|
Observer A vs. observer B | 0.939 (0.868, 0.971) | 3.00° ± 1.67° | 3.31° ± 1.53° |
Observer A vs. automated | 0.961 (0.926, 0.984) | 2.15° ± 2.03° | 2.54° ± 2.06° |
Observer B vs. automated | 0.895 (0.780, 0.950) | 3.60° ± 3.27° | 4.07° ± 3.22° |
Overall: Observer A & B vs. automated | 0.928 (0.853, 0.967) | 2.17° ± 2.51° | 2.96° ± 2.60° |
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. |
© 2025 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
García, M.V.; Bouza-Rodríguez, J.-B.; Comesaña-Campos, A. Convolutional Neural Network-Based Approach for Cobb Angle Measurement Using Mask R-CNN. Diagnostics 2025, 15, 1066. https://doi.org/10.3390/diagnostics15091066
García MV, Bouza-Rodríguez J-B, Comesaña-Campos A. Convolutional Neural Network-Based Approach for Cobb Angle Measurement Using Mask R-CNN. Diagnostics. 2025; 15(9):1066. https://doi.org/10.3390/diagnostics15091066
Chicago/Turabian StyleGarcía, Marcos Villar, José-Benito Bouza-Rodríguez, and Alberto Comesaña-Campos. 2025. "Convolutional Neural Network-Based Approach for Cobb Angle Measurement Using Mask R-CNN" Diagnostics 15, no. 9: 1066. https://doi.org/10.3390/diagnostics15091066
APA StyleGarcía, M. V., Bouza-Rodríguez, J.-B., & Comesaña-Campos, A. (2025). Convolutional Neural Network-Based Approach for Cobb Angle Measurement Using Mask R-CNN. Diagnostics, 15(9), 1066. https://doi.org/10.3390/diagnostics15091066