Optional Stray Hairs neural reconstruction

LaMa: Resolution-robust Large Mask Inpainting with Fourier Convolutions
Roman Suvorov et al., WACV 2022
Paper: https://arxiv.org/abs/2109.07161
Original source: https://github.com/advimman/lama

ONNX distribution: https://huggingface.co/opencv/inpainting_lama
Distributor: OpenCV / Open Source Vision Foundation
Revision: aee6d22f0a13e5e35af1c9a1c3afd62841fc6f3f
File: inpainting_lama_2025jan.onnx
SHA-256: 7df918ac3921d3daf0aae1d219776cf0dc4e4935f035af81841b40adcf74fdf2
Size: 92,591,623 bytes
License: Apache License 2.0, copied in STRAY-HAIRS-MODEL-LICENSE.txt

The optional model reconstructs missing pixels inside the Stray Hairs removal
support. This is learned inpainting, not recovery of the original hidden scene.
Inference is local. No photo is uploaded. Without the installed model, or on
model/runtime failure, the tool uses classical FSR / diffusion reconstruction.
The model is used on broad strand clusters; isolated narrow components retain
classical reconstruction. The module logs neural runtime failures.

Detection uses an independently implemented multiscale ridge detector with
bilateral contrast and cross-sectional width checks. It was informed by
curvilinear line detection research (Carsten Steger, CVPR 1997 / TPAMI 1998),
but is not a reproduction of the full published Steger algorithm.
No third-party PatchMatch or SharpRazor code is included.
