# Antialiasing Attention Spatial Convolution Model for Skin Lesion Segmentation with Applications in the Medical IoT

Authors: Phuong Thi Le; Ching-Chun Chang; Yung-Hui Li; Yi-Chiung Hsu; Jia-Ching Wang
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

This study presents a noninvasive visual sensing enhancing system for skin lesion segmentation. According to the Skin Cancer Foundation, skin cancer kills more than two people every hour in the United States, and one in every five Americans will develop the disease. Skin cancer is becoming more popular, so the need for skin cancer diagnosis is increasing, particularly for melanoma, which has a high metastasis rate. Many traditional algorithms, as well as a computer-aided diagnosis tool, have been implemented in dermoscopic images for skin lesion segmentation to meet this need. However, the accuracy of the model is low, and the prognosis time is lengthy. This paper presents antialiasing attention spatial convolution (AASC) to segment melanoma skin lesions in dermoscopic images. Such a system can enhance the existing Medical IoT (MIoT) applications and provide third-party clues for medical examiners. Empirical results show that the AASC performs well when it is able to overcome dermoscopic limitations such as thick hair, low contrast, or shape and color distortion. The model was evaluated strictly under many statistical evaluation metrics such as the Jaccard index, Recall, Precision, F1 score, and Dice coefficient. The performance of the AASC was trained and tested. Remarkably, the AASC model yielded the highest scores in both three databases compared with the state-of-the-art models across three datasets: ISIC 2016, ISIC 2017, and PH2.


---

## Body

## 1. Introduction

The advances in the Internet of Things and biomedical signal processing have spurred the development of the Medical Internet of Things (Medical IoT or MIoT). More and more healthcare monitoring and diagnosis rely on MIoT devices. Recent machine learning techniques such as deep learning have subsequently enhanced the practicability of the MioT. Medical researchers and scientists can utilize such techniques to discover hidden factors, subsequently helping more patients. In 2020, there were nearly 10 million deaths from cancer according to the WHO (World Health Organization). In the US, more than 600000 deaths in 1.8 million diagnoses are estimated [1]. The fees for cancer treatment have nearly doubled in the last two decades in the US [2]. This could say that cancer is one of the leading causes of death worldwide. All of these statistics compel experts to find a way to reduce cancer risks. In truth, they have statistics on five stages of cancer, including stage 0, stage I (the early stage), stage II, stage III, and stage IV. In addition, the experts clearly show that cancer victims have a high survival rate if they are properly diagnosed as soon as possible in the early stages when the cancer is small and only in one area. Most researchers then started on early cancer detection as the first priority to control cancer.To find solutions for the most dangerous cancers, the American Cancer Society compiled a list of cancer incidences last year, and the most common type of cancer is melanoma with 100,350 new cases and 6.850 deaths. In fact, the Skin Cancer Foundation predicted one out of every five Americans by the age of 70 will develop skin cancer. Every hour, more than two people in the United States die from skin cancer. However, melanoma has a 99 percent five-year survival rate when detected early. Thus, melanoma detection is critical for decreasing the threat to patients with skin cancer. There is a popular method to examine the skin through skin surface microscopy called dermoscopy which is mainly applied to the evaluation of pigmented skin lesions. Dermatologists, based on selected information from dermoscopy, can diagnose melanoma easily. To generate a high efficiency for this method, magnifying lenses and lights must be of sufficient quality because different light powers or hand-held devices may return unexpected image quality in a dermoscopy process, such as blur, loss of features, and so on. Furthermore, only trained physicians could analyze precisely the dermoscopy dataset because it is entirely dependent on the visual acuity of the practitioner as well as their specialized knowledge. Overall, dermoscopy only could be used efficiently if it satisfies both conditions about technique equipment, lights, and experts.Computer-aided diagnosis (CAD), a new solution, could detect automatically and diagnose melanoma efficiently without the experienced hands. CAD integrates elements of artificial intelligence and computer vision with image processing in radiology and pathology to improve radiologist performance [3]. Recent sensing technology [4–6], such as the medical Internet of Things and body sensor networks, also enhanced CAD. Piccolo et al. demonstrated that CAD was a useful tool for diagnosing melanoma compared with an inexperienced clinician [7]. More carefully, their study also exemplified sensitivity evaluation for the CAD, which achieved an accuracy rate of 92% compared with 69% in the evaluation for inexperienced clinicians. Because of the convenience and high accuracy, some algorithms based on the CAD were public for predicted diseases.In this article, we propose the antialiasing attention spatial convolutional model (AASC) to segment automatic melanoma for skin lesions. A representation of the model is described in Figure1. The AASC consists of the encoder and decoder sides. To indicate the location and strength of input features at the encoder, we designed a layer with double convolution that could simultaneously learn a huge number of filters from the input dataset automatically. Additionally, before the downsampling step, an attention module is added to the encoder to remark the signature features in the input dataset and remind the model to save these features during the training time. Antialiasing technique is proposed to reduce the dimension of the image and maintain shift-equivariance. At the decoder, the Pyramid Max Pooling Module (PMP) is considered a highlight for improving accuracy of the model. In fact, the module separates each input feature into four different sizes to decide the most important features and forward them to the next step. Furthermore, a skip connection is used to minimize the loss of information during down- and upsampling. To evaluate loss of the model, binary cross entropy is applied during training and testing. The preprocessing assistance is helpful in increasing the performance and removing the overfitting problem. For the preprocessing, we resized the input image dimension first and then used blur Gaussian to make the calculation process easier. Simultaneously, to overcome the constraint of the number of input images, horizontal and vertical flips and random rotation were used. As a result, the number of images has increased fourfold. Some optimization parameters were also checked and set up in the AASC model, such as a weight decay of 0.0005, a kernel regularizer of 0.0006, and a learning rate of 0.003. Finally, to check the true efficiency of the AASC model, we run the model in three different databases, namely ISIC 2016, ISIC 2017, and PH2, and evaluate the result under a variety of metrics such as recall, precision, accuracy, F1 score, Dice coefficients, and Jaccard indexes.Figure 1
The pictorial representation of the proposed AASC model.The rest of this paper is organized as follows. Section2.1. gives an overview of the traditional algorithms for skin segmentation. Section 2.2. then describes the CAD systems. Section 2.3. introduces the proposed attention spatial model. Next, Section 3 summarizes the performance of the proposed method and the analytic results. Conclusion is finally drawn in Section 4.


