Source-linked AI summary

Hair Segmentation and Skin Characterization on Macroscopic Dermatological Images for Laser Treatment Parameterization

Alex Navarro Navarro, Marc Arriaga Hidalgo, Carlos Moreno Rubio, Maxime Talarmain, Noelia Vaquero Gallardo

arXiv:2610.32609v1cs.CV

TL;DR

Clinical laser parameterization depends on skin and hair characteristics, but current characterization is often manual or based on color measurements with limited spatial context. This work combines instance segmentation and calibrated color processing to extract skin and hair features from macroscopic images. The system reports mAP50 ≈0.80 localization performance, while direct irradiation-parameter estimation remains outside this study's scope.

  • Problem

    Clinical characterization for laser treatment is often manual, and existing approaches may lack spatial context or be sensitive to lighting; macroscopic images also contain short, low-contrast hairs.

    Source: Introduction · pp. 1–2
  • Method

    A unified pipeline combines YOLOv9-based hair instance segmentation with calibrated image processing to extract hair density, thickness, color, and skin phototype.

    Source: Introduction · p. 2, Materials and Methods · p. 3, Hair Segmentation Model · p. 5
  • Results

    mAP50 ≈0.80 localization performance was reported across evaluated candidates, with YOLOv9-C-DSEG selected for superior boundary and region-based fidelity.

    Source: Discussion · p. 16
  • Takeaways & Limitations

    The pipeline demonstrates feasibility of automatically extracting objective skin and hair characteristics from macroscopic dermatological images as a preliminary diagnostic phase.

    Source: Discussion · p. 16, Conclusion and Future Work · p. 16

    Very dark skin can reduce segmentation reliability because hair and surrounding skin lack visible contrast, and direct irradiation-parameter estimation remains outside the study's scope.

    Source: Hair Segmentation Performance · p. 11, Discussion · p. 16

Abstract

from arXiv · show

Current light-based devices, such as laser hair removal, intense pulsed light (IPL), vascular laser therapy, and dermatologic phototherapy, are widely used in clinical dermatology but rely heavily on subjective manual parameterization or uncalibrated point-based colorimeters. To overcome these limitations, this work presents a unified system for hair segmentation and skin characterization in macroscopic dermatological images. Unlike most existing literature that relies on dermoscopic datasets captured under highly controlled conditions, our approach is specifically designed for macroscopic images that replicate real clinical laser treatments. The proposed pipeline integrates a custom-trained variant of the YOLOv9 deep learning architecture for instance segmentation and classical image processing within a single workflow to extract objective skin and hair parameters such as phototype, hair density, color, and thickness. A color calibration stage using spectrophotometric measurements ensures accurate feature estimation regardless of illumination conditions. Experimental results show competitive segmentation metrics (mAP@50 $\approx$ 0.80) on a custom dataset featuring short, shaved hairs, typical of pre-treatment scenarios. These findings demonstrate the feasibility of the proposed pipeline in providing the objective, foundational skin and hair features required for future automated laser parameterization, paving the way for its extension to broader light-based medical therapies.

Introduction

Laser treatment settings depend on skin phototype, hair characteristics, and dermatological conditions, yet clinical characterization remains subjective and variable. The work proposes a unified pipeline that segments hair and extracts objective skin and hair features from macroscopic images.

Introduction

  • Manual characterization is time-consuming, subjective, and variable, while commercial systems often rely on point-based colorimeters or uncalibrated RGB cameras.These limitations matter because treatment energy and pulse duration must be adapted to skin phototype and hair thickness.Source: Introduction · p. 1
  • Macroscopic clinical images pose a different challenge from controlled dermoscopic images: pre-treatment hairs are short, shaved, and barely visible.Existing approaches commonly treat hair as an artifact rather than a clinical biomarker.Source: Introduction · pp. 1–2
  • The proposed pipeline uses hair instance segmentation to extract density, thickness, color, and skin phototype from meaningful image regions.Localized measurement is intended to prevent shadows or background noise from biasing global color measurements.Source: Introduction · p. 2
  • The contributions combine a YOLOv9-based segmentation model, feature extraction, and evaluation of color processing and calibration on a custom macroscopic-image dataset.The resulting objective features can inform laser treatment parameters.Source: Introduction · p. 2

Related Work

Prior hair-image work largely targets artifact removal or dermoscopic diagnosis, while macroscopic clinical images require instance-level hair measurement. Skin phototype methods also face challenges from image artifacts and uncontrolled color acquisition.

