Morphological study of skin cancer lesions through a 3D scanner based on fringe projection and machine learning

The effective and non-invasive diagnosis of skin cancer is a hot topic, since biopsy is a costly and time-consuming surgical procedure. As skin relief is an important biophysical feature that can be difficult to perceive with the naked eye and by touch, we developed a novel 3D imaging scanner based on fringe projection to obtain morphological parameters of skin lesions related to perimeter, area and volume with micrometric precision. We measured 608 samples and significant morphological differences were found between melanomas and nevi (p<0.001). The capacity of the 3D scanner to distinguish these lesions was supported by a supervised machine learning algorithm resulting in 80.0% sensitivity and 76.7% specificity. © 2019 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

techniques ar visual distribu International modality wh quantitative i triangulation functions [10] laser point wa real time fram acquisition tim applied to ex vivo methods divided into t two methods a height map cancer [11] a [12], among o In this stu morphologica In Section 2, Section 3 incl means of supe in the past. Fi

Experime
The 3D handh The device h monochrome (TECHSPEC stereo geomet The camer 14 mm field o creates an im small distanc with a unifor International shifting algor on the well-k e faster, but th ution of texture Organization hose acquisitio information on measuring prin ]. The use of a as facilitated b me grabbers, an me dropped to -vivo [10] and s to analyze sk three groups: v produce only a p that can con and to the asse other applicatio udy, a new han al analysis of c we describe t ludes the statis ervised machin nally, Section Finally, the corresponding phases between both cameras are identified and the height map can be reconstructed by means of the triangulation principle [8]. Additionally, the RGB information obtained with the color camera is superimposed to the geometric coordinates of the object points (X, Y, Z). The calibration of the three cameras followed the technique proposed by Tsai [15]. The 3D scanner developed in this study offers a spatial resolution of 15 μm (XY dimension) and an acquisition time less than 4.5 s per whole FOV.
Clinical measurements were carried out at the Hospital Clínic i Provincial de Barcelona (Spain) and the Università degli Studi di Modena e Reggio Emilia (Italy). A total of 654 skin lesions from Caucasian individuals were assessed. Patients remained still to avoid motion artifacts; the area over the skin was cleaned and hair was carefully cut instead of shaved to avoid irritation. All patients provided written informed consent before any examination and ethical committee approval was obtained. The study complied with the tenets of the 1975 Declaration of Helsinki (Tokyo revision, 2004). The lesions were diagnosed by dermatologists using a commercial dermoscope and the confocal microscope VivaScope 1500 from MAVIG GmbH. When malignancy was suspected, a histological analysis was carried out. From the total set of lesions, 93% (608) could be measured with the 3D prototype; in the remaining 7% (46), the use of the 3D scanner was impractical for the body area involved. Out of the 608 lesions measured, 194 (32%) could be analyzed. The remaining 414 (68%) were rejected because of artifacts caused by micro-movements, lesions out of the system's FOV, and hair inaccurately removed. Regarding the lesions properly collected, 81 (42%) were benign nevi; 60 (31%) melanomas; 18 (9%) basal cell carcinomas; 18 (9%) non-nevi benign lesions such as angiomas, dermatofibromas and actinic keratosis; 11 (6%) seborrheic keratosis; and 6 (3%) squamous cell carcinomas.

3D image processing
Point-wise height maps of each lesion were obtained through the reconstruction of the fringe images. Next, the 3D reconstructed data was imported into the software MountainsMap (Fig.  2). Preliminary removal of artifacts was carried out. A first operator levelled the scanned surface to remove the general slope caused by small tilts. A second operator zoomed in the area where the lesion and the surrounding healthy skin were located to select the Region of Interest (ROI). Finally, the application of a Fast Fourier Transform (FFT) filter allowed the exclusion of frequencies corresponding to artifacts of movement. Lesions were segmented from the healthy skin on the color image and the selected contour was pasted into the 3D image to extract the rest of parameters. Their perimeter was obtained by manual segmentation. Next, the area and volume were calculated by means of an operator that accounts for both peaks (convex curvatures) and holes (concave curvatures). The area and volume divided by the perimeter (Ap in mm and Vp in mm 2 ) were also computed to determine which lesions, despite presenting a smaller perimeter, had a greater surface or volume. In order to compute additional parameters, the 3D surface was converted into a series of 2D profiles (horizontal and vertical axial cuts). A set of 200 horizontal profiles and their mean profile were obtained. From them, parameters for roughness and texture established by the ISO 25178 were calculated such as the profile maximum height, skewness and arithmetic mean deviation, number of peaks per centimeter and amplitude of the peaks.