## 2. Related Work

### 2.1. Traditional Algorithms for Skin Segmentation

In the early days, Principal component analysis, Markov Chains, or Otsu Algorithm, K-means clustering, Fuzzy C-means clustering were used for skin segmentation. Firstly, principal component analysis (PCA) applies some sort of transformation on a large set of variables of the original image data to condense information at a new set of fewer variables [8]. The main advantage of such a technique is that details not apparent in false color composite images can be highlighted in one of the component images that result. OLugbara [9] revealed that the skin lesion could be identified correctly through the PCA. However, the range between lesion and background was unclear, which caused mistakes in the diagnosis.In view of the limitations of PCA, a Markov chain (MC) has been proposed for segmenting features of interest and shapes [10]. In comparison to conventional methods, the MC technique develops novel efficient methods for shape and texture segmentation resulting in higher accuracy and economical solutions. Although the MC algorithm outperformed the PCA algorithms, the segmentation generated by the MC algorithm has heterogeneous areas and fuzzy borders that highlight a part. As a result, healthy skin may be segmented as a skin lesion.Continually, Otsu Algorithms [11], K-means clustering [12], and Fuzzy C-means clustering [13] are closely related for binary segmentation, but their performance for skin lesion segmentation is poor in the condition of a variety of skin types and minimal healthy skin. General cons of these algorithms must set parameters independently in each dataset, resulting in a limited application range.


### 2.2. CAD Systems

The CAD was presented in the introduction part and is highly recommended for skin segmentation in general and for melanoma segmentation in particular. The CAD system is mainly based on computer vision algorithms such as classification [14], detection [15, 16], and recognition [17–19]. At the International Skin Imaging Challenge (ISIC) of recent years, many methods based on the CAD were designed and evaluated as the top leader board for skin cancer segmentation. For example, in the ISIC 2016 dataset, the performance of Inception-v3 and Vgg-16 for skin lesion segmentation was evaluated, with the highest performance being around 61.6 percent and 69.3 percent testing accuracy, respectively [20]. Besides, Unet model can be run with fewer layers (total 23 convolutional layers) and training samples while still producing accurate segmentation results, and then it quickly became popular with many updated versions. The combination of Unet and Recurrent Residual Convolutional Neural Network (RRCNN) for skin cancer segmentation in ISIC 2017 achieved higher performance than SegNets and Residual Unet (ResUNets). In the following year, U-net34 ran on ISIC dataset 2018 for Melanoma segmentation with the average Jaccard index of 85,39%, and this result compared against the top-ranked team of 76,5% [21]. The U-net34 combines insight Unet decode and a pretrained Resnet34 as the Unet encode. The Resnet34 is made up of the initial convolutional layer, 16 blocks, and a fully connected layer. It is noticeable that the pretrained Resnet34 significantly improved the performance of the model. Another version of Unet was named LadderNet including a number of encoder-decoder paths [22]. In addition, a skip connection has been built into the adjacent decoder to save information from the encoder to the decoder.In 2019, FucusNet presents the other Unet version, which includes multiple Unet models running in parallel, with the feature maps from the first decoding unit in the Unet associated with the components of the second encoding unit of Unet [23]. This model outperformed the Unet and ResUnet models in the 2017 skin cancer segmentation challenge. Last year, Kashan Zafar introduced UResNet-50 with 50 layers which contained ResNet architecture at the contracting path and Unet architecture at the expensive path [24]. The UResNet-50 performed well, with Jaccard Indexes of 77.2 and 85.4 percent on the ISIC 2017 and PH2 datasets, respectively, when compared to other architectures like the Mask-RCNN [25] and Deep labV3+ [26]. Actually, the Mask-RCNN is highly recommended for image segmentation because it includes an additional brand for predicting masks pixel by pixel and three outputs such as object segmentation, a class name, and a bounding box. Deeplabv3 is impressive by combining Atrous Spatial Pyramid Pooling (ASSP) for encoding multiscale contextual information and Encoder-Decoder Architecture for recovering both location and spatial information. Regrettably, Mask-RCNN and Deeplabv3 only attained the Jaccard indexes of 83% and 81.4% in the PH2 dataset, lower than that of UResNet-50. Based on previous research, we can conclude that the Unet model, i.e., its modified models, distributed significantly to segment skin cancer. However, some models were implemented without performing prepost processing on the input images causing a lack of responsiveness to sensitivity metric evaluation. Furthermore, running a parallel model may easily result in an overfitting problem. Overfitting is regarded as a major issue in medical databases due to the use of fewer datasets on the deeper model.


### 2.3. Antialiasing Attention Spatial Convolution Model (AASC)

