# Fuzzy Logic with Deep Learning for Detection of Skin Cancer
## 3 Proposed Method
### Classification
#### 3.3.1 YOLO
Extensive analysis has led to the realization that class and object confidence estimations should be derived from logistic regression, a crucial innovation introduced in YOLO v3 that was absent in earlier versions. Furthermore, the practice of selecting the group of Melanoma (classes) with the highest-class scores, a key step in previous versions, has been replaced with multilabel classifications in YOLO v3. Notably, the latest version, YOLO v3, achieves exceptional speed and performance, setting a benchmark with a COCO mAP 50 score that surpasses previous versions [33]. In YOLO, the input image is divided into a grid of cells. Each cell is responsible for predicting bounding boxes and class probabilities for objects within its boundaries. Prior to training, anchor boxes are defined to capture the various aspect ratios and sizes of objects. The anchor boxes are assigned to cells based on their overlap with ground-truth objects during training. For each grid cell, YOLO predicts multiple bounding boxes along with their associated class probabilities. Each bounding box consists of coordinates (x, y, width, height) relative to the grid cell. The class probabilities represent the likelihood of the object belonging to different predefined classes (e.g., melanoma, non-melanoma). YOLO typically uses a deep convolutional neural network (CNN) as its backbone architecture, such as Darknet or Darknet-53. The CNN processes the input image and extracts a feature map that is shared across all of the grid cells. YOLO uses a combination of localization loss and classification loss to train the network. The localization loss measures the accuracy of bounding box predictions, while the classification loss measures the accuracy of class probabilities. The loss function is designed to penalize errors in both bounding box coordinates and class predictions. After prediction, YOLO applies non-maximum suppression (NMS) to eliminate duplicate and overlapping bounding box detections. It selects the most confident bounding boxes based on their class probabilities and removes redundant detections that have significant overlap. To apply YOLO for melanoma lesion detection, the algorithm needs to be trained on a dataset of melanoma and non-melanoma skin lesion images. The training process involves annotating the images with bounding box coordinates and corresponding class labels. The algorithm learns to detect and classify melanoma lesions based on the provided training data. During inference, the trained YOLO model takes an input image, passes it through the CNN backbone to obtain a feature map, and then applies the prediction process described above. It outputs bounding boxes and class probabilities for potential melanoma lesions in the image. NMS is subsequently applied to remove duplicate detections and retain the most confident and non-overlapping predictions. YOLO is known for its speed and efficiency, as it avoids the need for exhaustive sliding window searches. The grid-based approach of YOLO allows for parallel processing and significantly reduces the computational complexity compared to sliding window approaches. This allows YOLO to capture global context and dependencies among objects, contributing to accurate predictions. YOLO is highly efficient and fast compared to CNN-based models. YOLO considers the entire image while making predictions for each grid cell. This global context enables YOLO to capture dependencies and relationships between objects and their surroundings. In the context of melanoma classification, global context can provide valuable information about the lesion's spatial relationship with other skin regions, aiding in accurate classification. Since YOLO optimizes both the localization and classification losses simultaneously, it requires fewer iterations to converge. This can be advantageous when working with limited training data or resource constraints. We have modified the YOLO architecture by increasing the depth of the YOLO architecture by adding more convolutional layers and residual connections.