Statistical analysis and classification algorithm
The parameters described were compared among types of lesions to evaluate their differences using SPSS statistics V23.0 (IBM Corp.). Comparisons were considered statistically significant for p-values under 0.05. Non-nevi benign lesions, seborrheic keratosis and squamous cell carcinomas were excluded from the statistical analysis due to the low number of samples. The Kolmogorov-Smirnov test was used to evaluate the normal distribution of all variables. The ANOVA / Kruskal-Wallis (KW) tests were used to compare the data among groups of skin lesions for parametric and non-parametric variables, respectively. The T-test / Mann-Whitney U (MWU) tests were used to compare outcome measures between pairs of groups for normal and non-normal distributed data.
In order to classify the lesions, the accuracy of the parameters to train a good classification model was evaluated. For this purpose, the Matlab R2015a Classification Learner application was used to perform supervised machine learning by supplying the 3D morphological parameters with statistical significance and the known classification of the lesions. Since only 18 basal cell carcinomas were measured, they were excluded from this process to avoid inaccurate results from the statistical analysis and machine learning algorithms. The Classification Learner uses the data to train different models. Accordingly, an automated training was performed to search for the best classification model including discriminant analysis, decision trees, support vector machines and nearest neighbors. The different validation options of the fitted models were analyzed beforehand [16]. The first scheme was the 'Cross Validation', in which the data is divided into k subfolds, a model is trained using the out-of-fold observations, and then, the algorithm calculates the average test error for all folds. For this, k was set equal to two and the samples in the two folds were randomly selected by the algorithm. The second scheme used was the 'Holdout Validation', which divides the data into two folds, containing random observations of each lesion, and uses one fold for training and the second for validating. The percentage of data used for training and validating was set equally to 50%. Additionally, in order to test an algorithm that does not divide the data into training and validation sets, the 'No-Validation' scheme, in which all data is used for training and afterwards also for validating, was also tested.

Results
For nevi (N), melanomas (MM) and basal cell carcinomas (BCC), all analyzed parameters followed a non-normal distribution (p < 0.05). Of all parameters computed, the KW test reported significant differences for the different types of lesions regarding area, A, volume, V, perimeter, P, normalized area, Ap, and volume, Vp (p < 0.001). In contrast, the profile and amplitude parameters calculated following the ISO 25178 did not provide significant differences (p > 0.05), and for this reason they are not reported. Table 1 shows the mean ( ± standard deviation) and the minimum and maximum values (in parenthesis) for each type of lesion and globally (Total). In addition, the MWU test analyzed if significant differences existed between pairs of types of lesions. As shown in Table 2, when comparing MM versus N, all parameters showed significant differences (p < 0.001), meaning that MM and N are significantly different. In contrast, when comparing MM vs BCC and N vs BCC, differences were not significant, with the exception of the area when comparing BCC with MM (p = 0.034), indicating the complexity of discriminating BCC from MM and N.
Regarding the machine learning based classification algorithm, the best results were obtained with decision trees (e.g. Bagged Trees) and nearest neighbors (e.g. Weighted k-Nearest Neighbor, KNN). The final data set contained 60 observations of nevi and 60 of melanomas. The nevi observations were randomly chosen from the 81 to avoid returning higher specificities than sensitivities as a result of the higher number of nevi. Table 3 contains the different validation schemes and the classification models that provided the lowest error rate. The predictive accuracy of each classification model is shown in terms of sensitivity and specificity, i.e., the percentage of melanomas and the percentage of nevi correctly identified. The sensitivity and specificity corresponding to the 'No Validation' scheme were 100%, with an associate error rate of 0% for all trials. The repeatability of the results was also assessed by the creation of different random sets of nevi. The 'Cross Validation' scheme applied to the different sets of nevi led to maximum variations of 5.00% for sensitivity and specificity and 0.05% of error rate. Regarding the 'Holdout Validation', the variations of sensitivity, specificity and error rate were 10.00%, 13.40% and 11.65%, respectively.

Discussion
High accuracy (80.00% sensitivity and 76.70% specificity) was obtained through the 'Holdout Validation' scheme and training a 'Weighted KNN' classification model. This model categorizes query points based on their distance to the nearest k neighbors in a training data set. Specifically, medium distinction between classes is set with a number of k neighbors equal to ten, using a distance weight. On the other hand, the 'No Validation' scheme returned 100% sensitivity and specificity values since the data set was classified with respect to the data set itself. In conclusion, 'Holdout Validation' achieved the best results, but 'Cross Validation' was considered the most reliable approach, since it uses both sets for training and validation. Other methods such as multispectral imaging systems, which acquire images at different wavelengths, have also been used to detect skin cancer. Comparing the 3D results with those obtained in a previous study where a multispectral imaging system from 414 nm to 995 nm was applied to the study of skin cancer [6], our results show significantly increased specificity at the only expense of a slightly lower sensitivity. The authors obtained sensitivity and specificity of 87.2% and 54.5%, respectively, for a 50%-50% validation scheme with a customized classification algorithm in a set of 502 lesions (nevi, melanomas and basal cell carcinomas). Another study evaluated skin lesions combining this system with another that used 995 nm to 1613 nm wavelengths [7]. The sensitivity and specificity obtained were 85.7% and 76.9%, respectively, for a no-validation algorithm when analyzing 14 melanomas and 39 nevi. We should underscore that the classification algorithms and the sample sets used were not the same for all studies.

Conclusions
This is the first report showing that non-invasive 3D technology based on fringe projection could assist practitioners in making a final diagnosis and contribute to a significant reduction in the number of false positives thanks to its enhanced specificity. Further work will focus on reducing the system sensitivity to the micro-movements of the patients, since the main cause for discarding 3D images was the inability to adequately filter all image artifacts.

Disclosures
The authors declare that there are no conflicts of interest related to this article.