The preceding analysis demonstrates that many previous architectures, such as Unet, Fusion net, and Res-Unet, were successful for skin image segmentation, which includes two paths: encoding and decoding. In this study, AASC was also designed with an encoder and decoder approach. Instead of using available convolutional layers as in the previous versions, this encoding unit consists of reconstruction of convolution, attention module, and subsampling operations. Furthermore, the decoder unit was implemented with a combination of atrous convolution layers at the PPM module in different sizes, convolution transpose, and several convolutional layers with a resolution of 256 × 256 pixels set as the input images. The output of the network is binary segmentation masks such as melanoma areas and backgrounds. For this purpose, the AASC model was trained and evaluated in three databases, namely ISIC 2016, ISIC 2017, and PH2. The AASC model architecture is shown in Figure1.On the encoding path, after receiving the input dataset, the convolutional block (C_Block) with two convolutional layers available in Keras library (Conv2D) set up corresponding parameters such as a stride (s) of 1, weight decay (w) of 0.0005, kernel regularizer (r) of 0.0006, a kernel (k) of 3 × 3 as shown in Figure 2.Figure 2
The variant of the convolutional layer.Next, the attention module (A_module) is applied to concentrate on the highlight features as shown in Figure3. Spatial information is complementary to channel information based on the A_module. It is meaningful to emphasize the position and the information of objects. Applying Global Average Pooling and Global Max Pooling along the channel axis and concatenating them generates the spatial attention map which shows the position of objects. The channel information map uses the two pooling operations resulting in the Global Average Pooling feature maps and the Global Max Pooling feature maps.Figure 3
The variant of the convolutional layer.The main task of the encoding is to reduces the input size in order to make calculations simpler and to mark necessary features. However, using pooling layers is the reason for the variance problem. For instance, if we use Max-pooling with kernel of 2 and stride of 2 for [0,0,1,1,0,0,1,1] as input signal, the result will be [0,1,0,1]. This step significantly affects lost shift-equivariance. Shifting the input and output of a function is shift equivariant (F˜) as defined in (1) if the input and output are shifted equally, so shifting and feature extraction are commutative. In contrast, shift invariance is shown in (2).(1)ShiftΔh,ΔwF˜X=F˜ShiftΔh,ΔwX∀Δh,Δw,(2)F˜=F˜ShiftΔh,ΔwX∀Δh,Δw.In which,R and W represent resolutions of an image. X∈RR×W×3 is input image and F˜X∈RR×W×3 is the feature maps that could be rescaled to the original resolution.To overcome these cons, the antialiasing technique was proposed in lieu of Max-pooling. Blur-pooling [27] is a new pooling technique that reduces the image sizes through two steps instead of one step, as in the traditional max-pooling operation. The blur pooling is described in Figure 4.Figure 4
The blur-pooling.In the first step, the max operation is performed densely, which includes the Max-pooling layer with a stride of 1 and the Blur-pooling (B_Pooling) with a stride of 2 instead of the Max-pooling layer with a stride of 2. The second step integrates an antialiasing filter with subsampling.In truth, each time the Blur-pooling layer is applied, the input dimension could be halved. Besides, output features at each Blur-pooling layer were implemented in two tasks. In the first task, these features are used in the next step with C_Block and A_module. The other task is to double the size of these features through convolution transpose (C_Transpose), which were considered as the important features in the decoder step. This step repeats four times during the training process, but it is notable that the values of the number in the filters of the attention module at each downsampling block are different, such as 16, 32, 64, 128. As a result, the number of channels decreases significantly, as does the calculating process and training time. Simultaneously, features ranging from low-level (such as colouring, contours, texture, and so on) to high-level (the entire shape of the object) are thoroughly learned in this encoder side.The inputs of the decoder side are received from the output features of the encoder. Thus, the dimension range at the final encoded layer is 16 × 16, which is considered as the input of the first layer at the decoder. The primary function of the decoder is to increase the size of images. This is also the concerning root cause of the loss of important features when the dimension increases significantly and rapidly, as mentioned in previous studies. A solution is to give out a PMP module (Figure5) in the decoder that divides each input into four parts so that features can be learned carefully before increasing the dimension. The mask and background are better and more accurately segmented through this step.Figure 5
The pyramid max-pooling module.Overall, the AASC model provides superior performance, which has already been demonstrated against Unet, Res-Unet, Mask-R CNN, DeeplabV3+.


## 2.1. Traditional Algorithms for Skin Segmentation

In the early days, Principal component analysis, Markov Chains, or Otsu Algorithm, K-means clustering, Fuzzy C-means clustering were used for skin segmentation. Firstly, principal component analysis (PCA) applies some sort of transformation on a large set of variables of the original image data to condense information at a new set of fewer variables [8]. The main advantage of such a technique is that details not apparent in false color composite images can be highlighted in one of the component images that result. OLugbara [9] revealed that the skin lesion could be identified correctly through the PCA. However, the range between lesion and background was unclear, which caused mistakes in the diagnosis.In view of the limitations of PCA, a Markov chain (MC) has been proposed for segmenting features of interest and shapes [10]. In comparison to conventional methods, the MC technique develops novel efficient methods for shape and texture segmentation resulting in higher accuracy and economical solutions. Although the MC algorithm outperformed the PCA algorithms, the segmentation generated by the MC algorithm has heterogeneous areas and fuzzy borders that highlight a part. As a result, healthy skin may be segmented as a skin lesion.Continually, Otsu Algorithms [11], K-means clustering [12], and Fuzzy C-means clustering [13] are closely related for binary segmentation, but their performance for skin lesion segmentation is poor in the condition of a variety of skin types and minimal healthy skin. General cons of these algorithms must set parameters independently in each dataset, resulting in a limited application range.


## 2.2. CAD Systems