Hair Segmentation and Detection

  • Earlier hair methods removed hairs from lesion images, while Yue et al. counted hair in controlled microscopic scalp images.Later CNN approaches include U-Net [7], Mask R-CNN [8], ChimeraNet, and an attention-based model for sparse clusters.Source: Hair Segmentation and Detection · p. 2
  • Most prior models use dermoscopic data and perform detection or semantic segmentation, whereas this work uses YOLOv9 [11] to separate and measure individual hairs in macroscopic images.The target hairs are shorter, less contrasted, and captured under less controlled lighting than typical dermoscopic imagery.Source: Hair Segmentation and Detection · p. 2

Skin Analysis and Phototype Estimation

  • Fitzpatrick classification reflects biological response to ultraviolet radiation, whereas ITA classifies image-derived skin color in CIELAB independently of biological response.These approaches therefore quantify distinct skin properties.Source: Skin Analysis and Phototype Estimation · p. 2
  • Global skin-tone analysis can be distorted by hairs, shadows, and moles, while handpiece RGB cameras are affected by white balance and ambient light.Point colorimeters measure only a 1cm2 spot; the proposed approach combines segmentation masks with spectrophotometric calibration for ITA estimation.Source: Skin Analysis and Phototype Estimation · p. 2

Materials and Methods

The methods combine clinical-image acquisition, instance-segmentation training, color calibration, and extraction of hair and skin parameters. The dataset includes distinct segmentation and expert-annotated subsets, with volunteer-level cross-validation and manually verified annotations.

Materials and Methods

  • The pipeline has four stages: clinical dataset acquisition and annotation, YOLOv9-C-DSEG training, spectrophotometric color calibration, and extraction of hair density, thickness, and skin phototype.Source: Materials and Methods · p. 3

Dataset

  • The clinical handpiece captures a 2 × 3 cm skin area using a Picamera2 sensor and LED illumination to simulate laser-treatment acquisition.The images were collected from volunteers with informed consent and anonymized before analysis.Source: Dataset · p. 3
  • The dataset includes 384 initially labeled images, 247 refined annotations from a further 1131 images, and 128 expert-annotated images for feature evaluation.Hair color was evaluated on 120 expert-annotated images because eight contained hair too fine to classify; expert annotations are imbalanced across some attributes, and the evaluation used five folds partitioned by volunteer.Source: Dataset · p. 3

Annotation and Preprocessing

  • SAM2-assisted initial masks were refined and manually verified, and fixed ROI cropping removed the handpiece border so the processed images contain skin tissue.No instance was accepted without human supervision.Source: Annotation and Preprocessing · p. 3

Hair Segmentation Model

Because downstream feature extraction requires individual hair measurements, the segmentation model preserves instance-level masks for short, low-contrast hairs. YOLOv9-C-DSEG was selected after comparisons with other variants and trained using refined annotations and tiled images.

Hair Segmentation Model

  • Short, shaved, low-contrast hairs make macroscopic segmentation challenging, and downstream density, thickness, and color measurements require instance-level rather than only pixel-wise masks.Source: Hair Segmentation Model · pp. 3, 5
  • YOLOv9-C-DSEG adds a segmentation head to YOLOv9-C, decoupling localization and mask generation to improve edge precision and mask stability without compromising inference speed.Independent hair masks support subsequent quantitative analysis; preliminary comparisons included GELAN-C-SEG and YOLOv9-C-SEG.Source: Hair Segmentation Model · p. 5
  • Controlled geometric and photometric augmentation and segment copy-paste expanded training examples; mosaic, mixup, perspective, and shear were disabled because they degraded segmentation consistency.Source: Hair Segmentation Model · p. 5
  • The final model used the 247 images with refined annotations because adding lower-quality initial annotations degraded performance.Five-fold validation was partitioned by volunteer, and images were divided into 18 overlapping 640 × 640 tiles for training and inference.Source: Hair Segmentation Model · p. 5

Color Calibration

Color calibration maps camera measurements toward spectrophotometric references, while skin phototype estimation uses calibrated, hair-filtered pixels from a central region. The reported calibration error falls substantially, and the skin-color distribution follows the expected ITA structure despite local variation in macroscopic images.

