SLSDeep: Skin Lesion Segmentation Based on Dilated Residual and Pyramid Pooling Networks

Skin lesion segmentation (SLS) in dermoscopic images is a crucial task for automated diagnosis of melanoma. In this paper, we present a robust deep learning SLS model, so-called SLSDeep, which is represented as an encoder-decoder network. The encoder network is constructed by dilated residual layers, in turn, a pyramid pooling network followed by three convolution layers is used for the decoder. Unlike the traditional methods employing a cross-entropy loss, we investigated a loss function by combining both Negative Log Likelihood (NLL) and End Point Error (EPE) to accurately segment the melanoma regions with sharp boundaries. The robustness of the proposed model was evaluated on two public databases: ISBI 2016 and 2017 for skin lesion analysis towards melanoma detection challenge. The proposed model outperforms the state-of-the-art methods in terms of segmentation accuracy. Moreover, it is capable to segment more than $100$ images of size 384x384 per second on a recent GPU.


Introduction
According to the skin Cancer Foundation Statistics, the percentage of both melanoma and non-melanoma skin cancers has been increasing rapidly over the last few years [19]. Dermoscopy, non-invasive dermatology imaging methods, can help the specialists to inspect the pigmented skin lesions and diagnose malignant melanoma at an initial-stage [12]. Even the professional dermatologist can not properly classify the melanoma only by relying on their perception and vision. Sometimes, human tiredness and other distractions during visual diagnosis can also yield high number of false positives [4]. Therefore, a Computer-Aided Decision system (CAD) is needed to assist the dermatologists to properly analyze the dermoscopic images and accurately segment the melanomas. Many attempts of melanoma segmentation have been proposed in the literature. An overview of the different melanoma segmentation techniques is presented in [26]. However, this task is still a challenge, since the dermoscopic images has various characteristics including different sizes and shapes, fuzzy boundaries, different colors, and the presence of hair [8]. In last few decades, many approaches have been proposed Negative Log Likelihood (NLL) and End Point Error (EPE) to cope with the aforementioned challenges. Most of these methods are based on thresholding, edge-based and/or region-based active contour models, clustering and supervised learning [5]. However, these methods are unreliable when dermoscopic images are inhomogeneous and/or lesions have fuzzy or blurred boundaries [5]. Furthermore, their performance relies on efficient pre-processing algorithms, such as filtering, illumination correction and hair removal, which badly affect the generalizability of these models. Recently, deep learning methods applied to image analysis, specially Convolutional Neural Networks (CNNs) have been used to solve the image segmentation problem [15]. These CNN-based methods can automatically learn features from raw pixels to distinguish between background and foreground objects to attain the final segmentation. Most of these approaches generally are based on encoderdecoder networks [15]. These networks learn to map the features of an image to a segmented image. The encoder networks are used for extracting the features from the input images, in turn the decoder ones used to construct the segmented image. The U-net network proposed in [18] has been particularly designed for biomedical image segmentation based on the concept of Fully Convolutional Networks(FCN) [15]. The U-net model reuses the feature maps of the encoder layers to the corresponding decoders and concatenates them to upsampled (via deconvolution) decoder feature maps called "skip-connections". The U-Net model for SLS outperformed many classical clustering techniques [14].
In addition, the deep residual network (ResNet) model [24] is a 50-layers network designed for segmentation tasks. ResNet blocks are used to boost the overall depth of the networks and allow more accurate segmentation depending on more significant image features. Moreover, Dilated Residual Networks (DRNs) proposed in [23] increase the resolution of the ResNet blockss output by replacing a subset of interior subsampling layers by dilation [22]. DRNs outperform the normal ResNet without adding algorithmic complexity to the model. DRNs are able to represent both tiny and large image features. Furthermore, Zhao et. al. [27] proposed a Pyramid Pooling Network (PPN) that is able to extract additional contextual information based on a multi-scale scheme.
Inspired by the success of the aforementioned deep models for semantic segmentation, we propose a model combining skip-connections, dilated residual and pyramid pooling networks for SLS with different improvements. In our model, the encoder network depends on DRNs layers, in turn the decoder depends on a PPN layer along with their corresponding connecting layers. More features can be extracted from the input dermoscopic images by combining DRNs with PPN, in turn it also enhances the performance of the final network. Finally, our SLS segmentation model uses a new loss function, which combines Negative Log Likelihood (NLL) and End Point Error (EPE) [1]. Mainly, cross-entropy is used for multi-class segmentation models, however it is not as useful as NLL in binary class segmentation. Thus, in such melanoma segmentation, we propose to use NLL as a loss function. In addition, for preserving the melanoma boundaries, EPE is used as a content loss function. Consequently, this paper aims at developing an automated deep SLS model with two main contributions: • An encoder-decoder network for efficient SLS without any pre-and postprocessing algorithms based on dilated residual and pyramid pooling networks to enclose coarse-to-fine features of dermoscopic images.   1 shows the architecture of the proposed SLSDeep model with DRNs [28] and PPN [10]. The network contains two-fold architecture: encoder and decoder. Regarding the encoder phase, the first layer is a 3×3 convolutional layer followed by 3 × 3 max pooling with stride 2.0 that generates 64 feature maps. This layer uses Relu as an activation and batch normalization to speed-up the training steps with a random initialization. Following, four pre-trained DRNs blocks are then used to extract 256, 512, 1024 and 2048 feature maps, respectively as shown in Fig.2. The first, third, and fourth DRNs layers are with stride 1.0, in turn the second one is with stride 2.0. Thus, the size of final output of encoder is 1/8 of the input image (e.g. in our model, the input image is in 384 × 384 and the output feature maps of the encoder is 48 × 48). For global contextual prior, average pooling is used before feeding to fully connected layers in image classification [21]. However, it is not sufficient to extract necessary information from our skin lesion images. Therefore, we do not use average pooling at the end of the encoder and directly fed the output feature maps to the decoder network.
On the other hand, for the decoder network, we use the concept of PPN for producing multi-scale (coarse-to-fine) feature maps and then all scales are concatenated together to get more robust feature maps. PPN use a hierarchical global prior of variant size feature maps in multi-scales with different spatial filters as shown in Fig.2. In this paper, the used PPN layer extracts feature maps using four pyramid scales with rescaling sizes of 1 × 1, 2 × 2, 3 × 3 and 6 × 6. A convolutional layer with a 1×1 kernel in every pyramid level is used for generating 1024 feature maps. The low-dimension feature maps are then upsampled based on bilinear interpolation to get the same size of the input feature maps. The input and four feature maps are finally concatenated to produce 6144 feature maps (i.e., 4x1024 feature maps concatenated with the input 2048 feature maps). Sequentially, two 3×3 convolutional layers are followed by two upsampling layers. Finally, a softmax function (i.e. normalized exponential function) is utilized as logistic function for producing the final segmentation map. A ReLU activation with batch normalization is used in the two convolutional layers [11]. Moreover, in order to avoid the overfitting problem, the dropout function with a ratio of 0.5 [20] is used before the second upsampling layer.
The skip connections between all layers of the encoder and decoder were tested during the experiments. However, the best results were provided when only one skip connection was done between the last layer of the encoder and the output of PPN layer of the decoder. The architecture of the encoder and decoder is given in details with the supplementary materials.

