A Convolutional Neural Network Based Skin Lesion Segmentation from Dermoscopy Images

Clinical treatment of skin lesion depends on promptly detection as well as demarcation of lesion boundaries as to locate the cancerous region accurately. So an automated intelligent system is required primarily to analyze the skin lesion which has been brought the focus of many researchers in the past few decades. This paper presents an automated model for Skin Lesion Segmentation and Classification which make use of the deep convolutional networks. This model is trained on ISIC 2017 and achieved a Jaccard Index of 0.757688 which are comparable outcomes to the currently available techniques.


Introduction
Melanoma is one of the most lethal types of skin malignant growth and records passing of 75% related with the skin disease [1].Exact acknowledgement of melanoma in beginning phase can fundamentally expand the endurance pace of patients.In any case, the trained professionals are needed for the manual identification of melanoma and experiences between eyewitness varieties.It is advantageous to create a framework of the automatic detection of melanoma [2] thereby increasing precision and effectiveness of pathologists.Dermoscopic images can be given as input to this model.Dermoscopy, an instrument produces magnified and illuminated image of the skin lesion that enhances the clearness of lesion spots which in turn eliminates surface reflection to upgrade the enhanced visualization of skin lesion [3].
Automatic detection of melanoma type of disease from dermoscopic images is at this point an irksome endeavor as it has numerous troubles.To begin with, accurate segmentation of lesion areas becomes difficult as there is low contrast exist between ordinary skin region and skin lesion.Secondly, there is a trouble in recognizing melanoma lesion and non-melanoma lesion as they may have similar level of visual comparability.Thirdly, the variety of skin conditions such as skin tone, veins or hairs, among the patients create distinctive form of melanoma, regarding color, shape and texture.Segmenting the region of skin lesion is the fundamental advance for most of the classification techniques.[4,5] gives recent survey of algorithms for the computerized skin lesion segmentation.Precise segmentation gives the correctness of ensuing lesion classification.Further studies have been made widely to deliver skin lesion segmentation outcomes with more exactness.For instance, Gomez et al. developed Independent Histogram Pursuit (IHP) [6] algorithm for skin lesion segmentation.This algorithm was tested on five dermatological datasets and accomplished 97% of accuracy.Codella et al. [7] proposed an automated skin lesion technique with optimal color channels as well as hybrid thresholding method.Later, Pennisi et al. [8] implemented Delaunay Triangulation for the binary mask extraction of skin lesion in which this technique doesn't need training stage.Yu [9] employed fully-convolutional residual network, deep learning technique to segment the dermoscopy skin lesion images and accomplished good outcome in ISIC 2016 dataset.Celebi et al. [10] extracted many features from the segmented skin lesion as to classify skin lesion.Schaefer employed automatic border detection technique [11] to segment the skin lesion area and afterward ensemble the extracted features such as shape, color etc., were ensembled [12] to recognize the melanoma.Then again, a few research [13][14][15] endeavored to straightforwardly use hand-created features to identify melanoma without any segmentation process.Deep learning network employs the hierarchical structure for automatic feature extraction.Because of the advancements made by deep learning in several medical image processing undertakings, many researchers began to apply various deep learning approaches to recognize the melanoma.Codella et al [16] used hybrid approach incorporating support vector machine (SVM), sparse coding and convolutional neural network (CNN) for melanoma detection.In the new examination, Codella

Proposed Method
Initially a U-net algorithm based on Convolutional Neural Network is employed for lesion segmentation from which the features like texture, color and shape are extracted by means of Edge Histogram (EH) and Local Binary Pattern (LBP), Gabor strategy and Histogram of Oriented Gradients (HOG).The extracted features are then fed to Random Forest (RF) classifiers to analyze the skin image as either a melanoma or a benign lesion.

Figure1 Proposed architecture 2.1 Lesion Segmentation
Lesion Segmentation is a method of segmenting the detected lesion region in a dermoscopy image.In this proposed work, the U-net architecture is in particular implemented as a combined architecture of both deconvolutional network as well as Fully Connected Network (FCN) to address the issue with Biomedical Image Segmentation.Convolutional network architecture with deconvolutional architecture is combined to produce semantic segmentation.

Model Architecture
In the original image a U-Net [2] architecture has been used to estimate the probability for every pixel.Here the U-Net architecture operates on 192 by 192 pixels of an input image and rendered a probability map of similar dimensions.Here the U-Net has three down-sampling layers, one completely connected layer at the bottom of the 'U' and three up-sampling layers.The output map produced by this network is of same dimensions as of the input image.

Training
The input images and its resultant binary maps are fed into the network.Training was done using Adam [21] optimization algorithm.Throughout the training phase, the initial value of learning rate is set to le-4 and remains unchanged.Minibatches of size 20 were used and each minibatch was given a custom weight map which leveled the weights of both positive as well as negative groups.
To train the model, 10-fold cross validation was used in which each fold was chosen randomly without stratification.To ensure that there was no leakage between the train and the test folds, the original images and distorted images were allocated to a single fold.The mask and image were practiced with Transformations at its runtime after choosing the minibatches.The transformations such as Flipping, Rotation and Zoom are to be included.The image distortions and transformations are shown in figure 2.