Color Calibration

  • Calibration uses 30 Pantone color patches photographed under the dataset’s optical setup, with spectrophotometer-measured CIELAB colors as references.Direct spectrophotometric measurement of skin was considered unreliable because of skin’s subsurface scattering and absorption.Source: Color Calibration · p. 6
  • Reinhard correction aligns source and target color-distribution means and standard deviations in LAB, and is applied after segmentation before feature extraction.It supports subsequent skin-tone, phototype, and hair-color estimates without affecting segmentation performance.Source: Color Calibration · p. 6
  • Mean CIELAB color error fell from 26.20 to 4.58 with Reinhard correction, outperforming the linear matrix’s 6.62 while avoiding the polynomial model’s validation error of 9.25.The polynomial model’s training error was 2.64, but it overfit unseen colors; Reinhard offered the best reported trade-off for this setup.Source: Color Calibration · p. 6

Skin Color

  • The dataset’s skin tones trace the characteristic tear-drop distribution in L*–b* space, consistent with the expected chromatic structure under controlled illumination.Figure 1 plots each of 1,131 expanded-dataset images and overlays ITA boundaries and class means.Source: Skin Color · p. 7, Figure 1 · p. 7
  • Macroscopic surface irregularities and illumination vignetting can make one image’s ITA values span as many as four or five adjacent phototype classes.ITA uses CIELAB lightness and the blue–yellow component; values are discretized into six phototype classes after filtering L*=0 pixels and values beyond one standard deviation from both channel means.Source: Skin Color · p. 7
  • Phototype estimation uses a calibrated central ROI and excludes hair-covered pixels with the segmentation mask to reduce color contamination.The authors describe this combination as supporting consistent and reproducible estimates across individuals and acquisition sessions.Source: Skin Color · p. 7

Hair Color

Hair-color estimates from segmentation masks are biased by skin-colored boundary pixels, so the pipeline filters contamination before assigning categorical tones. Clustering generally works better for medium and thick hairs, while very thin hairs remain partly affected.

Hair Color

  • Boundary blur, partial transparency, and color bleeding contaminate mask pixels, making a direct average systematically lighter than the true hair color.The paper notes that body hair’s fine, partly translucent structure and optical blending with skin make hair color difficult to estimate.Source: Hair Color · p. 7
  • Erosion removes boundary pixels but can discard many valid pixels from fine hairs; clustering separates combined hair and skin pixels in RGB and selects the cluster with the lowest skin proportion.The clustering step uses k=6 and a random sample of 20,000 pixels from each region.Source: Hair Color · pp. 7–8
  • Both erosion and clustering darkened estimated hair color relative to the uncorrected mean, while clustering generally worked better for medium and thick hairs.Very thin hairs remained partly affected by skin-color interference because their masks contained few pure hair pixels.Source: Hair Color · p. 8
  • A second k-means clustering with k=3 in CIELAB assigns filtered mean hair colors to blonde, brown, or black reference-tone groups.The pipeline first filters skin-induced artifacts, then clusters the resulting hair tones.Source: Hair Color · p. 8

Hair Count and Density

Instance segmentation allows direct hair counting, including separate counts for partially overlapping or crossing hairs. A calibrated pixel-to-millimeter scale converts those counts into physical follicular density.

Hair Count and Density

  • Each detected hair instance can be counted directly, and tile-overlap reconstruction avoids duplicated detections in full-resolution hair counts.The model also distinguishes partially overlapping or crossing hairs as separate instances in the captured dataset.Source: Hair Count and Density · p. 8
  • The measured scale of 0.00732318 mm/pixel converts hair counts into density per mm2 or cm2.A known-dimension calibration pattern was photographed using the same optical setup and acquisition conditions.Source: Hair Count and Density · pp. 8–9

Hair Thickness

Hair thickness is estimated from segmentation masks using distance-transform radii and skeleton-based measurements. Pixel measurements are converted to millimeters using the calibrated image scale.

Hair Thickness

  • The maximum distance-transform value within a hair mask, multiplied by two, estimates maximum thickness; mean distance-transform values along the mask skeleton estimate mean thickness.The skeleton is the structure’s central axis, and the distance transform measures each mask pixel’s distance to its nearest boundary.Source: Hair Thickness · p. 9
  • Both thickness measures are converted from pixels to millimeters using the previously determined pixel-to-millimeter scale.The authors state that these calibrated diameters can be compared with dermatological and trichological standards.Source: Hair Thickness · pp. 9–10

Experiments and Results

The experiments evaluate hair segmentation, downstream feature estimates, and color calibration on macroscopic dermatological images. They report competitive segmentation, feature extraction performance, and a marked dependence of color-based predictions on calibration.

Hair Segmentation Performance

  • All three segmentation models achieve mAP@50 of approximately 0.80, while YOLOv9-C-DSEG is selected for stronger region- and boundary-based mask fidelity.Its macro-averaged metrics are more sensitive to challenging images; segmentation also degrades for very dark skin and is affected by glare and low-contrast hair stubs.Source: Hair Segmentation Performance · pp. 10–11