Loss Function
Most of the traditional deep learning methods commonly employ cross-entropy as a loss function for segmentation [18]. Since the melanoma is mostly a small part of a dermoscopic image, the minimization of cross-entropy tends to be biased towards the background. To cope with this challenge, we propose a new loss function by combining objective and content losses: NLL and EPE, respectively. In order to fit a log linear probability model to a set of binary labeled classes, the NLL is the objective function of the proposed model to minimize. Let v ∈ {0, 1} be a true label for binary classification and p = P r(v = 1) a probability estimate, the NLL of the binary classifier can be defined as: Regarding the content of the loss function, we have also computed an absolute error aiming at maximizing the Peak Signal-to-Noise Ratio (PSNR) by preserving the object boundaries. The used EPE loss follows a classical approach that the generated mask, tu is pixel-wise compared with the corresponding ground-truth, v. The EPE error can be defined by [1]: where u 0 and u 1 are the first derivatives of u in x and y directions, and v 0 and v 1 are the first derivatives of v. Hence, our final loss, which combines both NLL and EPE, can be defined as: where α < 1 is a weighted coefficient. In this work, we use α = 0.5.

Experimental Setup and Evaluation
Database: To test the robustness of the proposed model, it was evaluated on two public benchmark datasets of dermoscopy images for skin lesion analysis: ISBI 2016 [7] and ISBI 2017 [9]. The datasets images are captured by different devices at various top clinical centers over the world. In ISBI 2016 dataset, training and testing part contain 900 and 379 annotated images, respectively. The size of the images ranges from 542 × 718 to 2848 × 4288 pixels. In turn, ISBI 2017 dataset is divided into training, validation and testing parts with 2000, 150 and 600 images, respectively. Evaluation Metrics: We used the evaluation metrics of ISBI 2016 and 2017 challenges for evaluating the segmentation performances including Specificity(SPE), Sensitivity(SEN), Jaccard index(JAC), Dice coefficient(DIC) and Accuracy(ACC) detailed in [9] and [7].
Implementation: The proposed model is implemented on an open source deep learning library named PyTorch [16]. For optimization algorithm, we used Adam [13] for adjusting learning rate, which depends on first and second order moments of the gradient. We used a "poly" learning rate policy [6] and selected a base learning rate of 0.001 and 0.01 for encoder and decoder, respectively with a power of 0.9. For data augmentation, we selected random scale between 0.5 and 1.5, random rotation between -10 and 10 degrees. The "batchsize" is set to 16 for training and the epochs to 100. The experiments utilized NVIDIA TITAN X with 12GB memory and its takes approximately 20 hours for train the networks.
Evaluation and results: Since the size of the given images is very large, we resized the input images into 384 × 384 pixels for training our model. In this work, we tested different sizes and the 384 × 384 size yields the best results. In order to separately assess the different contributions of this model, the resulting segmentation for the proposed model with different variations have been computed: (a) The SLSDeep model without the content loss EPE (SLSDeep-EPE), (b) the proposed method with skip connections of all encoder and decoder layers (SLSDeep+ASC) and (c) the final proposed model (SLSDeep) with NLL and EPE loss functions and only one skip connection between the last layer of the encoder and the PPN layer.
Quantitative results on ISBI'2016 and ISBI'2017 datasets are shown in Table 1. Regarding ISBI'2016, we compared the SLSDeep and its variations to the four top methods: ExB, [24], [17] and [25] providing the best results according to [9]. The segmentation results of our model SLSDeep with its variations (SLSDeep-EPE and SLSDeep+ASC) perform much better than the all evaluated methods on the ISBI'2016 with the five aforementioned evaluation metrics. SLSDeep yields the best results among the three variations. In addition, for the DIC score, our model, SLSDeep, improved the results with around 3.5%, while the JAC score was significantly improved with 8%. The SLSDeep yielded results with an overall accuracy of more than 98%.  [25], [2] and [3], with ACC, DIC and JAC scores. However, [25] yielded the best SEN score with an improvement of 0.9% better than our model. The SLSDeep-EPE and SLSDeep+ASC provided reasonable results, however their results were worse than the three tested methods. SLSDeep-EPE yields the highest SPE, which is 0.1% and 0.3% more than MResNet-Seg [3] and SLSDeep, respectively. Using the EPE function with the final SLSDeep model significantly improved the DIC and JAC scores of 3% and 5%, respectively, on ISBI'2016 and of 5% and 8%, respectively, with ISBI'2017. In addition, SLSDeep with only one skip connections yields better results than SLSDeep+ASC on both ISBI datasets. , the lesions were properly detected, although the color of the lesion area is very similar to the rest of the skin. In addition, the lesion area was accurately segmented with sharp edges. Regarding to the third example (on the top-right side), SLSDeep properly segmented the lesion area; however a small false region with similar features was also detected. In turn, the last example is very difficult, since the lesion shown in the input image is a very small region. However, the SLSDeep model can segment it, but with bigger size of false negative regions.

Conclusions
This paper proposed a novel deep learning skin lesion segmentation model based on training an encoder-decoder network. The encoder network used the dilated ResNet layers with downsampling to extract the features of the input image, in turn convolutional layers with pyramid pooling and upsampling are used to reconstruct the segmented image. This approach outperforms, in terms of skin lesion segmentation, the literature evaluated on two ISBI'2016 and ISBI'2017 datasets. The experiments show that SLSDeep is robust segmentation technique using different evaluation metrics: accuracy, Dice coefficient, Jaccard index and specificity. In addition, the qualitative results show promising skin lesion seg-mentation. For future work, the proposed model will be explored on different color spaces and applied to other medical applications to prove its versatility.