A novel SpaSA based hyper-parameter optimized FCEDN with adaptive CNN classification for skin cancer detection – Scientific Reports

Cancer morbidity and medical costs are exacerbated by the presence of malignant lesions. As a result, researchers have concentrated their efforts on developing algorithms that are very accurate and adaptable when identifying early indications of skin cancer. Early identification is crucial because malignant melanocyte cells spread, infiltrate, and multiply quickly31. Specialists routinely employ dermoscopy and epiluminescence microscopy (ELM) to determine whether a benign or malignant skin lesion.

In dermatology, a magnifying lens and light are used to observe medical patterns, including colors, veils, pigmented nets, globs, and ramifications more clearly32,33. People with visual impairments may notice morphological features that are normally concealed. These include the ABCD (Asymmetrical form, Border anomaly, Color discrepancy, Diameter, and Evolution)34, 7-point checklist35, and pattern analysis30. Non-professional dermoscopic images may predict melanoma with a 75–80% accuracy, although interpretation requires time and is highly individualised based on the dermatologist’s level of expertise36. Computer-aided diagnosis (CAD) methods have made it simpler to get beyond these obstacles33,36. Artificial Intelligence (AI) that is based on Deep Learning (DL) has significantly improved the ability to diagnose cancers37,38. Since dermatologists and laboratories are few in rural regions, automating the classification of skin lesions might aid in early diagnosis and screening for skin cancer39,40.

By using the Adam optimizer and learning speed strategies like validation tolerance—which slows down learning when it gets stuck for an extended amount of time—this dataset is utilized to pre-train the suggested framework. During the learning phase, the Adam optimizer receives the ensuing hyperparameters. The batch size increased to 64, which is double the previous figure of 2. It is the year 50. Ten is the patience factor. In this scenario, the momentum is 0.9. “Batching” is a mode of contagious transmission that completes our anti-infection defenses. To learn the suggested DL system, an 80% random image set is utilized. The correct weight combinations are saved for subsequent use in a validation set, which is made up of 10% of the training data after training. For every iteration, an adjustable learning rate is applied. The three models have dropout rates of 0.1, 0.15, and 0.2, respectively.

By splitting training and testing on the proposed system’s dataset from 90 to 10, some evaluation findings are provided. In order to cut down on the amount of time needed to finish the project, and made this divide. Fifty generations of models were trained with batch sizes ranging from 2 to 64 and learning rates ranging from 1 (times) 104, 1 (times) 105, and 1 (times) 106, using 10% of the proposed adaptive CNN training set as the validation set. By freezing varying numbers of layers, the suggested adaptive CNN is further improved to achieve usable accuracy potentially. After that, a softmax layer at the conclusion of the model divides the input training images into seven groups. 224 × 224 pixels are the new size for RGB input images. The adaptive CNN model’s training phase uses subsamples from the dataset. For every subsampled data point, compute the error. If the error exceeds the threshold, remove the point and continue the training. Furthermore, all three models’ attributes are prioritized from highest to lowest. Features with zero variance are eliminated and forwarded to the subsequent layer.

Dataset

Table 1 displays the distribution of skin cancer grades for dermoscopic images in different lesion datasets. It represents a collection of 1600, 1000, and 1600 images from ISIC-2019, PH-2, and ISIC-2017 for teaching and modelling. Based on these datasets, segmented the KNN-based skin cancer classification model, performed a comparison analysis using the FCEDN-SpaSA concept to confirm the effectiveness of the suggested model, and carried out the following sections by simulation findings for parameters like precision, sensitivity, FNR, prediction time, and others.

Table 1 Description of the data set for the intelligent classification model and automated skin lesion.

Performance metrics

Six criteria, precision, specificity, precision, F1-score, sensitivity, and Matthew’s correlation coefficient, were used to assess performance analysis (MCC). This measuring formula’s mathematical model is:

$$Specifity=frac{TN}{TN+FP}times 100,$$

(3)

$$Accuracy=frac{TP+TN}{TP+TN+FN}times 100,$$

(4)

$$Precision=frac{TN}{TN+FP}times 100,$$

(5)

$$Sensitivity=frac{TN}{TN+FP}times 100,$$

(6)

$$F1,score=2times frac{Precisiontimes Sensitivity}{Precision+Sensitivity}times 100,$$

(7)

$$MCC=frac{TPtimes TN-TPtimes FN}{sqrt{left(TP+FPright)times left(TP+FNright)times left(TN+FPright)times left(TN+FNright)}}times 100.$$

(8)

Here, TP and TN represent the number of pixels of correctly categorised backdrops and objects. FN and FP numbers correspond to the number of pixels assigned to background-designated items and objects, respectively.

Preprocessing

Dermoscopic images of skin lesions are preprocessed in two steps, the first being the most crucial. The depilatory notion is based on morphological adjustments that make choosing the right ROL easier. After the hair removal procedure, another pre-processing stage that benefits from intensity-based image enhancement. Improving the hairless image after preprocessing makes it easier to segment dermoscopic images using ROL accurately. The outcomes of the preprocessing procedure are displayed in Fig. 5.

