Vertebra Segmentation and Cobb Angle Calculation Platform for Scoliosis Diagnosis Using Deep Learning: SpineCheck
Abstract
1. Introduction
1.1. Related Work
1.2. Contributions
- A Fully Integrated and Secure Clinical AI Platform: We present a production-ready system that integrates deep learning-based vertebra segmentation, automated CA computation, and a web-based clinical interface. Built on a modern full-stack architecture (FastAPI, React, and PyTorch 2.6.0+cu118), the platform enables real-time interaction and visualization. A stateless “process-and-delete” backend ensures that no raw images or Protected Health Information (PHI) are permanently stored, strengthening data security and regulatory compliance.
- Comprehensive Multi-Model Evaluation of U-Net Family Architectures: Five U-Net-based segmentation models (U-Net, U-Net-2, Attention U-Net, nnU-Net, and UNet3++) are systematically evaluated under identical conditions. In addition to Dice performance, models are assessed for training time, inference speed, GPU memory usage, deployment complexity, and clinical suitability, providing a practical benchmark for medical AI deployment.
- Robust Geometry-Based CA Estimation with Outlier Suppression: A reliable geometric CA computation pipeline is proposed, combining minimum-area rectangle analysis with Theil–Sen regression for slope estimation and a spline-based anatomical spine model for automated outlier detection and correction. This design improves numerical stability in challenging scoliosis cases.
- Large-Scale Clinical Validation on a 20,000-Image Dataset: The system is validated on the publicly available Spinal-AI2024 dataset containing 20,000 scoliosis X-ray images. Performance is evaluated using MAE, Pearson correlation, and ICC metrics, with stratified error analysis, demonstrating strong agreement with expert measurement.
- Open, Reproducible, and Scalable Research Infrastructure: The full pipeline—covering preprocessing, annotation handling, inference, visualization, and secure stateless processing—is designed for reproducibility and scalability. The modular architecture supports both large-scale benchmarking and real-world clinical deployment without redesign or persistent data storage.
2. SpineCheck Architecture
2.1. Workflow and Computation Pipeline Architecture
2.2. Project Components Architecture
2.3. Data Privacy and Security
3. SpineCheck Dataset, Model Selection, Training and Performance
3.1. X-Ray Images Dataset and Data Preprocessing Before Training
3.2. Model Selection for Vertebra Segmentation
3.3. U-Net Architecture
3.4. Training Process and Hyperparameters
3.5. Model Performance and Analysis
4. Calculation of the CA and Validation
4.1. Automatic Scoliosis Diagnosis and Measurement Algorithm
| Algorithm 1. Pseudocode for automatic scoliosis diagnosis and measurement |
![]() |
4.2. The Validation of Cobb Angle Measurements
5. SpinCheck User Interface
6. Discussion
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Scoliosis Degrees of Curvature Chart. Scoliosis Reduction Center. Available online: https://www.scoliosisreductioncenter.com/blog/scoliosis-degrees-of-curvature-chart/ (accessed on 30 August 2025).
- Khanal, B.; Dahal, L.; Adhikari, P.; Khanal, B. Automatic Cobb Angle Detection Using Vertebra Detector and Vertebra Corners Regression. In International Workshop and Challenge on Computational Methods and Clinical Applications for Spine Imaging; Springer: Cham, Switzerland, 2019; pp. 81–87. [Google Scholar]
- Eltanboly, A.; Ghazal, M.; Hajjdiab, H.; Shalaby, A.; Switala, A.; Mahmoud, A.; Sahoo, P.; El-Azab, M.; El-Baz, A. Level Sets-Based Image Segmentation Approach Using Statistical Shape Priors. Appl. Math. Comput. 2019, 340, 164–179. [Google Scholar] [CrossRef]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. arXiv 2015, arXiv:1505.04597. [Google Scholar] [CrossRef]
- 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]
- Deng, Y.; Gu, F.; Zeng, D.; Lu, J.; Liu, H.; Hou, Y.; Zhang, Q. An Effective U-Net and BiSeNet Complementary Network for Spine Segmentation. Biomed. Signal Process. Control 2024, 89, 105682. [Google Scholar] [CrossRef]
- Nascimento, E.M.; Silva, A.; Almeida, J.D.S.; Pessoa, A.C.P.; Figueredo, W.K.R.; Silva, I.; Junior, G.B.; Paiva, A.; Cunha, A. A Cascade Method Based on UNet3+ for Automated Vertebrae Segmentation in X-Ray Images. Procedia Comput. Sci. 2025, 256, 789–796. [Google Scholar] [CrossRef]
- AASCE—Grand Challenge. Available online: https://aasce19.grand-challenge.org/ (accessed on 8 September 2025).
- Wang, H.; Song, S.; Lu, T.; Wang, S.; Chen, M.; Du, Y.; Zhang, J.; Xiao, R. Landmark Detection Network of Adolescent Idiopathic Scoliosis by Integrating the Image Enhancement Module and Vertebral Center Guidance. In Proceedings of the 2024 5th International Seminar on Artificial Intelligence, Networking and Information Technology (AINIT), Nanjing, China, 29–31 March 2024; IEEE: New York, NY, USA, 2024; pp. 945–949. [Google Scholar]
- Wu, H.; Bailey, C.; Rasoulinejad, P.; Li, S. Automatic Landmark Estimation for Adolescent Idiopathic Scoliosis Assessment Using BoostNet. In Proceedings of the Medical Image Computing and Computer Assisted Intervention—MICCAI 2017, Quebec City, QC, Canada, 11–13 September 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]
- Yi, J.; Wu, P.; Huang, Q.; Qu, H.; Metaxas, D.N. Vertebra-focused landmark detection for scoliosis assessment. In Proceedings of the IEEE 17th International Symposium on Biomedical Imaging (ISBI), Iowa City, IA, USA, 3–7 April 2020; pp. 736–740. [Google Scholar]
- Oktay, O.; Schlemper, J.; Folgoc, L.L.; Lee, M.J.; Heinrich, M.; Misawa, K.; Mori, K.; McDonagh, S.G.; Hammerla, N.Y.; Kainz, B. Attention U-Net: Learning Where to Look for the Pancreas. arXiv 2018, arXiv:1804.03999. [Google Scholar] [CrossRef]
- Zhou, Z.; Siddiquee, M.M.R.; Tajbakhsh, N.; Liang, J. UNet++: A Nested U-Net Architecture for Medical Image Segmentation. In Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support; Springer: Cham, Switzerland, 2018; pp. 3–11. [Google Scholar] [CrossRef]
- Huang, H.; Lin, L.; Tong, R.; Hu, H.; Zhang, Q.; Iwamoto, Y.; Han, X.; Chen, Y.-W.; Wu, J. UNet 3+: A Full-Scale Connected UNet for Medical Image Segmentation. In Proceedings of the ICASSP 2020—IEEE International Conference on Acoustics, Speech and Signal Processing, Barcelona, Spain, 4–8 May 2020; pp. 1055–1059. [Google Scholar] [CrossRef]
- Xu, H.; Cui, X.; Li, C.; Tian, Z.; Liu, J.; Yang, J. RUnT: A Network Combining Residual U-Net and Transformer for Vertebral Edge Feature Fusion Constrained Spine CT Image Segmentation. IEEE Access 2023, 11, 55692–55705. [Google Scholar] [CrossRef]
- Isensee, F.; Jaeger, P.F.; Kohl, S.A.A.; Petersen, J.; Maier-Hein, K.H. nnU-Net: Self-Configuring Method for Deep Learning–Based Biomedical Image Segmentation. Nat. Methods 2021, 18, 203–211. [Google Scholar] [CrossRef] [PubMed]
- Kim, S.; Bae, W.; Masuda, K.; Chung, C.; Hwang, D. Fine-Grain Segmentation of the Intervertebral Discs from MR Spine Images Using Deep Convolutional Neural Networks: BSU-Net. Appl. Sci. 2018, 8, 1656. [Google Scholar] [CrossRef] [PubMed]
- Lakshmi, S.V.V.; Darmanayagam, S.E.; Cyril, S.R.R. Semantic Segmentation of Lumbar Vertebrae Using Meijering U-Net (MU-Net) on Spine Magnetic Resonance Images. Comput. Model. Eng. Sci. 2025, 142, 733–757. [Google Scholar] [CrossRef]
- Li, L.; Zhang, T.; Lin, F.; Li, Y.; Wong, M.-S. Automated 3D Cobb Angle Measurement Using U-Net in CT Images of Preoperative Scoliosis Patients. J. Imaging Inform. Med. 2025, 38, 309–317. [Google Scholar] [CrossRef] [PubMed]
- Banerjee, S.; Lyu, J.; Huang, Z.; Leung, F.H.F.; Lee, T.; Yang, D.; Su, S.; Zheng, Y.; Ling, S.H. Ultrasound Spine Image Segmentation Using Multi-Scale Feature Fusion Skip-Inception U-Net (SIU-Net). Biocybern. Biomed. Eng. 2022, 42, 341–361. [Google Scholar] [CrossRef]
- Zhou, Y.; Lee, T.T.-Y.; Lai, K.K.-L.; Wu, C.; Lau, H.T.; Yang, D.; Song, Z.; Chan, C.-Y.; Chu, W.C.-W.; Cheng, J.C.-Y.; et al. Automatic Ultrasound Curve Angle Measurement via Affinity Clustering for Adolescent Idiopathic Scoliosis Evaluation. Expert Syst. Appl. 2025, 269, 126410. [Google Scholar] [CrossRef]
- Kumar, R.; Gupta, M.; Abraham, A. A Critical Analysis on Vertebra Identification and Cobb Angle Estimation Using Deep Learning for Scoliosis Detection. IEEE Access 2024, 12, 11170–11184. [Google Scholar] [CrossRef]
- Tan, Z.; Yang, K.; Sun, Y.; Wu, B.; Tao, H.; Hu, Y.; Zhang, J. An Automatic Scoliosis Diagnosis and Measurement System Based on Deep Learning. In Proceedings of the 2018 IEEE International Conference on Robotics and Bio-mimetics (ROBIO), Kuala Lumpur, Malaysia, 12–15 December 2018; IEEE: New York, NY, USA, 2018; pp. 439–443. [Google Scholar]
- Spine_Det Dataset > Overview. Available online: https://universe.roboflow.com/test42-sjp0k/spine_det (accessed on 6 May 2025).
- Ernestchenchen. Spinal-AI2024: The Project Is About the Spinal-AI2024 Dataset of Spinal Scoliosis X-Ray Images. Available online: https://github.com/Ernestchenchen/Spinal-AI2024/tree/main (accessed on 25 November 2025).
- Shao, Z.; Yuan, Y.; Ma, L.; Zhu, X. CurvNet: Latent Contour Representation and Iterative Data Engine for Curvature Angle Estimation. arxiv 2024, arXiv:2411.12604. [Google Scholar] [CrossRef]
- Ha, A.Y.; Do, B.H.; Bartret, A.L.; Fang, C.X.; Hsiao, A.; Lutz, A.M.; Banerjee, I.; Riley, G.M.; Rubin, D.L.; Stevens, K.J.; et al. Automating Scoliosis Measurements in Radiographic Studies with Machine Learning: Comparing Artificial Intelligence and Clinical Reports. J. Digit. Imaging 2022, 35, 524–533. [Google Scholar] [CrossRef] [PubMed]
- 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] [PubMed]
- Wong, J.C.; Reformat, M.Z.; Parent, E.C.; Stampe, K.P.; Southon Hryniuk, S.C.; Lou, E.H. 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, 59, 535–542. [Google Scholar] [CrossRef] [PubMed]
- Maaliw, R.R. SCOLIONET: An Automated Scoliosis Cobb Angle Quantification Using Enhanced X-Ray Images and Deep Learning Models. J. Imaging 2023, 9, 265. [Google Scholar] [CrossRef] [PubMed]