The CAD was presented in the introduction part and is highly recommended for skin segmentation in general and for melanoma segmentation in particular. The CAD system is mainly based on computer vision algorithms such as classification [14], detection [15, 16], and recognition [17–19]. At the International Skin Imaging Challenge (ISIC) of recent years, many methods based on the CAD were designed and evaluated as the top leader board for skin cancer segmentation. For example, in the ISIC 2016 dataset, the performance of Inception-v3 and Vgg-16 for skin lesion segmentation was evaluated, with the highest performance being around 61.6 percent and 69.3 percent testing accuracy, respectively [20]. Besides, Unet model can be run with fewer layers (total 23 convolutional layers) and training samples while still producing accurate segmentation results, and then it quickly became popular with many updated versions. The combination of Unet and Recurrent Residual Convolutional Neural Network (RRCNN) for skin cancer segmentation in ISIC 2017 achieved higher performance than SegNets and Residual Unet (ResUNets). In the following year, U-net34 ran on ISIC dataset 2018 for Melanoma segmentation with the average Jaccard index of 85,39%, and this result compared against the top-ranked team of 76,5% [21]. The U-net34 combines insight Unet decode and a pretrained Resnet34 as the Unet encode. The Resnet34 is made up of the initial convolutional layer, 16 blocks, and a fully connected layer. It is noticeable that the pretrained Resnet34 significantly improved the performance of the model. Another version of Unet was named LadderNet including a number of encoder-decoder paths [22]. In addition, a skip connection has been built into the adjacent decoder to save information from the encoder to the decoder.In 2019, FucusNet presents the other Unet version, which includes multiple Unet models running in parallel, with the feature maps from the first decoding unit in the Unet associated with the components of the second encoding unit of Unet [23]. This model outperformed the Unet and ResUnet models in the 2017 skin cancer segmentation challenge. Last year, Kashan Zafar introduced UResNet-50 with 50 layers which contained ResNet architecture at the contracting path and Unet architecture at the expensive path [24]. The UResNet-50 performed well, with Jaccard Indexes of 77.2 and 85.4 percent on the ISIC 2017 and PH2 datasets, respectively, when compared to other architectures like the Mask-RCNN [25] and Deep labV3+ [26]. Actually, the Mask-RCNN is highly recommended for image segmentation because it includes an additional brand for predicting masks pixel by pixel and three outputs such as object segmentation, a class name, and a bounding box. Deeplabv3 is impressive by combining Atrous Spatial Pyramid Pooling (ASSP) for encoding multiscale contextual information and Encoder-Decoder Architecture for recovering both location and spatial information. Regrettably, Mask-RCNN and Deeplabv3 only attained the Jaccard indexes of 83% and 81.4% in the PH2 dataset, lower than that of UResNet-50. Based on previous research, we can conclude that the Unet model, i.e., its modified models, distributed significantly to segment skin cancer. However, some models were implemented without performing prepost processing on the input images causing a lack of responsiveness to sensitivity metric evaluation. Furthermore, running a parallel model may easily result in an overfitting problem. Overfitting is regarded as a major issue in medical databases due to the use of fewer datasets on the deeper model.


## 2.3. Antialiasing Attention Spatial Convolution Model (AASC)

The preceding analysis demonstrates that many previous architectures, such as Unet, Fusion net, and Res-Unet, were successful for skin image segmentation, which includes two paths: encoding and decoding. In this study, AASC was also designed with an encoder and decoder approach. Instead of using available convolutional layers as in the previous versions, this encoding unit consists of reconstruction of convolution, attention module, and subsampling operations. Furthermore, the decoder unit was implemented with a combination of atrous convolution layers at the PPM module in different sizes, convolution transpose, and several convolutional layers with a resolution of 256 × 256 pixels set as the input images. The output of the network is binary segmentation masks such as melanoma areas and backgrounds. For this purpose, the AASC model was trained and evaluated in three databases, namely ISIC 2016, ISIC 2017, and PH2. The AASC model architecture is shown in Figure1.On the encoding path, after receiving the input dataset, the convolutional block (C_Block) with two convolutional layers available in Keras library (Conv2D) set up corresponding parameters such as a stride (s) of 1, weight decay (w) of 0.0005, kernel regularizer (r) of 0.0006, a kernel (k) of 3 × 3 as shown in Figure 2.Figure 2
The variant of the convolutional layer.Next, the attention module (A_module) is applied to concentrate on the highlight features as shown in Figure3. Spatial information is complementary to channel information based on the A_module. It is meaningful to emphasize the position and the information of objects. Applying Global Average Pooling and Global Max Pooling along the channel axis and concatenating them generates the spatial attention map which shows the position of objects. The channel information map uses the two pooling operations resulting in the Global Average Pooling feature maps and the Global Max Pooling feature maps.Figure 3
The variant of the convolutional layer.The main task of the encoding is to reduces the input size in order to make calculations simpler and to mark necessary features. However, using pooling layers is the reason for the variance problem. For instance, if we use Max-pooling with kernel of 2 and stride of 2 for [0,0,1,1,0,0,1,1] as input signal, the result will be [0,1,0,1]. This step significantly affects lost shift-equivariance. Shifting the input and output of a function is shift equivariant (F˜) as defined in (1) if the input and output are shifted equally, so shifting and feature extraction are commutative. In contrast, shift invariance is shown in (2).(1)ShiftΔh,ΔwF˜X=F˜ShiftΔh,ΔwX∀Δh,Δw,(2)F˜=F˜ShiftΔh,ΔwX∀Δh,Δw.In which,R and W represent resolutions of an image. X∈RR×W×3 is input image and F˜X∈RR×W×3 is the feature maps that could be rescaled to the original resolution.To overcome these cons, the antialiasing technique was proposed in lieu of Max-pooling. Blur-pooling [27] is a new pooling technique that reduces the image sizes through two steps instead of one step, as in the traditional max-pooling operation. The blur pooling is described in Figure 4.Figure 4
The blur-pooling.In the first step, the max operation is performed densely, which includes the Max-pooling layer with a stride of 1 and the Blur-pooling (B_Pooling) with a stride of 2 instead of the Max-pooling layer with a stride of 2. The second step integrates an antialiasing filter with subsampling.In truth, each time the Blur-pooling layer is applied, the input dimension could be halved. Besides, output features at each Blur-pooling layer were implemented in two tasks. In the first task, these features are used in the next step with C_Block and A_module. The other task is to double the size of these features through convolution transpose (C_Transpose), which were considered as the important features in the decoder step. This step repeats four times during the training process, but it is notable that the values of the number in the filters of the attention module at each downsampling block are different, such as 16, 32, 64, 128. As a result, the number of channels decreases significantly, as does the calculating process and training time. Simultaneously, features ranging from low-level (such as colouring, contours, texture, and so on) to high-level (the entire shape of the object) are thoroughly learned in this encoder side.The inputs of the decoder side are received from the output features of the encoder. Thus, the dimension range at the final encoded layer is 16 × 16, which is considered as the input of the first layer at the decoder. The primary function of the decoder is to increase the size of images. This is also the concerning root cause of the loss of important features when the dimension increases significantly and rapidly, as mentioned in previous studies. A solution is to give out a PMP module (Figure5) in the decoder that divides each input into four parts so that features can be learned carefully before increasing the dimension. The mask and background are better and more accurately segmented through this step.Figure 5
The pyramid max-pooling module.Overall, the AASC model provides superior performance, which has already been demonstrated against Unet, Res-Unet, Mask-R CNN, DeeplabV3+.


