A Prototype Machine Learning Pipeline for Assessing and Tracking Keloid Scars

Mahla Abdolahnejad, Armita Zandi, Jordan Wong, Hannah O. Chan, Victoria Lin, Hyerin Jeong, Rakesh Joshi, Joshua N. Wong, Colin HongmedRxiv 2024

TL;DR

Researchers have developed a prototype machine learning pipeline that automates the detection, measurement, and color analysis of keloid scars using standard 2D smartphone images. By combining a fine-tuned EfficientNet B7 architecture with classical computer vision techniques, the system achieves 98% classification accuracy and provides an objective, accessible alternative to subjective clinical assessments.

What Problem Does This Paper Address?

Keloid scars—raised, often painful lesions caused by excessive collagen deposition—can significantly impact a patient’s quality of life, affecting both physical mobility and psychosocial well-being. Currently, clinicians assess these scars using subjective tools like the Vancouver Scar Scale (VSS), which are prone to high interrater variability and bias.

While objective tools like ultrasound or mexameters exist, they are often cost-prohibitive and impractical for routine clinical use, especially for patients in remote areas. There is a critical need for a standardized, affordable, and accurate tool that can track whether a keloid is responding to treatment (like steroid injections or laser therapy) over time.

Methods

The authors propose a multi-stage machine learning pipeline designed to handle the complexities of skin lesion analysis:

  1. Classification: The backbone is a EfficientNet B7 convolutional neural network (CNN), pre-trained and then fine-tuned with additional fully connected layers. It classifies images into three categories: keloids, normal skin, and other dermatological conditions.
  2. Segmentation & Contouring: To isolate the scar, the pipeline generates activation and saliency maps from the CNN. These are processed using a Gaussian Mixture Model (GMM) to create binary masks, which are further refined by Boundary Attention Maps (BAM) to smooth edges and remove noise.
  3. Spatial Measurement: To solve the "scale problem" in 2D photography, the researchers used a fiducial marker (a reference object of known size, 19.1 mm in diameter) placed near the scar. OpenCV algorithms detect this marker to calibrate a pixel-to-millimeter conversion, allowing for precise measurements of the scar's dimensions.
  4. Colorimetry Analysis: The pipeline employs K-Means clustering on the RGB values of the segmented pixels. By using the "elbow method" to determine the optimal number of color clusters, the system quantifies the distribution of pigments (erythema and melanin) within the lesion.

Datasets

The model was trained and evaluated on a specialized dataset:

  • Training Set: 6,550 2D color images (including augmented images) of keloid patients.
  • Validation Set: 219 images used for hyperparameter optimization.
  • Test Set: 63 images used to assess final performance.
  • Case Studies: Longitudinal data from two patients tracked over 5–6 months to validate the pipeline's ability to monitor progression and regression.

Key Insights and Ideas

  • The "Subjectivity Gap" is Closable: The study demonstrates that high-level deep learning features can be combined with traditional image processing to match or exceed human consistency in scar assessment.
  • Pigmentation Heterogeneity: The K-Means analysis revealed that keloids are rarely a uniform color. The distribution of "color clusters" varies significantly by Fitzpatrick skin type, providing a more nuanced view of scar vascularity and melanin than a simple visual check.
  • Fiducial Markers are Essential: In a world of varying camera focal lengths and distances, the simple inclusion of a physical reference object (the marker) is what transforms a "cool AI demo" into a "reliable clinical tool."
  • Temporal Tracking: The pipeline successfully "saw" a keloid double in size over four months in one patient, proving its utility for long-term clinical monitoring.

Key Results

  • High Accuracy: The unfrozen CNN model achieved 98% accuracy on the test set, with a macro-average precision of 99%.
  • Precise Measurement: The spatial measurement algorithm demonstrated a precision of ±2 mm, which is clinically correlated with manual measurements.
  • Color Quantification: The system successfully identified dominant color clusters (e.g., finding that 46.71% of a specific lesion was "lightly pigmented"), allowing for objective tracking of discoloration changes over time.

Limitations and Future Work

Despite the high accuracy, the authors identified several hurdles:

  • Dark Skin Tones: The segmentation algorithm struggled with patients having a Fitzpatrick Type VI skin tone because the low contrast between the keloid and the surrounding skin made boundary detection difficult.
  • Nascent Keloids: The AI sometimes failed to capture the full extent of very early-stage or rapidly expanding keloids that hadn't yet developed distinct pigmentation or raised borders.
  • 2D vs. 3D: Because the system relies on 2D images, it cannot currently measure scar volume or height—two critical factors in keloid severity.
  • Future Directions: The team aims to expand the analysis to video captures to overcome 2D limitations and further refine the algorithm to improve performance on diverse skin tones. They also suggest cross-referencing their colorimetry data with medical-grade mexameters for deeper validation.

Summary updated

BibTeX
@misc{abdolahnejad2024prototype,
  author = {Mahla Abdolahnejad and Armita Zandi and Jordan Wong and Hannah O. Chan and Victoria Lin and Hyerin Jeong and Rakesh Joshi and Joshua N. Wong and Colin Hong},
  title = {{A Prototype Machine Learning Pipeline for Assessing and Tracking Keloid Scars}},
  year = {2024},
  doi = {10.1101/2024.09.30.24314501},
  howpublished = {medRxiv},
}
Figure