Abstract
Raster-scan optoacoustic mesoscopy (RSOM) is a powerful, non-invasive optical imaging technique for functional, anatomical, and molecular skin and tissue analysis. However, both the manual and the automated analysis of such images are challenging, because the RSOM images have very low contrast, poor signal to noise ratio, and systematic overlaps between the absorption spectra of melanin and hemoglobin. Nonetheless, the segmentation of the epidermis layer is a crucial step for many downstream medical and diagnostic tasks, such as vessel segmentation or monitoring of cancer progression. We propose a novel, shape-specific loss function that overcomes discontinuous segmentations and achieves smooth segmentation surfaces while preserving the same volumetric Dice and IoU. Further, we validate our epidermis segmentation through the sensitivity of vessel segmentation. We found a 20% improvement in Dice for vessel segmentation tasks when the epidermis mask is provided as additional information to the vessel segmentation network.
Introduction: The Challenges of RSOM Imaging
Raster-scan optoacoustic mesoscopy (RSOM) uses light and sound to visualize deep skin structures like blood vessels and the epidermis. Despite its potential, RSOM images are notoriously difficult to process due to low contrast, high noise, and the physical overlap of melanin and hemoglobin absorption spectra at common laser wavelengths.
When standard deep learning models, such as those using Binary Cross Entropy (BCE) loss, attempt to segment the epidermis, they often produce discontinuous results with gaps or jagged edges. These anatomical inaccuracies are problematic for downstream tasks; for instance, holes in an epidermis mask can lead vessel segmentation algorithms to misidentify melanin as blood vessels, compromising medical biomarkers.
Methodology: Enforcing Anatomical Smoothness
To address these issues, we developed a hybrid loss function that integrates standard pixel-wise accuracy with a distance-based smoothness penalty ($S_j$).
The Smoothness Penalty
Instead of evaluating pixels in isolation, the new loss function considers the overall shape of the predicted layer. It employs a 1D convolution with a mean kernel to compare a prediction to its local neighbors. Sharp deviations from the local average—indicative of "spikes" or "gaps"—result in an increased penalty. This approach leverages the anatomical prior that skin layers are continuous and relatively smooth.
Implementation and Architectures
The penalty is fully differentiable, allowing for direct integration into the backpropagation process of any neural network. To demonstrate its architecture-agnostic nature, we tested the loss function on both a standard U-Net and a Fully Convolutional Network (FCN). The study utilized a specialized RSOM dataset of 31 volumetric 3D human skin scans, sliced into 3,420 training, 855 validation, and 1,026 test images ($x-z$ planes).
Key Results
The proposed loss function significantly improved segmentation quality without sacrificing accuracy.
- Roughness Reduction: Surface roughness ($R_a$) decreased substantially. For the U-Net, $R_a$ dropped from 0.125 (BCE only) to 0.055 with the smoothness term.
- Stable Accuracy: Volumetric accuracy (Dice score and IoU) remained stable across several orders of magnitude for the scaling factor $s$, proving that smoothness does not come at the cost of correctness.
- Downstream Impact: The most significant result was the boost in vessel segmentation. By providing a smooth, hole-free epidermis mask to the vessel segmentation network, the Dice score improved from 0.619 to 0.810—a 20% performance increase.
Discussion and Future Work
By creating a reliable mask of the epidermis, we effectively "blind" the vessel segmentation network to distracting melanin signals. While successful, the current implementation assumes skin layers are roughly parallel to the $x-y$ plane. Future iterations could explore orientation-agnostic versions of the loss or apply this technique to other layered biological structures, such as retinal or cortical layers.
Summary updated