## 3. Experiment

### 3.1. Database

In this study, three available datasets were used: ISIC 2016 [28], ISIC 2017 [29], and PH2 [30]. Some examples of original datasets are shown in Figure 6.Figure 6
Examples of dermoscopic images in ISIC 2016, 2017, PH2.The International Skin Imaging Collaboration (ISIC) includes expert-labeled digital images for melanoma and other cancer diagnostics. Every year, this organization launches skin lesion challenges in order to improve diagnosis. In 2016, 1279 images were public with corresponding masks by this organization for melanoma skin lesion segmentation. We split 1279 images into two sets: 900 images for training and 379 images for testing. The following year, ISIC 2017, contains 215 images, with 2000 and 150 images in training, and testing, respectively. The third dataset, PH2, consists of 40 images of melanoma and 160 images of common and atypical nevus. The total images were divided into two parts: 150 images for training and 50 images for testing.


### 3.2. Preprocessing Step

Lack of input dataset is one of the main factors affecting nuclei segmentation. Furthermore, the skin images were selected from various positions under different light conditions and equipment. Some skin areas are covered by arm and leg hair. It reduces segmentation performance. Thus, the preprocessing step is necessary to improve performance efficiency. Firstly, we resized the original images to the same size (256 × 256). And then, some augmentation techniques were suggested to increase the number of images.Image Resizing: In truth, the original images have different sizes, such as 767 × 575, 1022 × 767, 1504 × 1129, or 2048 × 1536 that require additional computational time and affect the efficiency as the accuracy was low. Therefore, the input images were resized to new sizes like 256 × 256.Gaussian Blur [31]: both objects and background are blurred before putting it into the next steps. This reduces the range of pixel values in the input images to simplify the computation and avoid distraction in training.Horizontal flip [32]: the horizontal flip considers the simple and quick step to increase the number of images through flipping images around a horizontal centerline. It solutes the biggest problem in almost biomedical mathematics as the limitation of the dataset.Vertical flip [32]: instead of flipping images around a horizontal line, the vertical flip turns around the vertical center flip. These techniques could create many images from one image under different views.Both flip [32]: both flip turns images around both horizontally and vertically at the same time.Random rotation [33]: based on setting the rotation, an image could be randomly rotated to create a new image with the same content but different shapes. Random rotation also is a simple way to make variety in the number of images.


### 3.3. Network Training

The AASC model was trained for melanoma skin segmentation with hyperparameters as described in Table1. We trained the model for 150 epochs. During training, data augmentation positively affected the performance of the model because of the increased number of samples. In addition, early stopping is configured to terminate the training model if the loss value does not decrease after 15 epochs. The loss and accuracy curves of the training and validation in ISIC 2016, ISIC 2017, and PH2 with the AASC method are shown in Figures 7–9.Table 1
Hyperparameters used in the training process.
ParametersValueInput256 × 256 × 3Weight decay0.0005Kernel-regularizer0.0006Batch size32Learning rate0.003OptimizerAdamEpoch150Figure 7
The loss and accuracy curves of training and validation in ISIC 2016.Figure 8
The loss and accuracy curves of training and validation in ISIC 2017.Figure 9
The loss and accuracy curves of training and validation in PH2.


### 3.4. Model Evaluation

In this paper, to assess the performance of the proposed model, we used six statistical metrics, namely precision, recall, accuracy, F1 score [34], Jaccard index (IoU), and the dice coefficient [35].Precision is the ratio of correctly segmented skin lesion pixels to the total number of pixels. The ratio of correctly segmented skin lesion pixels to the total number of skin lesion pixels is defined as recall.The F1 score (F1) is a test accuracy metric. It is derived from precision and recall. The ratio of the total number of correctly segmented pixels to the total number of skin lesions and background pixels is represented as accuracy.The dice coefficient (Dice) is the ratio between the ground truth and the prediction. These evaluation metrics are based on the parameters listed below.True positive (TP) refers to the number of skin lesion pixels that were correctly segmented as skin lesion pixels.False negative (FN) refers to healthy skin pixels that are predicted as skin lesion pixels by the model.False positive (FP) computes the statistics when the ground truth is skin lesion pixels, and the model predicts the healthy skin pixels.True negative (TN) is the number of correctly segmented healthy skin pixels.The mathematical definitions of these measures are as follows:(3)accuracyACC=TP+TNTP+FP+TN+FN,recall=TPTP+FN,precision=TPTP+FP,F1scoreF1=2∗recall+precisionrecall+precision,Jaccard Index=GT∩SRGT+SR,Dice CoefficientDice=2∗TP2∗TP+FN+FP.where GT and SR are two sets. Based on these six evaluated metrics, we compared the performance of the proposed method in training and testing three datasets as shown in Figures 10–12. We observed that the training and testing performances are dependent on all three datasets, indicating a robust generalized model without overfitting.Figure 10
The performances of the proposed model were evaluated by the six metrics in both training and testing in ISIC 2016.Figure 11
The performances of the proposed model were evaluated by the six metrics in both training and testing in ISIC 2017.Figure 12
The performances of the proposed model were evaluated by the six metrics in both training and testing in PH2.


