SKIN LESION SEGMENTATION BY PIXEL BY PIXEL APPROACH USING DEEP LEARNING

Skin lesion segmentation is an imperative step for image analysis and visualization task. Manual segmentation by an expert operator is too timeconsuming and its accuracy may be degraded by different human operators. An automatic segmentation method is therefore required and one of the important parts in any classification system. In this work, more accurate skin lesion segmentation by Pixel-by-Pixel (PbP) approach using deep learning is presented. Before employing PbP approach, dermoscopic images are prepared for more accurate segmentation by Top-Hat Transform (THT) which removes the hair in the skin regions. The PbP approach has four stages; study the training images consists of skin lesions, construction of deep learning network followed by training it and finally evaluate the network with testing images. The evaluation of PbP approach is carried out using PH2 database images. Results of PbP approach in terms of Jaccard Index (JI), Accuracy (Acc) and DIce Coefficients (DIC) show the effectiveness of the system for skin lesion segmentation.


I. INTRODUCTION
The segmentation of an image into regions is an important first step for a variety of image analyses and visualization tasks. A wide variety of image segmentation techniques is presented in the literature for skin lesion segmentation. A pipelined architecture for skin lesion segmentation is discussed in [1]. It combines deep learning approach with graph cut algorithm. It removes the hair followed by the detection of lesion by deep learning. Then graph cut algorithm is used to fine tune the lesion region followed by a morphological based post processing step.
A deep learning approach with optimized colour feature is described ion [2]. At first lesion contrast is improved after the removal of artefacts by a hybrid approach. Then lesion region is segmented using optimized colour feature followed by the extraction of deep features and fusion with the colour features. Three deep learning architectures are discussed in [3] for the applicability in skin lesion segmentation. It uses DeepLab, TernausNet and SegNet combined with VGG16. An ensemble method is described in [4] for effective skin lesion segmentation. It uses Mask r-CNN and DeepLab methods. Delaunay triangulation for skin lesion segmentation is discussed in [5]. It consists of four stages to segment the skin lesions; artifact removal, detection of skin, segmentation and finally merging. Histogram thresholding method is used in [6] for segmentation due to distinct colors or intensities in the regions of foreground and background of an image. After segmentation, features such as color, shape and texture features are extracted.
The modified watershed technique is discussed in [7] for dermoscopic image segmentation. To reduce the border detection errors, a neural network classifier is utilized, and edge object value threshold method is used to remove large light blobs near the lesion boundary, and a noise removal procedure is applied to reduce the peninsula-shaped false-positive areas. Otsu's threshold based skin lesion segmentation is described in [8]. At first, the given colour image is converted into a gray scale image, and then a Gaussian filter is applied which is a two-dimensional low pass filter.
Wavelet Network (WN) based segmentation of skin lesions is described in [9]. WN is a member of fixed-grid WNs which does not require any training. The raw pixels in three colour channels are considered as the network inputs. Histogram thresholding is applied for skin lesion segmentation in [10]. After thresholding connected component analysis is employed for segmentation. Different colour channels such as HSV, HSI, CIE-LAB, and CIE-XYZ are analyzed. Texture feature based skin lesion segmentation is discussed in [11]. At first, the textures of skin and lesion regions are characterized, and then texture distinctiveness metric is used for the segmentation. A comparison of segmentation methods such as active contour-snacks algorithm, adaptive thresholding, and active contour-level set are discussed in [12]. Otsu's threshold based skin lesion segmentation is described in [13]. At first, the given colour image is converted into a gray scale image, and then a Gaussian filter is applied which is a twodimensional low pass filter.
Genetic algorithm based segmentation of skin lesions is discussed in [14] using an optimized approach. It overcomes the main drawback of other approaches such as over segmentation. Optimal colour channel based skin lesion segmentation is discussed in [15]. Initially, the given dermoscopic images are resized uniformly and then de-noised. Then the regions with similar features are merged together by morphological operations to trace the boundary of the skin lesion. A review of various skin lesion segmentation approaches such as edge based, region based and threshold based is described in [16]. An evolutionary strategy is used for lesion segmentation in dermoscopic images [17]. It is a random search technique which is applied to the pre-processed image. The role of shape in dermoscopic image segmentation is discussed in [18]. Adaptive thresholding is applied for segmentation.
In this study, an efficient PbP approach is designed for skin lesion segmentation. The organization of this study is as follows: The design of PbP approach by the use of THT and deep learning is illustrated in section 2. The results of PbP approach are discussed in section 3 and the study for skin lesion segmentation is concluded in the final section.

