SELECTED APPLICATIONS OF DEEP NEURAL NETWORKS IN SKIN LESION DIAGNOSTIC

The article provides an overview of selected applications of deep neural networks in the diagnosis of skin lesions from human dermatoscopic images, including many dermatological diseases, including very dangerous malignant melanoma. The lesion segmentation process, features selection and classification was described. Application examples of binary and multiclass classification are given. The described algorithms have been widely used in the diagnosis of skin lesions. The effectiveness, specificity, and accuracy of classifiers were compared and analyzed based on available datasets.

Artificial intelligence is widely used in supporting diagnostic tools in dermatology. Deep learning and machine are effective in distinguishing melanoma from benign skin lesions based on clinical dermatoscopic images. Neural networks are also used in the classification process of dermatoscopic images [13,11,36].
An overview of the available methods using the networks has been provided in the [35]. In order for the process to run properly, you need to pay attention to many aspects. One of them is the preliminary preparation of dermatoscopic images. Many available dermatological databases contain images with artifacts: medical markers, applied scale, dark hair, air bubbles, are of poor quality (no contrast in them or are overexposed), the image does not cover the entire outline of the lesion. The next stage is to prepare an appropriate database of training and test images for a given class. Images previously diagnosed correctly by doctors based on a biopsy.
Deep neural networks consist of many layers, each of which identifies more complex elements of the input image. Figure 1 shows an example of a four-layer structure that analyse dermatoscopic images. The input picture of the skin lesion can be classified as a benign birthmark, or melanoma. The layers of the network are interconnected, they have been given appropriate weights. Each node (blue circle) in a layer is connected to each node in the next layer. In fact, the deep network is a much more complex structure than this shown example in figure 1. Fig. 1. Diagram of building a neural network [26] Neural networks contain deep learning algorithms [8], deep convolutional neural networks DCNN [20], synergic deep learning. Great effectiveness achieve algorithms based on neural networks. A more complex structure becomes more effective for data with greater diversity. Also are made hybrid systems [37], witch connecting a model combining synergistic models and deep convolutional neural networks.

Segmentation and classification methods
Melanoma occurs in different areas of the body on the neck, torso, arms or legs. The resulting dermatoscopic images are of different quality and contain many artifacts. Therefore, for this, segmenting the entire skin lesion from the image is not an easy task. Traditional segmentation methods such as: adaptive thresholding, Otsu's thresholding, level set active contour, region growing become insufficient.
Increasingly, they are used for this purpose DCNN to train and perform region segmentation in melanoma test images [12,27,28]. Images with disease are used to trained model. Training images do not even require often preprocessing. For this purpose, they were used a hybrid deep learning approach based on CNN and recurrent neural network (RNN) [5]. Often researchers use use deep learning [9,36] and a Deep Residual Network (DRN or ResNet). Efficiency of implementation deep region based convolutional neural network (RCNN) with Fuzzy C-mean (FCM) clustering was checked in [27]. Before the segmentation stage, regions of interest (ROI) are designated, which includes the skin lesion. Containing a fully convolutional neural network (FCN) and a specific convolutional neural network (CNN) in [5] allowed to obtain the result of accuracy 92%, a specificity 93% and a sensitivity 94%. The 28-layer FCN structure made segmentation and with a mask for (ROI).
In [19] researchers implemented neural networks for segmentation, superpixel masks for dermoscopic feature extraction and annotations for images classification procces. Dermatoscopic images from the ISIC database have been segmented and classified using multi-scale fully-convolutional residual networks and a lesion index calculation unit (LICU). Images are classified into three categories: melanoma, seborrheic keratosis and nevus. Scientists have developed framework is named as Lesion Indexing Network (LIN) shown in figure 2. It consists of two FCRN and a calculation unit for lesion index. The next step is bilinear interpolaction for two different images size to get SUM. LICU is result of algorithm, which include possibility and distance maps. The JA and AUC of LIN for segmentation and three categories classification get 0.753 and 0.912.  [19] However CNN-based framework, named Lesion Feature Network (LFN) is responsible for dermoscopic feature extraction. The effectiveness of the implemented networks with different number of layers and different parameters, such as batch normalization, weighted softmax, was also studied. In [38] CNN was used to image feature learning and test segmentation results. Figure 3 shows the results of the segmentation algorithm. Binary images are test and real images, designated TP, FN, FN and TN. Classification was made in [10] using CNN based on over 120,000 clinical images.

Lesions classification process
Deep learning is the basis for numerous applications in dermatology. International projects are also being created to collect a diverse database, and then finding an effective classification method for skin lesions. Such projects are of great interest among scientists. It is made multiclass classification and binary classification. Binary assumes only two classes: melanoma versus benign nevi or benign nonpigmented skin lesions [14]. More extensive classifications allow you to assess more skin diseases causing the formation of various birthmarks.