#### 3.4.1. Comparative Experiment in the ISIC 2016 Dataset

We compared our results to the state-of-the-art methods to show the feasibility and high reliability of our proposed model in three datasets. During the comparison, five measures were used: Jaccard Index, Accuracy, Recall, Precision, and F1. The five indicators in our suggested network were a strong sign that the AASC was effective for skin lesions. As a result, our performance consistently ranks first in all comparisons.Clearly, Table2 highlights the quantitative findings of the AASC and the existing approaches like Unet [36], Unet attention [37], Unet++ [38], and Recurrent-Unet [39] in the ISIC 2016 database. Overall, the Jaccard index achieved 89%. The accuracy rate reached as high as 96%. Continually, precision achieved 92%. F1 also arrived at 92%. Finally, 90% is the result evaluated by Recall. All evaluations demonstrated the effectiveness of AASC in the ISIC 2016. The visualization of melanoma skin segmentation using the AASC model in this dataset is shown in Figure 13.Table 2
Performance evaluation of the state-of-the-art segmentation methods in the ISIC 2016 dataset.
Model nameJaccard indexAccuracyRecallPrecisionF1Unet [36]0.760.940.900.890.89Attention Unet [37]0.810.940.900.890.89Unet++ [38]0.810.940.900.900.90Recurrent U-Net [39]0.790.940.890.880.87Proposed model0.890.960.900.920.91Figure 13
The visual segmentation of the AASC model in the ISIC 2016. From left to right is the visualization of the original images, true mask, and predicted mask.


#### 3.4.2. Comparative Experiment in the ISIC 2017 Dataset

The AASC model was subsequently used to benchmark the ISIC 2017 to demonstrate the efficacy of our approach. The quantitative results of our model and the state-of-the-art models are shown in Table3. The suggested network achieved satisfactory results under the five statistical metrics. Figure 14 shows the ISIC 2017 segmentation results.Table 3
Performance evaluation of the state-of-the-art segmentation methods in the ISIC 2017 dataset.
Model nameJaccard indexAccuracyRecallPrecisionF1Unet [36]0.680.910.760.890.78Attention Unet [37]0.690.910.760.890.78Unet++ [38]0.680.910.750.900.77Recurrent U-Net [39]0.640.910.820.780.75Proposed model0.920.950.910.950.90Figure 14
The result segmentation of the AASC model in the ISIC 2017. From left to right is the visualization of the original images, true mask, and predicted mask.


#### 3.4.3. Comparative Experiment in the PH2 Dataset

Furthermore, the PH2 database is a well-known database for melanoma skin lesions. Because the PH2 dataset has only 200 images, a recent study used the ISIC 2017 dataset for the model training to enhance the segmentation capability of their model before performing skin lesion segmentation in the PH2. We proposed training and testing in the PH2 dataset and compared their results in this work. Our proposed approach was performed, as illustrated in Table4. The results are given in Figure 15.Table 4
Performance evaluation of the state-of-the-art segmentation methods in the PH2 dataset.
Model nameJaccard indexAccuracyRecallPrecisionF1Unet [36]0.790.910.890.890.87Attention Unet [37]0.800.920.900.890.88Unet++ [38]0.790.910.880.900.87Recurrent U-Net [39]0.800.920.930.870.88Mask-RCNN [25]0.840.940.93——DeepLab V3+ [26]0.810.920.94——Proposed model0.950.960.950.930.94Figure 15
The result segmentation of the AASC model in the PH2. From left to right is a visualization of the original images, true mask, and predicted mask.


## 3.1. Database

In this study, three available datasets were used: ISIC 2016 [28], ISIC 2017 [29], and PH2 [30]. Some examples of original datasets are shown in Figure 6.Figure 6
Examples of dermoscopic images in ISIC 2016, 2017, PH2.The International Skin Imaging Collaboration (ISIC) includes expert-labeled digital images for melanoma and other cancer diagnostics. Every year, this organization launches skin lesion challenges in order to improve diagnosis. In 2016, 1279 images were public with corresponding masks by this organization for melanoma skin lesion segmentation. We split 1279 images into two sets: 900 images for training and 379 images for testing. The following year, ISIC 2017, contains 215 images, with 2000 and 150 images in training, and testing, respectively. The third dataset, PH2, consists of 40 images of melanoma and 160 images of common and atypical nevus. The total images were divided into two parts: 150 images for training and 50 images for testing.


## 3.2. Preprocessing Step

Lack of input dataset is one of the main factors affecting nuclei segmentation. Furthermore, the skin images were selected from various positions under different light conditions and equipment. Some skin areas are covered by arm and leg hair. It reduces segmentation performance. Thus, the preprocessing step is necessary to improve performance efficiency. Firstly, we resized the original images to the same size (256 × 256). And then, some augmentation techniques were suggested to increase the number of images.Image Resizing: In truth, the original images have different sizes, such as 767 × 575, 1022 × 767, 1504 × 1129, or 2048 × 1536 that require additional computational time and affect the efficiency as the accuracy was low. Therefore, the input images were resized to new sizes like 256 × 256.Gaussian Blur [31]: both objects and background are blurred before putting it into the next steps. This reduces the range of pixel values in the input images to simplify the computation and avoid distraction in training.Horizontal flip [32]: the horizontal flip considers the simple and quick step to increase the number of images through flipping images around a horizontal centerline. It solutes the biggest problem in almost biomedical mathematics as the limitation of the dataset.Vertical flip [32]: instead of flipping images around a horizontal line, the vertical flip turns around the vertical center flip. These techniques could create many images from one image under different views.Both flip [32]: both flip turns images around both horizontally and vertically at the same time.Random rotation [33]: based on setting the rotation, an image could be randomly rotated to create a new image with the same content but different shapes. Random rotation also is a simple way to make variety in the number of images.


