DermArtifactDB: a multi-label dataset for artifact annotation in public dermoscopic image repositories

Read full text
Authors: Vanesa Gómez-Martínez, David Chushig-Muzo, Isabel Polimón Olabarrieta, Cristina Soguero-Ruíz
Cited by: 0

Abstract

Dermoscopy is a widely adopted, non-invasive imaging technique that plays a crucial role in the early detection and clinical assessment of skin lesions (1). Its effectiveness, however, depends on the quality of the acquired images. In clinical practice, dermoscopic images often contain visual artifacts, such as hair, ruler markings, dark corners, bubbles, or ink traces, which are not part of the lesion itself. These artifacts can affect the visual appearance of the lesion, modifying color and texture patterns and complicating both clinical assessment and automated image analysis (2; 3; 4; 5). Consequently, artifacts are considered an important factor contributing to noise and bias in computer-aided diagnosis (CAD) systems, impacting model interpretability, robustness, and diagnostic performance (6; 7).Although interest in automated dermoscopic image analysis has increased, publicly available datasets specifically focused on artifact annotation remain limited. Public datasets, including International Skin Imaging Collaboration (ISIC)-2019 (8; 9), PH2 (10), and Derm7pt (11), contain images with visible acquisition artifacts, but they are primarily used to train models for skin lesion classification and do not include explicit labels for artifact presence or type. The lack of artifact annotations introduces several limitations. First, it limits the ability to study how artifacts affect model performance and interpretability.Second, it hinders the development of preprocessing methods to detect and mitigate artifacts. Third, although multiple artifacts often co-occur within the same image, existing datasets rarely capture this multi-artifact scenario, and most studies (4; 7; 12; 13) instead focus on individual artifacts.To date, only a limited number of studies have addressed the annotation of dermoscopic artifacts. Bissoto et al. (6) introduced manual artifact annotations for investigating dataset bias and spurious correlations, quantifying how artifacts act as confounding factors for lesion classification. They labeled small subsets of two dermoscopic datasets: 2,594 images from ISIC 2018 (out of more than 12,000 available images) and 872 images from the Dermoscopic Atlas (out of 1,746). While this work demonstrated the relevance of artifact-aware analysis, the annotation methodology is limited in scope, as it relies on fully manual labeling applied to small subsets of the available data. In addition, the absence of a defined and reproducible annotation procedure limits its scalability and reuse. More recently, Bissoto et al. (14) extended this line of research by training per-artifact classifiers on previously introduced manual annotations. These classifiers were then applied to infer artifact presence in larger datasets such as ISIC-2019. Although this strategy enabled large-scale analysis, the annotations correspond to classifier output scores (probabilistic predictions) rather than verified binary ground-truth labels derived from systematic expert annotation.Moreover, these predictions are reported only for a single dataset and lack expert validation, which may lead to discrepancies with the true artifact labels, especially for difficult-to-detect artifacts.To address these limitations, we introduce DermArtifactDB, a unified and standardized dataset that provides multi-label annotations for seven dermoscopic artifacts (hair, ruler markings, ink markings, patches, dark corners, gel borders, and gel bubbles). These annotations are provided for the complete image sets of three widely used public repositories (ISIC-2019, PH2, and Derm7pt), comprising 20,211 images in total (19,000 from ISIC-2019, 1,011 from Derm7pt and 200 from PH2). For each image, DermArtifactDB provides one image-level binary label per artifact category (presence/absence of each of the seven artifacts), amounting to 141,477 labels. These labels do not indicate where each artifact is located within the image, and no pixel-level segmentation masks or region annotations are provided. As the images come from these public datasets, our contribution lies not in the images themselves but in the standardized, expert-validated artifact metadata, together with the annotation pipeline and dataset-level statistics released with it. The annotations were generated using a robust data-driven pipeline that combines classical imageprocessing detectors, deep learning-based segmentation models, a transformer-based multi-label detector (C-Tran ( 15)), and expert manual review with clinical oversight. This multi-phase design was developed to ensure annotation consistency and reliability across all three datasets. DermArtifactDB enriches existing dermoscopic repositories with artifact-level metadata, enabling the study of artifact distribution, diversity, and co-occurrence, and supporting the development of more transparent, interpretable, and robust CAD systems.This section describes the data sources and the multi-phase annotation framework used to construct the proposed dermoscopic artifact dataset. The methodology follows the four-phase pipeline shown in Figure 1, encompassing data collection, classical automatic artifact detection, transformer-based artifact detection, and expert manual review.The annotation pipeline relies on two independent detection stages (Phases 2 and 3 in Figure 1), followed by expert review (Phase 4 in Figure 1). Phase 2 is an ensemble of artifact-specific detectors: six of them (dark corners, ruler markings, patches, gel border, gel bubbles, and ink markings) rely on classical imageprocessing techniques and are fully specified by the parameters reported in their respective subsections (see Sections 2.2.2-2.2.7) to ensure reproducibility. Two deep learning segmentation models are additionally used within this stage, namely an ensemble of segmentation networks for hair detection (see Section 2.2.1) and a Double U-Net that segments the skin lesion to reduce false positives in the patch detector (see Section 2.2.4). Phase 3 is an independent detector based on a C-Tran multi-label transformer (see Section 2.3) that jointly predicts the seven artifact categories. The architectures and training configurations of all learned models are detailed in full in the corresponding subsections below. The hair-segmentation code is publicly availablefoot_0 , the C-Tran detector builds on the publicly available reference implementation of The proposed artifact-annotated dataset integrates dermoscopic images from three public datasets: ISIC-2019, PH2, and Derm7pt. None of the three repositories provides labels for the presence or type of acquisition artifacts, precisely the gap addressed by DermArtifactDB.These datasets comprise thousands of images acquired from multiple clinical centers, dermatology departments, and imaging devices, providing a heterogeneous representation of real-world dermoscopic acquisition conditions. All datasets contain fully anonymized skin lesion images, and no patient-identifiable metadata was processed. This diversity supports the development of generalized artifact-aware algorithms.Seven artifact categories were selected based on their prevalence in dermoscopic imaging and their documented impact on both clinical interpretation and CAD systems (3). Each category corresponds to a distinct visual pattern often observed in dermoscopic images:• Hair: Filaments that partially occlude the lesion surface and introduce texture variations (2; 4).• Dark corners: Darkened peripheral regions caused by illumination fall-off from the circular dermatoscope lens. These underexposed areas typically appear near the image edges and may partially obscure lesion boundaries (17).• Gel border: Bright or translucent ring-shaped structures formed by the interaction between contact gel and the dermatoscope's illumination (2).• Gel bubbles: Circular specular bubbles trapped within the gel interface, characterized by high reflectance and sharp boundaries (2).• Ruler markings: Straight, high-contrast linear structures originating from measurement tools placed near the lesion (12).• Ink markings: Irregular colored traces (typically blue or black) introduced during clinical examination (7).• Patches: Colored adhesive markers placed on the skin near the lesion during image acquisition, varying in shape and color (6).Figure 2 shows representative examples of the seven dermoscopic artifact categories considered in this work, using images from the ISIC-2019 dataset. Each subfigure shows the typical visual appearance and variability within a given artifact class. In addition, subfigure (h) highlights the co-occurrence of multiple artifacts within the same image, reflecting the multi-label nature of real-world clinical acquisitions. The first phase of the annotation pipeline consists of artifact-specific detection modules. Six of them (dark corners, ruler markings, patches, gel border, gel bubbles, and ink markings) rely on classical imageprocessing techniques, while hair detection employs deep learning-based segmentation models due to the morphological complexity of this artifact, as described in Section 2.2.1. This step provides an initial estimate of artifact presence in each image. For each artifact, three complementary detectors are applied in parallel, all targeting the same artifact type while capturing different aspects of its visual appearance, such as color, geometry, or intensity. This design allows the method to handle the variability in how a given artifact appears across patients, imaging devices, and acquisition conditions. For each artifact category k, the outputs of the three detectors d(k) 1 , d(k) 2 , d (k)3 ∈ {0, 1} were aggregated using a majority-voting rule. An artifact was considered present when at least two of the three detectors provided a positive response; otherwise, it was considered absent. Accordingly, the output of this phase (Phase 2) is, for each image, a seven-dimensional binary vector indicating the presence or absence of each artifact category. The intermediate binary masks produced by the individual detectors are generated only as part of the detection process and are not part of the released annotations. The detectors for each artifact are defined as follows:Hair detection was addressed using an ensemble of three deep learning segmentation models (Attention U-Net ( 18), Dense U-Net (19), and Attention Dense U-Net (20)), selected to capture the high morphological variability of hair structures, following our previous hair-removal work (4). Each model k ∈ {1, 2, 3} produces a binary mask M (k) ∈ {0, 1} H×W , where H and W are the height and width of the image. Hair presence was quantified using the hair density ratio:R (k) hair = 1 HW H i=1 W j=1 M (k) ijAn image was labeled as containing hair ifR (k)hair > τ hair , where τ hair was empirically selected in the range [0.01, 0.05] and set to 0.03. Final predictions were obtained via majority voting across the three models. Dark corners correspond to underexposed regions located at the edges of dermoscopic images, typically caused by the dermoscopic lens geometry (17). Detection was performed using three complementary detectors in the HSV, YCrCb, and CIELAB color spaces.For each color space, the image was thresholded to obtain a binary mask highlighting low-luminance pixels near the image borders. The image was then divided into four quadrants: top-left, top-right, bottomleft, and bottom-right. For each quadrant, rows and columns along the image borders were analyzed. For every border row or column, we computed the proportion of pixels classified as dark:f border = number of dark pixels in row/column number of pixels in row/column A border region was considered dark if f border ≥ τ border . The threshold τ border was empirically selected by evaluating values in the range [0.005, 0.05], with the final value set to 0.01. This choice allowed detection of subtle vignetting effects while remaining robust to noise. The final label was obtained by majority voting across the three color-space detectors.Ruler markings were detected by identifying straight line segments using the probabilistic Hough transform (21). To account for variability in ruler appearance and image resolution, three complementary detectors were used with different parameter configurations, including accumulator thresholds in the range [50, 150] and minimum line lengths in [10,25] pixels. The final configurations were set to accumulator thresholds of 50, 100, and 150, and minimum line lengths of 10, 15, and 25 pixels for the three detectors, respectively. The probabilistic Hough transform represents each detected line as a finite segment defined by two endpoints, (x 1 , y 1 ) and (x 2 , y 2 ). This formulation is appropriate for dermoscopic images, where the straight edge of a ruler typically appears as multiple fragmented segments rather than as a single continuous line. Due to the rigid linear structure of a ruler, all fragments belonging to the same ruler are expected to share a common orientation. The orientation of each segment was therefore computed as follows:θ = arctan y 2 -y 1 x 2 -x 1The dominant direction θ * was estimated as the most common orientation among the detected segments, and only segments satisfying |θ -θ * | < τ tol were retained. The tolerance parameter was selected in the range [5 • , 15 • ], with τ tol = 10 • . A positive detection was assigned if at least one set of aligned segments was identified, and final labels were obtained via majority voting.Patches were detected using three color spaces (HSV, YCrCb, and CIELAB). These detectors were designed to capture the warm (yellow, orange, red) and cool (green, blue) chromatic tones that are characteristic of adhesive markers. To reduce false positives, lesion regions were first segmented using Double U-Net ( 16) and excluded from the analysis. For lesion segmentation, we used the Double U-Net model provided by its original authors (16), pretrained for skin-lesion segmentation. It is applied only to exclude lesion pixels from the patch analysis and was not retrained in this work.Adhesive markers often exhibit heterogeneous chromatic appearance, combining highly saturated regions with less saturated areas due to illumination variability. To account for this, each detector generated two chromatic masks: a low-threshold mask capturing pixels within a broad color range (including weakly saturated regions), and a high-threshold mask retaining only strongly saturated pixels. Let N low and N high denote the number of non-zero pixels in the low-and high-threshold masks, respectively. We defined the following color consistency ratio:r patches = N high N low × 100A patch was considered present when both color consistency and spatial extent criteria were patches > τ and N high > τ thresholds were selected empirically ∈ τ ∈ with final values τ = and τ = which were applied across all three color-space Final labels were obtained via majority voting across the three borders appear as ring-shaped structures near the edges of dermoscopic images. Detection was performed using three color spaces (HSV, YCrCb, and on peripheral regions by the image to with circular skin circular structures were using the Hough retaining only within of the image reflecting the typically of gel each detected with , the gel border was as an region of width τ width binary masks were an mask M , corresponding to a of , and an mask M , corresponding to a of τ width . The gel border mask was then defined gel = M gel borders from artifacts, with low the were A positive detection was assigned if the region a minimum threshold τ were selected empirically width ∈ τ ∈ with final values τ width = and τ = Final labels were obtained via majority voting across the three bubbles were detected as circular structures within the contact edge detection and morphological were applied to obtain while hair regions using the hair mask as described in Section were characterized by their A and , and a was computed = 2 with A in the range [50, pixels and high were retained. detectors with thresholds > > and > were used to account for variability in A positive detection was assigned when at least one both the and Final labels were obtained via majority voting across the three markings, typically characterized by blue or were detected across three color spaces (HSV, YCrCb, CIELAB). They often exhibit variability in color due to illumination To account for this, each detector generated two complementary masks: a low-threshold mask capturing a broad range of tones and a high-threshold mask retaining only strongly saturated or blue pixels. Let N ink low and N ink high denote the number of non-zero pixels in these A chromatic consistency was defined ink = N ink high N ink low positive detection was assigned when both chromatic consistency and spatial extent were ink > τ and N ink high > τ τ the proportion of strongly saturated while τ a minimum number of detected pixels. were selected empirically ∈ τ ∈ with final values τ = and τ = The same threshold values were used for the HSV, YCrCb, and CIELAB Final labels were obtained via majority voting across the three classical detectors with a multi-label on our previous work we this model for dermoscopic artifact detection using label training and an with to capture and to artifacts. This has shown to binary and for subtle and jointly predicts the presence of seven artifact categories within a multi-label classification C-Tran integrates a visual with a that models The produces a spatial that is with a set of label a label strategy is where a of labels is to the model to infer annotations from co-occurrence of gel borders and our previous work the C-Tran is a with and jointly with the The model is with an of × three four and a of model was on the ISIC-2019 dataset training with of the training data used for validation, using the of ( = = = used the with a learning of 10 , a and early 15 based on the implementation builds on the publicly available reference code of C-Tran typically training C-Tran this the and learning described together with the strategy and the This allows it to on the available data the low bias of C-Tran was models and the same and on ISIC-2019. was with four multi-label the the and and the C-Tran the on all of them (see in model outputs a vector of seven independent = 1 , 2 , . . . , k ∈ each k is obtained a and the that artifact k is of the These values do not a and are not to to one to the output of a predictions are obtained by each at = 1, k ≥ k < output of this phase (Phase is a seven-dimensional binary obtained by the at both the same type of output binary and artifact region The multi-label generated by C-Tran are not used as they only as a visual for the expert during Phase 4 (see Section and are additionally released for analysis (see Section predictions were generated using the two described in the previous the classical ensemble detector and the C-Tran were at the image and across individual artifact categories to were when both produced predictions across all seven artifact first that the released annotations are image-level binary DermArtifactDB not region masks or Consequently, the expert review for each image and each artifact a single binary rather than a spatial and the reference labels correspond to these binary with in at least one artifact category were for review and by two independent a and a The the and visual for each a detected structure is with the visual of the the original image together with the C-Tran as a spatial The in provided clinical validation, artifact presence in the of dermoscopic For each the the original dermoscopic the predictions from the ensemble the predictions generated by and the multi-label produced by which the image regions contributing to each on this both assigned binary labels for each of the seven artifact review of each image followed an explicit the visual in the artifact (see Section as the the as the original dermoscopic image was at full the two automated predictions ensemble and were to the artifact categories in for each of these the corresponding C-Tran was used to the image supporting the and a binary label was assigned to that category its The categories on which both the label and were not were as the two automated but the two with each the was the two with each (including in which both from the automated the was jointly was In the that was not the assessment was as the reference For the PH2 all images were and every was the final dataset consists of labels obtained a ensemble of classical detectors, transformer-based detection, and independent expert This annotation strategy labeling of dermoscopic repositories while the and clinical relevance for robust learning released dataset provides standardized multi-label annotations of dermoscopic artifacts for images from three publicly available ISIC-2019, PH2, and Derm7pt. Due to the dermoscopic images are not can obtain the original images from the corresponding repositories and them with the corresponding artifact annotations using their respective image or ISIC the structure of the artifact annotation dataset , a one per dataset (ISIC-2019, PH2, and Derm7pt), each providing binary artifact labels for the corresponding images. An is into containing images generated by These image regions that most strongly to each artifact and are provided for and analysis. They are not used as annotations and are independent of the released binary artifact labels. A the which dataset-level artifact the of the number of artifacts per image, and representative artifact co-occurrence A provides an of the annotation the dataset and for the annotation to the original images. In addition, to and DermArtifactDB is documented following the for framework and to the for data The complete is provided as the structure and of the datasets, Figure 3 together with a presence of hair highlighting the of acquisition conditions. these all three datasets exhibit artifact co-occurrence, indicating that artifacts to co-occur more than 2 the of artifact-level annotation across datasets, where a is defined as a between the outputs of the classical detectors and the model for a given The proposed annotation framework of manual In ISIC-2019, artifact-level (out of corresponding to manual review due to between the classical detectors and the transformer In artifact-level (out of All were by two and a was in all the of the proposed the PH2 dataset images, artifact-level a complete manual All artifact labels, including both and were by the same and discrepancies were This as a full clinical of the annotation framework and the reliability of the proposed pipeline in a dataset manual of a corresponding to of the dataset images in ISIC-2019 and images in supports the consistency and clinical of the generated annotations.

Fields of Study & Subjects

Cutaneous Melanoma Detection and Management AI in cancer detection Medical Image Segmentation Techniques

Publication details

Journal / source
Frontiers in Big Data
Volume
9
Pages
1866430–1866430
Publication date
8 October 2026
Language
EN