# Lenke Classification of Scoliosis Based on Segmentation Network and Adaptive Shape Descriptor
## 2 Methods
### Lenke Classification of scoliosis
#### 2.5.2 Lenke Classification of Sociiosis Based on Adaptive Shape Descriptor  
In this section, we propose a new strategy to automatically classify the Lenke type of the scoliosis based on adaptive shape description and matching.  
Given a training dataset of X-ray spinal images for scoliosis \(D=\{Y_{1},Y_{2},\ldots,Y_{n}\}\), suppose \(f(Y_{i})\) denotes the function that returns the label of sample \(Y_{i}\); \(V=\{0,1,\ldots,6\}\) is the label set, where from 1 to 6 represent the six Lenke types of scoliosis and 0 represents the normal spinal image; and \(X\) is the X-ray spinal image from the testing set to be classified, the calculation process of Lenke classification is presented in Figure 12. First, the deep neural network and post-processing are employed to perform the segmentation for the training and testing sets. Second, we use the proposed shape descriptor including three strategies for improvement to describe and match the \(X\) and each sample in the training set, and the most similar K samples from the training set can be found. Finally, the weighted  
\begin{table}
\begin{tabular}{c c c c c} \hline
**The Type of** & **Proximal Thoracic** & **Main Thoracic (MT)** & **Thoracolumbar/Lumbar** & **Major Characteristic** \\
**Lenke** & **(PT)** & **Main Thoracic (MT)** & **(TL/L)** & **Major Characteristic** \\ \hline
1 & Nonstructural & Structural (major curve) & Nonstructural & Main thoracic \\
2 & Structural & Structural (major curve) & Nonstructural & Double thoracic \\
3 & Nonstructural & Structural (major curve) & Structural & Double major \\
4 & Structural & Structural (major curve) & Structural & Triple major \\
5 & Nonstructural & Nonstructural & Structural (major curve) & Thoracolumbar/ \\  & & & & lumbar \\
6 & Nonstructural & Structural & Structural (major curve) & lumbar–main thoracic \\ \hline \end{tabular}
\end{table}
Table 1: The criteria for determining the type of Lenke classification.  
KNN classifier is employed to predict the label \(X\). Mathematically, the label of \(X\) can be determined as follows:  
\[\begin{array}{l}f(X)\leftarrow\underset{v\in V}{\operatorname{argmax}}(\sum \limits_{i=1}^{k}q_{i}\varphi(v,f(Y_{i}))),\\ \varphi(a,p)=\left\{\begin{array}{c}1,\ a=b\\ 0,\ a\
eq b\end{array}\right.,\\ q_{i}=\frac{\exp(d(X,Y_{i}))}{\sum\limits_{j=1}^{k}\exp(d(X,Y_{j}))}\end{array} \tag{14}\]  
where \(q_{i}\) denotes the weights, indicating that the more similar the shape of the sample is to \(X\), the higher the weight assigned to it. The function \(d(X,Y_{i})\) denotes the similarity distance of the two spinal images, which can be calculated from Formula (13).  
Figure 11: The automatic scoliosis Lenke classification algorithm based on Cobb angle measurement. PTc denotes the Cobb angle of proximal thoracic in the coronal plane; PTs denotes the Cobb angle of proximal thoracic in the sagittal plane; MTc denotes the Cobb angle of main thoracic in the sagittal plane; TLc denotes the Cobb angle of thoracolumbar/lumbar in the coronal plane; TLs denotes the Cobb angle of thoracolumbar/lumbar in the sagittal plane.  
Figure 12: A block diagram of the calculation process of Lenke classification based on shape descriptor.