## 3.3. Network Training

The AASC model was trained for melanoma skin segmentation with hyperparameters as described in Table1. We trained the model for 150 epochs. During training, data augmentation positively affected the performance of the model because of the increased number of samples. In addition, early stopping is configured to terminate the training model if the loss value does not decrease after 15 epochs. The loss and accuracy curves of the training and validation in ISIC 2016, ISIC 2017, and PH2 with the AASC method are shown in Figures 7–9.Table 1
Hyperparameters used in the training process.
ParametersValueInput256 × 256 × 3Weight decay0.0005Kernel-regularizer0.0006Batch size32Learning rate0.003OptimizerAdamEpoch150Figure 7
The loss and accuracy curves of training and validation in ISIC 2016.Figure 8
The loss and accuracy curves of training and validation in ISIC 2017.Figure 9
The loss and accuracy curves of training and validation in PH2.


## 3.4. Model Evaluation

In this paper, to assess the performance of the proposed model, we used six statistical metrics, namely precision, recall, accuracy, F1 score [34], Jaccard index (IoU), and the dice coefficient [35].Precision is the ratio of correctly segmented skin lesion pixels to the total number of pixels. The ratio of correctly segmented skin lesion pixels to the total number of skin lesion pixels is defined as recall.The F1 score (F1) is a test accuracy metric. It is derived from precision and recall. The ratio of the total number of correctly segmented pixels to the total number of skin lesions and background pixels is represented as accuracy.The dice coefficient (Dice) is the ratio between the ground truth and the prediction. These evaluation metrics are based on the parameters listed below.True positive (TP) refers to the number of skin lesion pixels that were correctly segmented as skin lesion pixels.False negative (FN) refers to healthy skin pixels that are predicted as skin lesion pixels by the model.False positive (FP) computes the statistics when the ground truth is skin lesion pixels, and the model predicts the healthy skin pixels.True negative (TN) is the number of correctly segmented healthy skin pixels.The mathematical definitions of these measures are as follows:(3)accuracyACC=TP+TNTP+FP+TN+FN,recall=TPTP+FN,precision=TPTP+FP,F1scoreF1=2∗recall+precisionrecall+precision,Jaccard Index=GT∩SRGT+SR,Dice CoefficientDice=2∗TP2∗TP+FN+FP.where GT and SR are two sets. Based on these six evaluated metrics, we compared the performance of the proposed method in training and testing three datasets as shown in Figures 10–12. We observed that the training and testing performances are dependent on all three datasets, indicating a robust generalized model without overfitting.Figure 10
The performances of the proposed model were evaluated by the six metrics in both training and testing in ISIC 2016.Figure 11
The performances of the proposed model were evaluated by the six metrics in both training and testing in ISIC 2017.Figure 12
The performances of the proposed model were evaluated by the six metrics in both training and testing in PH2.


### 3.4.1. Comparative Experiment in the ISIC 2016 Dataset

We compared our results to the state-of-the-art methods to show the feasibility and high reliability of our proposed model in three datasets. During the comparison, five measures were used: Jaccard Index, Accuracy, Recall, Precision, and F1. The five indicators in our suggested network were a strong sign that the AASC was effective for skin lesions. As a result, our performance consistently ranks first in all comparisons.Clearly, Table2 highlights the quantitative findings of the AASC and the existing approaches like Unet [36], Unet attention [37], Unet++ [38], and Recurrent-Unet [39] in the ISIC 2016 database. Overall, the Jaccard index achieved 89%. The accuracy rate reached as high as 96%. Continually, precision achieved 92%. F1 also arrived at 92%. Finally, 90% is the result evaluated by Recall. All evaluations demonstrated the effectiveness of AASC in the ISIC 2016. The visualization of melanoma skin segmentation using the AASC model in this dataset is shown in Figure 13.Table 2
Performance evaluation of the state-of-the-art segmentation methods in the ISIC 2016 dataset.
Model nameJaccard indexAccuracyRecallPrecisionF1Unet [36]0.760.940.900.890.89Attention Unet [37]0.810.940.900.890.89Unet++ [38]0.810.940.900.900.90Recurrent U-Net [39]0.790.940.890.880.87Proposed model0.890.960.900.920.91Figure 13
The visual segmentation of the AASC model in the ISIC 2016. From left to right is the visualization of the original images, true mask, and predicted mask.


### 3.4.2. Comparative Experiment in the ISIC 2017 Dataset

The AASC model was subsequently used to benchmark the ISIC 2017 to demonstrate the efficacy of our approach. The quantitative results of our model and the state-of-the-art models are shown in Table3. The suggested network achieved satisfactory results under the five statistical metrics. Figure 14 shows the ISIC 2017 segmentation results.Table 3
Performance evaluation of the state-of-the-art segmentation methods in the ISIC 2017 dataset.
Model nameJaccard indexAccuracyRecallPrecisionF1Unet [36]0.680.910.760.890.78Attention Unet [37]0.690.910.760.890.78Unet++ [38]0.680.910.750.900.77Recurrent U-Net [39]0.640.910.820.780.75Proposed model0.920.950.910.950.90Figure 14
The result segmentation of the AASC model in the ISIC 2017. From left to right is the visualization of the original images, true mask, and predicted mask.


### 3.4.3. Comparative Experiment in the PH2 Dataset

