# Automatic Tortuosity Estimation of Nerve Fibers and Retinal Vessels in Ophthalmic Images
## 3 Datasets and Metrics  
In this paper, we use two corneal nerve datasets and one retinal vessel dataset for tortuosity evaluation, which are named CCM-A, CCM-B and RET-TORT. In order to validate the proposed tortuosity measure, the segmentation are manually done for all datasets. Particularly for the corneal nerve datasets (CCM-A and CCM-B), the reference fiber centerlines were manually annotated by ophthalmologists. For the retinal vessel dataset, the manually drawn vessel center lines are provided with the original dataset. For all the tested datasets, the centerlines of segmentation results are extracted and the intersection points on these centerlines are detected. When calculating the tortuosity degrees, the centerlines and are further broken into single curvilinear segments at each intersection point.  
**CCM-A** contains 403 CCM images. In CCM-A, two clinicians independently graded the images into four levels according to the tortuosity from straight to heavy. The dataset is annotated in accordance with previously published protocol [35]. We have made this dataset available online ([[https://imed.nimte.ac.cn/corn.html](https://imed.nimte.ac.cn/corn.html)]([https://imed.nimte.ac.cn/corn.html](https://imed.nimte.ac.cn/corn.html))). _Level-1_: 54 nerve fibers images with almost straight. _Level-2_: 212 images with mild tortuous. _Level-3_: 108 images are quite tortuous. _Level-4_: 29 images show heavy tortuous. Figure 4 illustrates nerve fibers images with four tortuosity levels, and their manually labeled centerlines.  
**CCM-B** is a publicly-available dataset ([[http://bioimlab.dei.unipd.it/](http://bioimlab.dei.unipd.it/)]([http://bioimlab.dei.unipd.it/](http://bioimlab.dei.unipd.it/))), with clinical annotations for corneal nerve fibers. The CCM-B database is composed of 30 CCM images. An expert grouped these images into three classes, based on degree of fiber tortuosity: low, mid, and high.  
**RET-TORT** is the same publicly-available dataset with CCM-B. There are 60 total fundus images in this dataset. 30 arteries and 30 veins are extracted from them. All these images were examined by a retinal specialist, Names of these images are ordered by increasing tortuosity. For each image,  
Figure 4: Nerve fiber images with four tortuosity levels, and their manual label.  
the manually drawn vessel centerline is provided with the original dataset. As shown in Figure 5a-c are original images with low, middle and high tortuosity in RET-TORT. In this dataset, only the most important vessel was selected for tortuosity measurement and manual labeled. We overlaid the manual centerlines ground truth on the original images with yellow color.  
For each tortuosity level, we compare the classification results with the ground truth by sensitivity (Sen), specificity (Spec), and accuracy (Acc) metrics. In order to evaluate tortuosity more accurately for different levels, as suggested in [1], we also take the weighted sensitivity (wSen), weighted specificity (wSpec), and weighted accuracy (wAcc) as metrics to demonstrate the overall performance. These metrics are defined as:  
\[\text{wSen}=\sum_{i=1}^{L}r_{i}\frac{\text{TP}_{i}}{\text{TP}_{i}+\text{FN}_{i }}, \tag{11}\]  
\[\text{wSpec}=\sum_{i=1}^{L}r_{i}\frac{\text{TN}_{i}}{\text{TN}_{i}+\text{FP}_{ i}}, \tag{12}\]  
\[\text{wAcc}=\sum_{i=1}^{L}r_{i}\frac{\text{TP}_{i}+\text{TN}_{i}}{\text{TP}_{ i}+\text{TN}_{i}+\text{FP}_{i}+\text{FN}_{i}}, \tag{13}\]  
let \(L\) be the total number of levels of tortuosity, for each \(i\) level tortuosity, \(r_{i}\) is the percentage of level \(i\) images over all images. \(\text{TP}_{i}\) is the number of correctly classified images which blong to the \(i\) level. \(\text{FN}_{i}\) is the number of the \(i\) level images which are are falsely classified as other levels. \(\text{FP}_{i}\) is the number of other level images which are are falsely classified as \(i\) levels. \(\text{TN}_{i}\) is the number of other level images which are correctly classified.