# A Multiclassification Model for Skin Diseases Using Dermatoscopy Images with Inception-v2
## 3 Materials and Methods
### Image Enhancement and Hair Removal  
The distribution of samples in public datasets is highly heterogeneous, and large-scale datasets are the prerequisite for the successful application of deep convolutional neural networks. Despite the considerable data already present in the ISIC 2019 dataset, they remain inadequate compared to the vast quantities of data typically employed in deep learning. Moreover, the distribution of images depicting various skin diseases is highly uneven. In the experiment, through the data enhancement method, the training set is enhanced with secondary data on the basis of the basic training set, which further increases the amount of training sample data and solves the problem that the image data for various dermatoid diseases are very uneven. Similar but different training samples are generated by rotating and shrinking the training samples, which expands the training set data and balances the number of samples. The data enhancement is performed by randomly rotating, horizontally and vertically translating, randomly deflating, and vertically and horizontally flipping the samples in the original training set within 0\({}^{\circ}\) and 180\({}^{\circ}\), as illustrated in Figure 6.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Skin Disease Name** & **Descriptive** & **Number of Pictures** & **Percentage** \\ \hline MEL & Melanoma can be treated with surgical removal in early stages & 4523 & 17.85\% \\ NVs & There are many different variants of melanocytic nevi & 12876 & 50.83\% \\ BKL & They have similar characteristics to melanoma & 2625 & 10.36\% \\ AK & Actinic keratosis and carcinoma caused by excessive sun exposure & 868 & 3.43\% \\ BCC & Basal cell carcinoma is a common epithelial skin cancer & 3324 & 13.12\% \\ VASCs & Vascular skin lesions often look red or purple, with clear boundaries & 254 & 1.01\% \\ DF & Dermatofibroma is a proliferation of fibrous tissue & 240 & 0.95\% \\ \hline \hline \end{tabular}
\end{table}
Table 1: Seven lesion types and distribution in the dataset.  
Figure 5: Examples of seven dermatologic images.  
In addition to the melanocyte nevus (NV) samples in the training set, the remaining 6 types of samples were enhanced to expand the sample data so that the amount of data in each of these 6 types was expanded. On the one hand, the total data in the training set were expanded by 3 times, which avoided the overfitting phenomenon caused by there being too few samples and improved the generalisation ability. On the other hand, the volume of data for the sample types with low amounts was increased to roughly equal to that of the melanocyte nevus species with the largest data volume, which solved the problem of an unbalanced sample distribution. The enhanced distribution is illustrated in Figure 7.  
Prior to the application of the classification algorithm to the dermoscopic images, it is necessary to undertake the requisite preprocessing. The dataset comprises a variety of sources, resulting in the presence of black boxes of varying sizes and shades of colour in the images. Secondly, the lesion areas may be obscured by body hair due to the location of the lesions. The primary objective of preprocessing is to minimise the impact of the image background on subsequent algorithms, eliminate irrelevant information, and reduce image noise in order to enhance the accuracy of subsequent image classification and recognition. Inappropriate handling by the user or hairiness of the patient frequently results in the generation of blurred images, uneven lighting, and heavy hair occlusion. These factors can render the images challenging to analyse and process. Figure 8 demonstrates the hair removal process for the original image.  
Figure 6: Example of image enhancement. (**a**) Original image in the base training set; (**b**) image after data enhancement.  
Figure 7: Distribution of dataset after image enhancement.