Figure 5
figure 5

Original image (a) and preprocessed image (b) are the outcomes of preprocessing.

Segmentation

Here, the visually segmented image is shown together with the lesion segmentation number findings and compared with the state-of-the-art in terms of accuracy values. The results of the suggested lesion segmentation for a few datasets are shown in Table 2. The accuracy average of each image picked in a split was used to compute the results displayed in this table. The produced image is compared with the provided real image following segmentation using the newly built Adaptive CNN model. Every image that is added to the database is processed in the same way. The average accuracy, FNR, and overall running time for each dataset were then determined. The suggested segmentation approach in ELM yields an average accuracy of 95.28%, as shown in Table 2. The lesion segmentation inspection time was 51.3652 s, and the error rate was 4.69% (s). An accuracy of 95.89% and an error rate of 4.32% are again obtained using KELM. This dataset’s known test time is 59.5160 (s). Another challenging split, MSVM, attained an accuracy of 92.70%. The execution time is 67.4202 (s), and the error rate is 7.45%. Finally, presented the proposed FCEDN-functionality. SpaSA’s with a 1.5% error rate 98.78% accuracy were attained. The execution took 29.3456 s. As a consequence, it is apparent that the execution time grows longer as the dataset size rises. For instance, FCEDN-SpaSA required just 29.3456 (s) for 100 images. Figure 6 shows the identification of different types of skin cancer and their accuracies. The MATLAB R2018a was used for the skin cancer prediction.

Table 2 Accuracy of the proposed lesion segmentation method by employing the contrast enhancement approach.
Figure 6
figure 6

Proposed lesion location, with findings identified.

In the segmentation result, the proposed method of accuracy classification accuracy was the greatest at 98.42% using simulations with the PH-2 data set. From Table 3, the proposed FCEDN-SpaSA segmentation of JAC and DIC have accuracy rates of 90.14% and 94.76%, respectively.

Table 3 Results of proposed FCEDN-SpaSA segmentation metrics (%) on the PH2 dataset.

In the segmentation result, the proposed accuracy method was the greatest at 97.65% using simulations with the ISIB2017 data set. From Table 4, the proposed FCEDN-SpaSA segmentation of JAC and DIC have accuracy rates of 92.56% and 95.43%, respectively.

Table 4 Results of Proposed FCEDN-SpaSA segmentation metrics (%) on the ISIB2017 dataset.

In the segmentation result, the proposed method of average classification accuracy was the greatest at 97.65% using simulations with the ISIB2017 data set. From Table 5, the proposed FCEDN-SpaSA segmentation of JAC and DIC have accuracy rates of 91.75% and 94.32%, respectively.

Table 5 Results of Proposed FCEDN-SpaSA segmentation metrics (%) on the ISIC 2019 dataset.

Classification

As a result of our calculations utilizing the suggested framework, the numbers are displayed in Table 6. The proposed framework employed the Adaptive CNN classifier. For comparison, used the Naive Bayes, ELM, MSVM, and KELM classifiers. The table shows that Adaptive CNN achieved 91.67% accuracy and 9.43% FNR in a record-breaking amount of time, 133.4632 (s). With a FNR of 14.34%, a time of 121.5230, and the second-highest accuracy of 85.45%, MSVM comes in second (s). Although MSVM performs better than Adaptive CNN during the test, the difference between the two is considerable. Accuracy values for Naive Bayes, ELM, and KELM are 82.34%, 83.23%, and 82.45%, respectively.

Table 6 Performance analysis of classification.

A detailed comparison of the state-of-the-art methods employing the PH2, ISBI-2017, and ISIC 2019 data sets can be found in Tables 7, 8 and 9. Using the suggested method, the classification accuracy of all datasets is maximized. Using color and texture features, the maximum classification accuracy on the PH2 dataset was 93.45% in the ResNet50; however, with the proposed adaptive CNN method, it was demonstrated to be 98.42%. The accuracy of the proposed work of the ISIB 2017 dataset is 97.65%, and the ISIB 2019 dataset is 98.09%. This demonstrates that the suggested adaptive CNN classifier model produces far superior results than the conventional algorithm, and the outcomes indicate that the adaptive CNN classifier classification technique is more reliable and effective.

Table 7 State of the art comparison of the Adaptive CNN classifiers on PH2 dataset.
Table 8 State of the art comparison of the Adaptive CNN classifiers on the ISIB 2017 dataset.
Table 9 State of the art comparison of the Adaptive CNN classifiers on the ISIB 2019 dataset.

A comparison of efficacy to different strategies is made. According to Table 4, our method performs better than other methods regarding efficiency and effectiveness. Overall, the suggested inception model outperforms the existing approaches with an accuracy rate of almost 98 percent. It may thus be expanded to include the potential assessment of additional medical images (Table 10).

Table 10 Comparison with other deep learning techniques to detect skin cancer.