| No | Angle in Degrees | Spine Class |
|---|---|---|
| 1 | <10 | ![]() |
| 2 | 10–24 | ![]() |
| 3 | 25–39 | ![]() |
| 4 | 40–49 | ![]() |
| 5 | >50 | ![]() |
| Component/Feature | U-Net | U-Net-2 | Attention U-Net | UNet3++ | nnU-Net |
|---|---|---|---|---|---|
| Core Conv Block | DoubleConv (Conv → BN → ReLU × 2) | DoubleConv (Conv → BN → ReLU × 2) | DoubleConv (Conv → BN → ReLU × 2) | Dense Block (Conv → BN → ReLU × 2 with msf) | Double Conv (Conv → IN → LeakyReLU × 2) |
| Residual Connection | No | No | No | Yes—residual links | Yes—implicit skips |
| Skip Connections | Direct concatenation | Direct concatenation | Attention-gated Concatenation | Multi-scale dense concatenation | Direct symmetric concatenation |
| Attention Mechanism | None | None | Yes—Channel-wise gating | None | None |
| Normalization | BatchNorm (BN) | BatchNorm (BN) | BatchNorm (BN) | BatchNorm (BN) | Instance (IN) |
| Activation Function | ReLU (inplace) | ReLU (inplace) | ReLU (inplace) | ReLU (inplace) | LeakyReLU |
| Upsampling Method | ConvTranspose2D (stride = 2) or Bilinear | ConvTranspose2D (stride = 2) | ConvTranspose2D (stride = 2) | ConvTranspose2D with skip-fusion | ConvTranspose2D or Bilinear |
| Base Filters | 64 | 64 | 64 | 56 | 48 |
| Deep Supervision | No | No | No | Yes—msf | Yes—auxiliary |
| Category | Specifications |
|---|---|
| Operating system (OS) | Linux-6.6.105+-x86 64-with-glibc2.35 |
| Device | CUDA |
| GPU | NVIDIA A100-SXM4-80 GB |
| VRAM | 79.32 GB |
| CPU Cores | 12 |
| RAM | 167.05 GB |
| Input size (C, H,W) | (3, 512, 512) |
| Batch size | 8 |
| Epochs/Learning Rate | 100/0.0001 |
| Model | Params (M) | Best Val Loss | Dice Score | Training Time (m) | Inference (s/img) |
|---|---|---|---|---|---|
| nnU-Net | 17.46 | 0.1941 | 0.8448 | 38.15 | 0.0007 |
| UNet3++ | 17.82 | 0.1332 | 0.8425 | 37.57 | 0.00065 |
| Attention U-Net | 17.66 | 0.1192 | 0.8410 | 36.11 | 0.0006 |
| U-Net-2 | 17.46 | 0.1250 | 0.8346 | 34.12 | 0.0005 |
| U-Net | 17.26 | 0.1327 | 0.8031 | 56.11 | 0.00065 |
| Model | Param (M) | Training Memory (GB) | Infer Memory (GB) |
|---|---|---|---|
| U-Net | 17.26 | 2.05 | 0.72 |
| nnU-Net | 17.46 | 2.21 | 0.78 |
| Attention U-Net | 17.66 | 2.45 | 0.84 |
| U-Net-2 | 17.46 | 2.73 | 0.89 |
| U-Net3++ | 17.82 | 2.76 | 0.88 |
| Function | U-Net | U-Net-2 | Attention U-Net | UNet3++ | nnU-Net | Description |
|---|---|---|---|---|---|---|
| Core Segmentation | ● | ● | ● | ● | ● | All achieve high accuracy |
| Best Dice Score | ○ | ○ | ○ | ○ | ● | nnU-Net: highest (0.8448) |
| Lowest Val. Loss | ○ | ○ | ● | ○ | ○ | Attention U-Net: 0.1192 |
| Model Complexity | Low | Low | Medium | High | High | nnU-Net, UNet3++: include InstanceNorm/deep supervision, increasing model complexity |
| Inference Speed | ● | ● | ○ | ○ | ○ | U-Net, U-Net-2: fastest inference (0.00065–0.0005 s/image) |
| Adaptability/ Automation | ○ | ○ | ○ | ○ | ● | Manual configuration; no automatic hyperparameter tuning |
| Training Difficulty | Easy | Easy | Medium | Hard | Hard | nnU-Net, UNet3++ require more complex backpropagation |
| Deployment Flexibility | High | High | High | High | High | All models are deployable on GPU and CPU |
| Model | MAE (°) | Pearson r | ICC(A,1) |
|---|---|---|---|
| U-Net | 2.02 | 0.961 | 0.961 |
| U-Net-2 | 2.17 | 0.956 | 0.956 |
| nnU-Net | 2.28 | 0.953 | 0.953 |
| Attention U-Net | 2.02 | 0.960 | 0.960 |
| U-Net3++ | 2.23 | 0.956 | 0.956 |
| Model | MAE (°) | Pearson r | ICC(A,1) |
|---|---|---|---|
| U-Net | 4.12 | 0.941 | 0.895 |
| U-Net-2 | 4.49 | 0.943 | 0.882 |
| nnU-Net | 4.96 | 0.932 | 0.866 |
| Attention U-Net | 4.19 | 0.941 | 0.894 |
| U-Net3++ | 5.07 | 0.950 | 0.869 |
| Model | Dice Score | Validation Loss | MAE (°) | Pearson r | ICC(A,1) |
|---|---|---|---|---|---|
| U-Net | 0.8031 | 0.1327 | 10.24 | 0.371 | 0.292 |
| U-Net-2 | 0.8346 | 0.1250 | 11.97 | 0.355 | 0.251 |
| nnU-Net | 0.8448 | 0.1941 | 13.20 | 0.379 | 0.248 |
| Attention U-Net | 0.8410 | 0.1192 | 10.88 | 0.389 | 0.297 |
| UNet3++ | 0.8425 | 0.1332 | 14.74 | 0.465 | 0.291 |
| Function | SpineCheck | Tan et al., 2018 [23] | Horng et al., 2019 [5] | Kalluri/Suri et al., 2023 [28] | Ha et al., 2022 [27] | Wong et al., 2023 [29] | Maaliw et al., 2023 [30] |
|---|---|---|---|---|---|---|---|
| Model | Five-model comparative framework: U-Net, U-Net-2, Attention U-Net, UNet3++, nnU-Net | U-Net (endplate landmarking) | CNN vertebra/edge pipeline; U-Net variants | SpineTK (Mask-RCNN-based; hardware invariant) | Faster R-CNN + rule-based post-proc. | Cascaded CNN segmentation/ localization | Modified U-Net with multi-scale feature fusion |
| CA Calculation | Min-area rectangles → slope regression; outlier filtering; maximal angle | Minimum enclosing rectangles + least-squares slopes; maximal angle | MBR + line orientation; max slope difference | Automated rules over selected vertebrae; centerline-guided endplate slopes | Detector-first → centerline-guided geometry (smoothed centroid spline + endplate slopes) | From vertebral-body box orientations; curves stratified by region/severity | Feature-based slope difference on segmented endplates |
| Dataset Size | 737 (Segmentation Train) + 20,000 X-rays (CA Validation) | 84 lumbar (+aug ≈ 510); 47 full-spine test | 35 AP X-rays (subjects); 595 vertebra ROIs (5-fold CV) | 1310 images total (509 train EOS; 180 val; 460 test; 161 radiographs) | 2150 multi-center radiographs | 330 PA radiographs (reported train/val/test) | 318 AP X-rays (public dataset; reported splits) |
| Segmentation Accuracy | Dice 0.8031; detailed worst/medium/best analysis; multi-model comparison across 5 U-Net variants | 96.8% (binary) | Residual U-Net DSC ≈ 0.95 (best) | High vertebra detection; ICC 0.96 with radiologists | Spearman corr. (angles) 0.89 | — | Dice ≈ 0.975; IoU ≈ 0.905; >U-Net/RU-Net |
| CA Error/Agreement | Clean subset (MAE < 5°): MAE ≈ 2.02°, r ≈ 0.96, ICC(A,1) ≈ 0.96 Full cohort (20 k): MAE ≈ 10.24°, r ≈ 0.37, ICC(A,1) ≈ 0.29 | Mean diff ≈ 1.7–1.8° vs. radiologist | MAE ≈ 1.7–2.2° (mild curves) | MAE ≈ 1.2°; ICC 0.96; 92.5% endpoint match | MAD 5.46° (vs. human boxes); mean diff 7.34° vs. reports | MAD ≈ 2.8°; ICC ≈ 0.916; ≥91% within 5° | — |
| Clinical Validation Test | Large-scale external valid. (20k images) | Expert comparison (limited) | Internal study; ANOVA | Internal + external; multi-center; hardware invariant | Retrospective; multi-rater | Retrospective | Comparative study vs. manual; bias analysis |
| End-to-end/Web platform | FastAPI + React; Instant Visualization and Reporting | — | — | — | Web-based PACS integration | — | — |
| UI/Output | Web UI; mask overlay; PDF/JSON export | Offline | Offline | — | Annotated image + report (PACS) | Annotated results | — |
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
İlkhan, İ.H.; Gümüşkaya, H.; Turgut, F. Vertebra Segmentation and Cobb Angle Calculation Platform for Scoliosis Diagnosis Using Deep Learning: SpineCheck. Informatics 2025, 12, 140. https://doi.org/10.3390/informatics12040140
İlkhan İH, Gümüşkaya H, Turgut F. Vertebra Segmentation and Cobb Angle Calculation Platform for Scoliosis Diagnosis Using Deep Learning: SpineCheck. Informatics. 2025; 12(4):140. https://doi.org/10.3390/informatics12040140
Chicago/Turabian Styleİlkhan, İrfan Harun, Halûk Gümüşkaya, and Firdevs Turgut. 2025. "Vertebra Segmentation and Cobb Angle Calculation Platform for Scoliosis Diagnosis Using Deep Learning: SpineCheck" Informatics 12, no. 4: 140. https://doi.org/10.3390/informatics12040140
APA Styleİlkhan, İ. H., Gümüşkaya, H., & Turgut, F. (2025). Vertebra Segmentation and Cobb Angle Calculation Platform for Scoliosis Diagnosis Using Deep Learning: SpineCheck. Informatics, 12(4), 140. https://doi.org/10.3390/informatics12040140







