Scoliosis refers to the abnormal curvature of human spine, which is one of the most common deformities in children and adolescents. The Cobb angle is the gold standard for quantifying the severity of scoliosis and is used to assess the severity of scoliosis. Often the accuracy of the Cobb angle measurement relies on the subjective experience of the doctor and the process is very time consuming. In this study, we propose a new deep neural network, ATT UNet 3+, based on UNet 3+. Our approach incorporates a novel hybrid attention mechanism in the network's upsampling process. This mechanism allows for the appropriate reweighting of fused multi-scale information and facilitates effective supervision of the final output results. The proposed neural network is trained, tested and validated on 155 X-ray ortho-slices. The deep learning network is compared with the more effective neural networks commonly used today. ATT UNet 3+ achieves the best performance in the segmentation evaluation results. Regarding the final Cobb angle calculations, the absolute mean error between the longest distance ellipsoidal point (LDEP) method and expert measurements amounted to 1.6°. ATT UNet 3+ provides a potential tool for segmenting the spine in X-ray, which can improve the efficiency and accuracy of doctors in processing scoliosis pathological images.