Binary classification
Research teams most often work on binary classification based on extensive databases of dermatoscopic images. In most works, the number of training images reaches 900 or even 2000. The images were previously diagnosed by doctors. Their diagnoses were confirmed by histopathological examinations. Gathering such large databases is not easy, it requires a lot of cooperation between scientists and dermatologists.
The mainly diagnosed skin disease that causes the formation of skin lesions is maliganat melanoma. It is diagnosed most often versus no-melanoma lesions or begin nevi. Neural networks are trained on two sets of data, marked as healthy and sick. Table 1 cites six works based on binary classification.
The cited works are characterized by a high level of sensitivity, AUC and specificity. In [29], images from mobile phones were even tested so that anyone with it could make a preliminary diagnosis of lesion using an application on the basis of a photo taken of the property.

Multiclass classification
Increasing interest in the processes of diagnosing skin lesions using artificial intelligence has resulted in the development of its use for the diagnosis of many skin diseases. More extensive network models were created, allowing for classification 3, 5, 7 and even 10 different disease. Of course, the introduction of more classes is associated with increased difficulties in solving the algorithm. Multiclass classification mostly helps diagnose nevus, dermatofibroma, melanoma, vascular lesions, benign keratosis, solar lentigo, benign keratosis. Examples of applications for this type of classification are presented in table 2. In [15], the highest number of class disease was diagnosed. Figure 4 shows boxplots ranked from begin to more malignat categories. Awarded probability scores in scale from 0 (lower probability of malignancy) to 1 (higher probability of malignancy).

Features extraction
Convolutional networks have achieved great success in the features selection. There are three types convolutional neural network. First of them are convolution. Mostly they are sets of filters, which are learned for feature extractor to get representative map activation. Next to Poolingstatistically represent the previous layer, that helps to significantly reduce without loss images. The last one is Fully Conected Layer [1].
It is currently being used more and more to smaller receptive window size and smaller stride of the first layer. During training and testing the networks are used the whole image and multiple scales. It is also worth paying attention to the number of layers in the structure of the entire networkits depth. The number of layers should be selected according to the function performed and use of very small convolution filters in all layers. Another important element to fixing other parameters. Networks apply to other sets of images. They achieve excellent performance. That's way convolutional filters numbers of kernel size is kept on maximum small level. Figure 5 shows sparse CNN -Module inception construction. Networks uses convolutions of different sizes to capture details on scales (55, 33, 11).  [32] In [34] in the first stage, the algorithms were given a modified 7-point method based on the ResNet-50 based supervised deep learning networks (figure 6). Obtained extracted features from dermatoscopic images. Next step is multimodal deep learning framework for automatic malignat melanoma and begin lesions detection by combining deep convolutional neural networks. Based on the obtained features was made clinically constrained classifier chain (CC).
In [34] in the first stage, the algorithms were given a modified 7-point method based on the ResNet-50 based supervised deep learning networks. Reached extracted features from dermatoscopic images. Next step is making multimodal deep learning framework for automatic malignat melanoma and begin lesions detection by combining deep convolutional neural networks. Based on the obtained features got clinically constrained classifier chain (CC).
Commonly known neural network structures are being modified, but new methods are also being used to support them. The applications of new methods are interesting. In [22] a new method called Lesion-classifier. It is based on pixel-wise binary classification on melanoma and non-melanoma cases. All model based on deep convolution encoder-decoder network is shown on figure 7. Fig. 6. Operation of the algorithm based on deep learning networks for features extraction [34] Fig. 7. Algorithm based on DCN for binary classification from [1] Many convolutional neural network from Keras library as VGG16 (512), VGG19 (512), ResNet50 (2048), InceptionV3 (2048) has been used for features extraction in many works [16,21,31,32] table 3. Artificial neural network structures used The best results were achieved by Logistic Regression using features extracted by the VGG19 with accuracy of 92.5% and F1-score (balance between precision and sensitivity) of 80% (the best result). Precision found by InceptionV3 with Logistic Regression was the best (87.88%).  [21]

Discussion and conclusions
The process of diagnosing skin lesions based on neural networks is an issue of interest to many research teams, many works have been created in this field and further research is still being conducted. Currently, an important problem in the use of deep neural networks is the preparation of an appropriate database of dermatoscopic images, their initial preparation, taking an effective segmentation method and using a well-chosen structure for the lesion classification. In the future, most likely, the classic methods of diagnosing skin lesions based on geometry, shape of the lesion using segmentation will begin to be replaced by diagnostics based on the analysis of lesion texture.