Figure 2 Image and its mask transformations
This network was trained for 200 epochs.Jaccard Index [22] was calculated on validation dataset and reported after every epoch.The model chosen for every fold accompanied to the iteration that increased Jaccard Index was calculated on validation dataset after the completion of 200 epochs.

Postprocessing
The model which produces the best result was selected from every 10 training folds and was used to record the validation and test submission sets.The final likelihood map was produced by averaging the complete probability map from every model.The likelihood map was fine-tuned with a conditional random field, yet this was at last rejected for its insignificant performance.

Lesion Classification
Lesion classification is a process of classifying the images into 2 categories namely Benign and Melanoma.

Preprocessing
All the training images were snipped as to make larger dimensions is of same size as smaller dimension and afterward resized to 256×256 pixels.The additional training images can be created by rotating every original image to 90 degrees and 270 degrees prior to resizing thereby training images used were extended to 6,000.

Figure 4 Training images of Nevus with colored gauze Figure 5 Training images of Seborrheic Keratosis
Moreover, while investigating the training images, two possible sources of data leaks were found: a) In figure 4 it can be seen that the evident colored gauze images were overall a similar class.b) Images with a bright light on both left and right edges were overall a similar class which can be seen in Figure 6.Every image from the training set was manually snipped to remove these objects so as to guarantee that the model was learning features about the skin lesion.

Model Architecture
For image classification, an AlexNet [23] deep convolutional network architecture was used with a size equals 224×224 pixels of input image and created a probability distribution among the labels.Every training image was randomly snipped to 224×224 pixels before introducing to the model.The fully-connected layers have 1024 neurons rather than the typical 4096 in contrast to the AlexNet architecture.Dropout was implemented on fully connected layers.The rectified linear units were implemented for all the non-linearity's.

Training
Adam [24] optimization algorithm was used to train this network.Here the learning rate has been assigned to 1e-5 thereby made constant all over the training process.Minibatches with a size of 64 were used in which each class was to be addressed an equivalent number of times.To train the model, a 10-fold cross validation technique was used in which each fold was chosen stochastically, however delineated across every lesion classes.Along with each pivoted images, all the original images were allocated to single fold as to guarantee that no leakage between the train and test folds.
Additionally, transformations such as Flipping, Rotation and Zoom were implemented to the image and mask at runtime after the minibatches were chosen.Training was proceeded for 300 epochs.After every epoch, the AUC was estimated on validation set.After 300 epochs have been completed, the model chosen for each fold related to iteration that increased the AUC was calculated on validation dataset.

Postprocessing
The finest model from every 10 training folds has been used to estimate the validation and test submission sets.The final probability of each image was created by averaging the probability from every model.Along with the patient demographic information, these probabilities were introduced to random forest model that produced the final probabilities.

Results
The ISIC recommends Jaccard Index (JA) metric for performance evaluation.Let Ntp, Ntn, Nfp, Nfn be the number of true positive, number of true negative, number of false positive and number of false negative respectively.Here the Jaccard Index (JA) can be defined as

Lesion Segmentation
Our method provides a better performance of detecting the lesion regions.Skin artifacts and complex patterns of skin and skin lesion can point any segmentation algorithm in wrong direction but the proposed method has segmented the lesion's border accurately in challenging conditions.The best Jaccard Index score of every validation folds is given in Table 1.

Lesion Classification
The best Jaccard Index score of every validation folds in lesion classification is given in Table 2.These outcomes are simply depends on visual features of image.

Table 2 Lesion
Classification -Average Jaccard Index of Cross validation folds

Conclusion
The proposed framework has been assessed on ISIC 2017 testing set.The Jaccard Index of lesion segmentation and lesion classification are 0.7562 and 0.889 which are practically better than the current deep learning approaches.From surveying the test images for the investigation, apparently bright light leak may be available in this dataset of images.In the event that this is valid, it is fascinating to calculate the final metric in absence of these models.In case bright spot pattern is certainly a data leak that occurs in images of test set, then those images belong to class Seborrheic Keratosis.

References
and his associates set up a framework integrating recent advancements in deep learning and AI techniques for segmentation and classification of skin lesion.Kawahara et al. extracts features using a fully convolutional network for melanoma recognition [18].Yu et al. distinguishes melanoma and non-melanoma skin lesions by applying deep residual network.International Skin Imaging Collaboration (ISIC) coordinated melanoma recognition encounters from 2016, which exceptionally advances the exactness of automatic melanoma detection techniques.The three processing techniques of skin lesion images were declared in ISIC 2017 are (a) lesion segmentation, (b) feature extraction and (c) lesion classification.Not quite the same as the widely considered lesion segmentation and classification techniques, feature extraction of dermoscopic image is a new method in the scope.As a result, very few studies have been proposed to address the issue.
Image preprocessing techniques such as data centering, resizing, hair removal and scaling were done before the image is given as input to CNN model.Resizing of each of the training images to 192 ×192 pixels was to done to prepare the images for the network.Every training image was elastically biased to produce more training images.For every original training image, four randomly created elastic distorted images were generated and then resized to 192 × 192 pixels.Furthermore, each of the training images was rotated to 90 degrees and the rotated images were added with additional elastic distortions.For each of the original training image, an additional 9 training examples were produced after incorporating these additional distortions.Every training mask was applied rotation and transformation as to produce an additional 18,000 training images thereby making 20000 training images entirely.