Furthermore, the PH2 database is a well-known database for melanoma skin lesions. Because the PH2 dataset has only 200 images, a recent study used the ISIC 2017 dataset for the model training to enhance the segmentation capability of their model before performing skin lesion segmentation in the PH2. We proposed training and testing in the PH2 dataset and compared their results in this work. Our proposed approach was performed, as illustrated in Table4. The results are given in Figure 15.Table 4
Performance evaluation of the state-of-the-art segmentation methods in the PH2 dataset.
Model nameJaccard indexAccuracyRecallPrecisionF1Unet [36]0.790.910.890.890.87Attention Unet [37]0.800.920.900.890.88Unet++ [38]0.790.910.880.900.87Recurrent U-Net [39]0.800.920.930.870.88Mask-RCNN [25]0.840.940.93——DeepLab V3+ [26]0.810.920.94——Proposed model0.950.960.950.930.94Figure 15
The result segmentation of the AASC model in the PH2. From left to right is a visualization of the original images, true mask, and predicted mask.


## 3.4.1. Comparative Experiment in the ISIC 2016 Dataset

We compared our results to the state-of-the-art methods to show the feasibility and high reliability of our proposed model in three datasets. During the comparison, five measures were used: Jaccard Index, Accuracy, Recall, Precision, and F1. The five indicators in our suggested network were a strong sign that the AASC was effective for skin lesions. As a result, our performance consistently ranks first in all comparisons.Clearly, Table2 highlights the quantitative findings of the AASC and the existing approaches like Unet [36], Unet attention [37], Unet++ [38], and Recurrent-Unet [39] in the ISIC 2016 database. Overall, the Jaccard index achieved 89%. The accuracy rate reached as high as 96%. Continually, precision achieved 92%. F1 also arrived at 92%. Finally, 90% is the result evaluated by Recall. All evaluations demonstrated the effectiveness of AASC in the ISIC 2016. The visualization of melanoma skin segmentation using the AASC model in this dataset is shown in Figure 13.Table 2
Performance evaluation of the state-of-the-art segmentation methods in the ISIC 2016 dataset.
Model nameJaccard indexAccuracyRecallPrecisionF1Unet [36]0.760.940.900.890.89Attention Unet [37]0.810.940.900.890.89Unet++ [38]0.810.940.900.900.90Recurrent U-Net [39]0.790.940.890.880.87Proposed model0.890.960.900.920.91Figure 13
The visual segmentation of the AASC model in the ISIC 2016. From left to right is the visualization of the original images, true mask, and predicted mask.


## 3.4.2. Comparative Experiment in the ISIC 2017 Dataset

The AASC model was subsequently used to benchmark the ISIC 2017 to demonstrate the efficacy of our approach. The quantitative results of our model and the state-of-the-art models are shown in Table3. The suggested network achieved satisfactory results under the five statistical metrics. Figure 14 shows the ISIC 2017 segmentation results.Table 3
Performance evaluation of the state-of-the-art segmentation methods in the ISIC 2017 dataset.
Model nameJaccard indexAccuracyRecallPrecisionF1Unet [36]0.680.910.760.890.78Attention Unet [37]0.690.910.760.890.78Unet++ [38]0.680.910.750.900.77Recurrent U-Net [39]0.640.910.820.780.75Proposed model0.920.950.910.950.90Figure 14
The result segmentation of the AASC model in the ISIC 2017. From left to right is the visualization of the original images, true mask, and predicted mask.


## 3.4.3. Comparative Experiment in the PH2 Dataset

Furthermore, the PH2 database is a well-known database for melanoma skin lesions. Because the PH2 dataset has only 200 images, a recent study used the ISIC 2017 dataset for the model training to enhance the segmentation capability of their model before performing skin lesion segmentation in the PH2. We proposed training and testing in the PH2 dataset and compared their results in this work. Our proposed approach was performed, as illustrated in Table4. The results are given in Figure 15.Table 4
Performance evaluation of the state-of-the-art segmentation methods in the PH2 dataset.
Model nameJaccard indexAccuracyRecallPrecisionF1Unet [36]0.790.910.890.890.87Attention Unet [37]0.800.920.900.890.88Unet++ [38]0.790.910.880.900.87Recurrent U-Net [39]0.800.920.930.870.88Mask-RCNN [25]0.840.940.93——DeepLab V3+ [26]0.810.920.94——Proposed model0.950.960.950.930.94Figure 15
The result segmentation of the AASC model in the PH2. From left to right is a visualization of the original images, true mask, and predicted mask.


## 4. Conclusion

Skin lesion segmentation is critical in the evolution of a computer-aided skin cancer diagnosis system. The AASC model was successfully developed in this paper, which focuses on the impressive features and then zooms in and out to evaluate these features under different views, ensuring that both low and high levels of information for skin segmentation in dermoscopic images can be learned thoroughly. Moreover, the preprocessing step enhanced the model performance, reduced shift-invariance loss, and removed overfitting. This study demonstrated strongly that the lightweight model (AASC model) could perform well without the dataset. The AASC algorithm has been tested in three databases, namely the ISIC 2016, ISIC 2017 challenge, and PH2 dataset. Jaccard index, Recall, Precision, F1 score, and Dice coefficient are famous statistical evaluation metrics used to evaluate and compare the efficiency of the AASC model and the other state-of-the-art models. The experimental result shows that the AASC model achieves the highest accuracy in melanoma skin lesion segmentation compared to the existing methods in the literature. The empirical result also demonstrates transparently that the presence of noises from input images such as shape distortion, thick hair, or low contrast was successfully removed by the proposed method. Future work will apply the AASC model to other applications, for example, melanoma classification in dermoscopic images. In addition, we try to promote the applicability of the model through its use in a variety of data.



---

*Source: 1278515-2022-02-24.xml*