## 3 Materials and Methods
### Databases and Image Pre-Processing
#### 3.1.2 DermIS Database
Our intent in utilizing these datasets is to harness the collective wisdom and dexterity embedded within the data to engineer robust and accurate algorithms for analyzing skin images. Both the ISIC 2020 and DermIS datasets have undergone rigorous curation procedures, validating the accuracy and authenticity of the data. The involvement of esteemed institutions and experts in dermatology in the compilation of these datasets bolsters their credibility. Both datasets showcase a diverse array of skin lesions spanning different types, severities, and anatomical locations. This diversity guarantees the precision of our analysis while concurrently ensuring its adaptability to a wide spectrum of skin conditions, thus enhancing the reliability of our conclusions. These datasets have gained substantial recognition as benchmarks within the dermatology community. By incorporating the ISIC 2020 and DermIS datasets, we ensure that our research is benchmarked against established studies, enabling meaningful assessments of the advancements we propose. Moreover, both datasets are openly accessible to the research community, certifying the reproducibility of our experiments and extending the opportunity for fellow researchers to authenticate our findings. This transparent approach bolsters the integrity of our study and cultivates an environment of collaboration. Fortunately, over time, numerous researchers have addressed the issue of skin lesion image pre-processing, providing effective solutions. In [46], the authors introduced the DullRazor application, which has gained popularity as a software dedicated to hair removal in skin lesion images. This software employs morphological closing operations followed by the replacement of extracted pixels through bilinear interpolation. The replaced pixels are then smoothed using a median filter. Other techniques encompass various morphological operations along with operators such as bottom-hat [47], Sobel [48], Tophat [49], Laplacian [50], Radon transform (E-shaver) [51], and multiscale skeleton-morphological operators (\"Virtual Shaver\" method) [52]. In this study, we applied the DullRazor algorithm to eliminate hair artifacts from the selected images sourced from the ISIC 2020 and DermIS databases. This software was chosen due to its superior performance in hair removal, as acknowledged in the current state of the art. The outcomes of employing the DullRazor algorithm on the chosen images are depicted in Figures 6 and 7. The results achieved are notably favorable, although it is worth mentioning that in the case of the ISIC 2020 database, for certain images, we found it necessary to apply the DullRazor algorithm twice. This decision stemmed from the initial outcomes not meeting our satisfaction. The approach involved initially applying the algorithm to the original image. Subsequently, the resulting image underwent the same algorithm again to yield improved outcomes. This two-step process was undertaken because images in the ISIC 2020 database tend to exhibit more noise, annotations, and even thicker hairs intersecting the lesion area. During the initial run, annotations were sometimes eliminated, whereas during the second run, hair removal was the focus. As demonstrated in Figure 6, due to the thickness of certain hairs, complete removal was not always achieved. In this research, we will utilize a dataset comprising 1200 images for the purposes of training, validation, and testing. However, this quantity might not provide an ample number of examples for the CNNs to learn effectively. These images have undergone comprehensive labeling, enabling us to possess precise knowledge about each image, including both the predicted and actual labels. Non-random data selection implies that the testing dataset has been intentionally designed to mirror real-world scenarios. This ensures  
Figure 6: Results obtained after applying the DullRazor algorithm to the DermIS skin lesion images database. Figure 7: Results obtained after applying the DullRazor algorithm to the ISIC 2020 skin lesion images database.