# HTN: Hybrid Transformer Network for Curvature of Cervical Spine Estimation
## 1 Introduction
Deep-natural networks with transformers perform better than those without transformers in many visual benchmarks. Inspired by the powerful presentation capabilities of transformers, transformers have been introduced into medical-image segmentation and achieve fantastic performance [20; 21; 22; 23]. [PERSON] et al. [24] and [PERSON] et al. [25] use transformers to extract global contexts in medical-image segmentation. Inspired by [24; 25], we propose a hybrid transformer network, which leverages the high-level semantic features provided by the encoding network, the fine-grained features provided by the decoding network, and the global dependencies provided by the transformer to learn the feature representation of the entire spine. Most previous works stack a transformer on top of the CNN backbone, which undoubtedly increases the number of calculations and reduces the network speed. Therefore, in this work, we only add the transformer module to the last layer of the encoder network, which alleviates the problem of increased computation due to the addition of the transformer. To our knowledge, existing works have no open-access medical-image dataset of the cervical vertebrae area. There are relatively few studies on the diagnosis of cervical spine imaging. This paper presents a novel automatic system for estimating cervical spinal curvature to overcome these limitations and to fully utilize deep-learning technology, which can achieve comparable performance to experts. Our method will inspire many people who are interested in this field. The code will be released at: [[https://github.com/JiuqingDong/Curvature-of-Cervical-Spine-Estimation](https://github.com/JiuqingDong/Curvature-of-Cervical-Spine-Estimation)]([https://github.com/JiuqingDong/Curvature-of-Cervical-Spine-Estimation](https://github.com/JiuqingDong/Curvature-of-Cervical-Spine-Estimation)) (accessed on 25 November 2022). The key contributions of our method are presented as follows:  
1. We propose a hybrid network that blends a self-attention mechanism, self-supervision learning, and feature fusion, which can accurately estimate the Cobb angle, analyze the curvature of the cervical spine, and provide reliable information for cervical diagnosis. Many evaluation metrics are used to evaluate our methods. Our method achieves a highly significant correlation of 0.9619 (\(p<0.001\)) with the ground truth,with a small mean absolute difference of 1.79\({}^{\circ}\). To a certain extent, our method can provide a reasonably reliable basis for clinicians and surgical navigation. 2. A new dataset is proposed to evaluate our method for spondylosis detection. The dataset was annotated by one spine surgeon and proofread by another expert. To the best of our best knowledge, it is the first study using cervical spine-region X-ray images to estimate the Cobb angle by using a hybrid transformer network. Furthermore, the AASCE MICCAI 2019 challenge dataset is also used to evaluate our method. The experimental results show that our method can achieve performance comparable to state-of-the-art methods, which proves the generalization of our method. 3. We compare methods of combining transformers with encoder-decoder networks and discuss transfer learning in medical-image processing tasks. In conclusion, this original article lays a foundation for estimating the cervical Cobb angle, inspiring subsequent works in the related domains.