Manuscript Offprint

arXiv:2610.32609

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

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 ≈ 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.

Keywords Hair instance segmentation · Skin and hair characterization · Phototype estimation · Macroscopic imaging · Color calibration · Laser treatment

Introduction

Laser hair removal is a widely used medical and aesthetic procedure that relies on the principle of selective photothermolysis of hair follicles. The effectiveness and safety of the treatment depend strongly on the correct adjustment of the laser parameters according to the patient's skin phototype, hair characteristics, and the presence of specific dermatological conditions [1]. In current clinical practice, this adjustment is typically performed manually by trained operators, based on visual inspection and experience. This manual process is time-consuming, subjective, and prone to variability between practitioners, which can affect both treatment outcomes and patient safety.

Accurate characterization of the treated skin area is essential: laser energy and pulse duration must be adapted to the patient's skin phototype and hair thickness to maximize efficacy while minimizing the risk of burns or hyperpigmentation. However, existing commercial devices rely heavily on human intervention for this task [2]. Only a few advanced systems integrate basic phototype estimation, often relying on simple point-based colorimeters that lack spatial context, or uncalibrated RGB cameras susceptible to lighting variations [3]. Automating this characterization process through computer vision would enable objective, consistent, and rapid parameter selection.

Noelia Vaquero Gallardo noelia.vaquero@upc.edu

Alex Navarro Navarro alejandro.navarro.navarro@estudiantat.upc.edu; alexnavarro605@gmail.com

While deep learning has revolutionized dermatological image analysis, its application to aesthetic dermatology remains underexplored. Most existing computer vision approaches treat hair as an artifact to be removed for lesion diagnosis, rather than a clinical biomarker to be quantified.

1^{1} Intek Medical Technology, Barcelona, Spain

2^{2} Facultat d'Informàtica de Barcelona (FIB), Universitat Politècnica de Catalunya (UPC), Barcelona, Spain

3^{3} Department of Electronics Engineering, Eastern Barcelona School of Engineering (EEBE), Technical University of Catalonia – BarcelonaTech (UPC), Barcelona, Spain

Published online: 19 October 2026

Furthermore, they are typically designed for dermoscopic images under controlled lighting, failing to generalize to the macroscopic, uncalibrated images captured by laser handpieces in real clinical scenarios. In these settings, hairs are usually shaved—leaving only short, barely visible fragments—making segmentation notably more challenging.

To bridge this gap, we propose a unified pipeline where accurate instance segmentation is the first stage and directly supports subsequent skin and hair feature extraction. By treating hair as the primary signal and leveraging precise segmentation masks, we extract clinically relevant characteristics (such as hair density, thickness, color, and skin phototype) only on meaningful regions of the image. This localized approach prevents shadows or background noise from biasing global color measurements. The final output of the pipeline is a set of objective, quantitative features that can be used to inform laser treatment parameters.

Our contributions are threefold:

  • We adapt and train a YOLOv9-based segmentation model for detecting and segmenting body hair in high-resolution macroscopic skin images captured through a laser device applicator, achieving competitive performance despite limited training data.

  • We design a feature extraction pipeline that uses the segmentation output to precisely compute hair and skin characteristics (density, thickness, color, and phototype), integrating deep learning and classical image processing methods in a single workflow and addressing the limitations of manual visual estimation in clinical practice.

  • We conduct a detailed evaluation on a custom dataset of macroscopic skin images, including a comparative study of color processing and calibration methods to ensure accurate and consistent feature estimation under real conditions.