II. METHODS AND MATERIALS
The segmentation approach is to partition an image based on discontinuities in a local neighborhood. The most common way to look for discontinuities is to run a differentiating mask over the image and associate the grey level value of the output with the centre pixel. The process can be expressed as: ( y x I with operator O which is defined over some neighborhood (x,y). Based on the operator, different results are produced. Figure 1 shows the overview of PbP system for skin lesion segmentation.

A. Skin Hair Removal by THT
Mathematical Morphology (MM) has produced a class of nonlinear digital image processing operators which provides an approach to image processing based on shape and size. In MM, information about the object size, shape, smoothness, connectivity and also orientation, can be built into an image analysis operator called as structuring element [19]. The structuring element is a tool for grey scale morphological operations. Before defining the THT, the two basic morphological operators; erosion and dilation of a function  Do are the domains of f and b respectively. The result of applying any of the two operators is directly related to the shape of the structuring element. Generally, erosion produces a darker image whereas dilation produces a brighter image than the original. Erosion, therefore, removes bright details based on the shape of the structuring element and dilation removes dark details. The opening of function f by b denoted by b f  is given by ( y x f is defined as the difference between the function and its morphological opening which is defined by (5) The result of the THT of a dermoscopic image using a flat structuring element of size 9x9 is shown in Figure 2 which is also de-noised by medial filter.

Fig. 2 Outputs of PbP approach at preprocessing stage
Opening involves two morphological operations, erosion followed by dilation. The initial erosion removes the small (with respect to the structuring element), light details and consequently darkens the image. The subsequent dilation increases the brightness of the image without recovering the removed details. Thus, opening removes bright details smaller than the size of the structuring element and, therefore, the top-hat transform highlights these details. If the structuring function is flat, grey scale dilation and erosion are reduced to max and min filtering, respectively and therefore the opening operation reduces to max-min operation in the local neighborhood defined by the structuring element.

B. Deep Learning for Segmentation
The PbP approach uses one type of CNN architecture; Deeplab V3+ [20] designed for PbP segmentation. Figure 3 shows the Deeplab V3+ architecture (downloaded from Google AI website).

Fig. 3 Deeplab V3+ architecture (downloaded from Google AI website)
The weights of Deeplab V3+ are assigned to the weights of a pre-trained network of Resnet-18. The segmentation of skin lesion approach consists of a series of four steps;  Study of training dermoscopic images: A collection of training images and their corresponding ground truth (every pixel represents the categorical label i.e., normal or abnormal) are required to train the network.
 Construction of Deeplab V3+: At first, it requires the down-sampling of the images and then up-sampling to match the size of the inputs. These operations are performed in between convolution and rectified linear unit (ReLU) layers as shown in Figure 4. At last, pixel classifications are made in the final set of layers (convolution layers, softmax and pixel classification layers). All the layers are combined to create the network.
 Training Deeplab V3+: In this step, the designed network is trained using the training images. In order to get good results, the learning process is fine tuned.

Fig. 4 ReLU Activation Function
 Evaluating Deeplab V3+: The test data is imported to evaluate the network and finally quality metrics such as Jaccard Index, accuracy and Dice coefficients are computed.

III. RESULTS AND DISCUSSION
The evaluation of PbP approach for skin lesion segmentation is carried out using PH 2 [21][22] database. This database is very useful for the development and testing of dermoscopic image analysis systems. The database images are carefully examined by the dermatologists and included ground truth data that contains the location of the skin lesions as well as the type of abnormalities present in the image. All 200 images are used for the analysis. Figure 5 shows the segmented region of images in the top row by Deeplap V3+ architecture (middle row) and ground truth data is shown in the bottom row.
The performance of PbP system is measured using the following metrics and their definitions are as follows: where TN, FN, FP and TP denote True Negative, False Negative, False Positive and True Positive respectively. Figure 6 shows the comparison performance of PbP system with conventional clustering approaches such as k-means and fuzzy c-means clustering approaches. Fig. 6

IV. CONCLUSION
In this study, skin lesion is segmented accurately using PbP based approach. It uses Deeplab V3+ architecture for effective segmentation by a pixel based approach. Before deep learning, THT and median filtering are used for removing unwanted information from the acquired dermoscopic images such as hairs and noises. The PbP system is evaluated on 200 dermoscopic images in the PH 2 database and evaluation metrics such as JI, Acc and DIC are computed. Also, the performance is compared with conventional clustering approaches and a deep convolutional neural network. Results prove the efficacy of PbP system over other systems with 96% accuracy.