Glasses Glare Removal - local segmentation models

Glasses Detector by Mantas Urbonas and contributors
Source: https://github.com/mantasu/glasses-detector/tree/v1.0.4
License: MIT (see GLASSES-MODEL-LICENSE.txt)
Presence gate: torchvision ShuffleNet V2 x1.0; transparent-eyeglasses classifier.
https://github.com/mantasu/glasses-detector/releases/download/v1.0.0/classification_eyeglasses_shufflenet_v2_x1_0.pth
Weight SHA256: 2b540104a08056e62a8523d07f282159a981f89e09d3eff1ba8fa358791eaa98
Exported ONNX SHA256: d8c945e731a7540c3b18f0ae23eb9bdf14a0883eab055f1fdb1e3cd3f51a67a5
Architecture: torchvision LRASPP / MobileNetV3 Large, one class.
Pretrained weights: v1.0.0 release, lenses and frames categories.

https://github.com/mantasu/glasses-detector/releases/download/v1.0.0/segmentation_lenses_lraspp_mobilenet_v3_large.pth
Weight SHA256: 31659f305dbe03d95e95f50b1d1928bd52cef776f1bc0e49383fda14cb124ceb
Exported ONNX SHA256: 1307f6a140080ce85a261f6464999c685d252bdc99b51fdd16a8f85b6e3cb52d

https://github.com/mantasu/glasses-detector/releases/download/v1.0.0/segmentation_frames_lraspp_mobilenet_v3_large.pth
Weight SHA256: f4443bcdd37702372b2f60dd52cc01edf04b63e995ac185ae1d85ef09ae41370
Exported ONNX SHA256: dce84d716e48d47ebe910a23eeddc7fa2ed7276af4ef9b790dc0fa859c1dbeca

Exports: opset 17, float32, input 1x3x256x256 RGB with ImageNet normalization;
sigmoid lens/frame probability outputs. Local ONNX Runtime CPU execution.
No model or photograph is transferred during a retouch request.

The independently implemented selective correction is informed by the distinction
between reflection reduction and missing-content reconstruction discussed in
Anti-Glare (CVPR 2017), ER2Net (TCSVT 2024) and DL2G (CVPR 2025). It does not
implement those research networks or claim their reported performance.

Strong reflection support outside detected eye structures uses the existing
local LaMa model. See STRAY-HAIRS-MODEL-NOTICE.txt and LICENSE for that model.
These pixels are estimated, not original hidden scene detail. Neural inpainting
does not write into the visible eye. The eye can receive bounded smooth-light
and regional skin/sclera/iris chroma correction. Observed dark pupil cores,
compact neutral iris catchlights, dark frames and pixels outside the correction
mask are retained. An isolated white sclera is not treated as opaque glare.
Low-confidence glasses classification is recovered only when segmentation
supports both eye centers with strong frame evidence; near-zero scores skip.
Missing detector models produce an unchanged image and a log warning. Missing
LaMa falls back to local classical repair, which can look worse on broad patches.