Error Propagation to Feature Estimation

  • Mean hair-thickness estimation has a macro-averaged absolute error of 4.0 µm, and hair-density relative error is 4.11% when micro-averaged.The reported macro- and micro-averaged density relative errors are 33.58% and 4.11%, respectively; the authors attribute the difference to low-count images.Source: Error Propagation to Feature Estimation · p. 11

Feature Extraction Evaluation

  • On the test set, balanced accuracy was 80.4% for hair thickness, 72.6% for density, and 61.3% for hair color; skin phototype accuracy was 73.0%.Numerical predictions for thickness and density increase monotonically across expert categories, with adjacent-class confusions visible in the boxplots.Source: Feature Extraction Evaluation · p. 13

Impact of Color Calibration

  • Without color calibration, skin phototype accuracy falls from 72.7% to 1.6%, and hair-color accuracy falls from 75.0% to 50.8%.Uncalibrated predictions shift toward darker phototypes and classify most hairs as black; geometric feature performance remains unchanged.Source: Impact of Color Calibration · p. 15

Full Pipeline Qualitative Results

  • Representative full-pipeline outputs show visually coherent extracted attributes across conditions despite illumination variations and subtle reflectance differences.The examples compare continuous model predictions with categorical ground truth across body areas and skin tones.Source: Full Pipeline Qualitative Results · pp. 15–16

Discussion

The discussion presents automated skin-and-hair characterization as a prerequisite for later laser parameterization, not as a system that estimates irradiation settings. It also identifies scope boundaries in the dataset, dark-skin segmentation, and calibration setup.

Discussion

  • The pipeline extracts objective clinical features but does not estimate irradiation parameters, which remain outside this study and require future clinical validation.The extracted features are described as biomarkers clinicians use to calculate safe dosimetry.Source: Discussion · p. 16
  • YOLOv9-C-DSEG is selected for mask fidelity despite similar candidate localization performance, and the pipeline reaches sub-second inference on mid-range GPUs.Macro-averaged metrics are more sensitive to isolated low-contrast edge cases than micro-averaged scores.Source: Discussion · p. 16
  • A 4.0 µm thickness error supports the conclusion that minor mask-boundary variations do not critically propagate into derived features.The discussion attributes some adjacent-class confusion to variability in human categorical annotations and identifies blond-hair misclassification as a system limitation.Source: Discussion · p. 16
  • The dataset may not represent the general population; very dark skin challenges detection, and the calibration stage requires adaptation for arbitrary capture devices.The dataset size is constrained by available volunteers, and the calibration is designed for a controlled acquisition setup.Source: Discussion · p. 16

Conclusion and Future Work

The system demonstrates the feasibility of combining segmentation with calibrated image analysis for objective characterization of macroscopic dermatological images. Clinical applicability remains to be confirmed through larger datasets and controlled studies.

Conclusion and Future Work

  • The pipeline provides reproducible quantitative estimates of key skin and hair features as an objective alternative to subjective manual assessment before laser treatments.Source: Conclusion and Future Work · p. 16
  • The evaluation confirms sub-pixel resilience of feature extraction to segmentation noise and the necessity of spectrophotometric calibration under lighting bias and fluctuation.The authors describe the system as a foundation for future automated laser parameterization, not as a clinically validated parameterization tool.Source: Conclusion and Future Work · pp. 16–17
  • Larger datasets and controlled studies are needed to confirm clinical applicability, with future trials assessing real-world effects on treatment safety and personalization.Source: Conclusion and Future Work · p. 17
  • Future work targets annotation quality and difficult cases through representative data, multi-expert consensus, alternative segmentation models, thickness-conditioned color classification, and other imaging or illumination approaches.The proposed refinements address fine-structure boundaries, very light or fine hairs, and detection in dark skin tones.Source: Conclusion and Future Work · p. 17

Declarations

The study reports non-invasive, anonymized image acquisition from adult volunteers and states that formal ethics review was not required. Participants consented to research use and image publication; the authors declare no competing interests and provide the article under a CC BY 4.0 license.

Declarations

  • The study involved non-invasive acquisition of non-identifiable adult volunteer photographs and states that formal ethics review was not required.Source: Declarations · p. 17
  • Participants gave informed consent for image acquisition and research use, and consented to publication of the macroscopic images.Source: Declarations · p. 17
  • The authors declare no competing interests, and the article is available under a Creative Commons Attribution 4.0 International License.Source: Declarations · p. 17
Loading 2610.32609v1…