# A Reinforcement Learning Algorithm for Automated Detection of Skin Lesions
## 4 Results and Discussion
### Experimental Setup
#### 4.1.3 Evaluation and Comparison on the ISIC 2017 Dataset, HAM10000, and the PH2 Dataset  
The trained neural networks for the CADx diagnosis of the pigmented skin lesions are challenging due to the lack and diversity of dermatoscopic image datasets. The HAM10000 dataset (Human against Machine with 10,000 training images) [68] is available to solve this problem. In this dataset, different modalities are used to collect and retain dermatoscopic images from various populations. The generated dataset contains 10015 dermatoscopic images that are utilized for training machine-learning algorithms. The cases in this dataset include all of the essential diagnostic categories as a representative collection in the pigmented lesions realms, such as intraepithelial carcinoma/actinic keratosis, Bowen's disease (akic), benign keratosis-like lesions, basal cell carcinoma (bcc) (seborrheic keratosis, lichen planus-like keratosis, and solar lentigines), and dermatofibroma are some of the conditions (df). The segmentation masks are evaluated on this dataset, and, as can be seen in Figure 7, the masks are very precise and clear. Figure 8a represents the initial input image with Figure 8b,c showing the segmentation of other methods that use a variety of loss functions. It shows the influence of the loss function TL and GN on the input images. In these, attention gates (AG) and group normalization (GN) analyze the input images and help in the prediction of the boundaries of skin lesions. Figure 8d shows the lesion ROI computed by our RL algorithm. The results infer that the lesions are segmented in an accurate and precise manner. Our method reuses the CNN feature map and shortens the training and testing times, which helps us to train our networks from start to finish efficiently. Our algorithm enables the identification of high-dimensional hierarchical images. The detection approach is robust to changes in conditions, such as illumination and color balance. Our algorithm outperforms the alternative methods, as seen in Figure 9. Figure 9a shows the visual comparison evaluated on the ISIC 2017 image dataset (with a black background). Figure 9a shows the input images from the dataset. The provided binary mask (ground truth) is depicted in Figure 9b, whereas the method's prediction results (A.G. U-Net + GN) are depicted in Figure 9c. Our RL algorithm results can be seen in Figure 9d. As can be seen, our algorithm is capable of segmenting lesions with great _Acc._ However, the segmentation mask results show the exact shapes of the lesions in some instances, which differ somewhat from the ground truth. Since the ground truth images are annotated manually, such minor errors can happen. Figure 10 shows the visual projections that have been derived from the proposed ISIC 2018 image dataset (present without the black background). Figure 10a shows the original image; Figure 10b shows the given binary mark (ground truth); Figure 10c the prediction effects of the method (Att U-Net + GN); Figure 10d the results of our RL algorithm. As can be seen, our segmentation mask corners are sharp and clear. The masks are much similar to the ground truth images. Figure 7: Evaluation results on the HAM10000 dataset. As can be seen in the second and the fourth rows, the results are precise and clear. Figure 11a shows the original input image; Figure 11b the binary mask (ground truth); Figure 11c the segmentation results of simple U-Net; Figure 11d the segmentation results of the SE block on the specific U-Net; Figure 11e the segmentation results of the BCDU network (with 1 dense unit); Figure 11f segmentation results of the U-Net network (with all the 64 filters); Figure 11g Att-U-Net + GN + TL segmentation results. Finally, Figure 11h shows the results of our RL algorithm. As can be seen from the image, the results of the masks are precise. The background is reflected in the darker (blacker) area, while the foreground is the lighter (white) area. This method is quick, and it helps in calculating the running time easily.