# Fuzzy Logic with Deep Learning for Detection of Skin Cancer
## 4 Results and Discussion
### Analysis of Results  
This section focuses on evaluating the performance of the proposed algorithm in the research paper. The system configuration used for all operations and computations consists of a Core-i7 processor, 16 GB RAM, and the Ubuntu 18.10 operating system. Python and OpenCV framework are employed for image processing, forming the basis of the entire system development. The performance analysis of the algorithm is based on four key parameters: Competency of Lesion Location Detection, Segmentation Performance, Accutateness of Feature Extraction, and Computational Time. Three publicly available datasets, namely PH2, ISIC 2017, and ISIC 2018, are utilized in the detection and segmentation processes. To determine the effectiveness of lesion location detection, three parameters are considered: sensitivity, specificity, and intersection over union (IoU). The PH2 dataset achieves a sensitivity score of 95%, specificity score of 96.25%, and IoU value of 94%. The ISIC 2017 and ISIC 2018 datasets exhibit notably high sensitivity and specificity scores. Table 2 provides an analysis of detection using YOLO v3. A high IoU score indicates accurate lesion location detection, while elevated sensitivity and specificity scores signify precise identification of melanoma and non-melanoma lesions, respectively. After pre-processing the dermoscopic images, the segmentation process is applied to each dataset. The performance of segmentation is assessed using the metrics, namely accuracy, specificity, sensitivity, Jaccard score, and Dice index score. It is important to note that our approach involves two phases for segmentation. In the first phase, the primary objective is to select a significant area of the lesion mask to ensure that no features of melanoma are lost during this process. Subsequently, in the second phase, a fuzzy-based probabilistic thresholding method is employed to generate a more precise and accurate segmented mask, resulting in improved segmentation outcomes. Table 3 provides an overview of the results obtained from the first phase of our proposed segmentation method, while Table 4 showcases the outcomes of the second sub-stage. Figure 10 visually illustrates the steps involved in our approach. The evaluation metric scores generally indicate higher performance in the second phase, as the LR-based fuzzy logic allows for more precise and effective segmentation of the lesion. The average accuracy score after the first sub-stage of segmentation is around 95%, which significantly increases to an average of approximately 96% after the second sub-stage. This notable improvement clearly demonstrates the significance of employing L-R fuzzy logic and fuzzy thresholding in the segmentation process. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dataset** & **Se (\%)** & **IoU (\%)** & **Sp (\%)** \\ \hline ISIC 2018 & 95.51 & 90 & 95.54 \\ ISIC 2017 & 95.43 & 91 & 95.78 \\ PH2 & 95 & 94 & 96.25 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The performance evaluation of lesion detection using the YOLO algorithm. The proposed algorithm has achieved outstanding results compared to existing models through proper dataset collection, preprocessing steps, and iterative segmentation methods. In a comparison with similar datasets, our algorithm consistently demonstrates superior performance. A detailed analysis of the projected algorithm based on metrics such as Accuracy (Acc), Sensitivity (Sen), Specificity (Spe), Jaccard score (Jac), and Dice index score (Dic) for PH2, ISIC 2017, and ISIC 2018 datasets is presented in Table 5, Table 6 and Table 7, respectively. The highest and second highest scores are highlighted as **bold** and **underlined** text so that the tables are more readable. Our proposed method achieves the highest sensitivity and specificity score when compared to recent published works. The segmentation results for PH2, ISIC 2017, and ISIC 2018 datasets exhibit better accuracy values than existing approaches.