Downloads · 30 days
43
73% of all-time downloads
Neurora/versta-glyphmatte
versta-glyphmatte is a image feature extraction model from Neurora. Use it for the image feature extraction task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Glyph Matte U-Net for On-Device Document Processing. A compact (~1.9M-parameter) four-head U-Net trained end-to-end on synthetic text strips that decomposes a 48-px-high text line into ink coverage (matte), stroke wei…
Downloads · 30 days
43
73% of all-time downloads
All-time downloads
59
Public
Repo size
22.5 MB
Likes
1
Public
Click a slice to open those files.
.onnx1.6 MB · 54%
From the Hugging Face model README
Glyph Matte U-Net for On-Device Document Processing. A compact (~1.9M-parameter) four-head U-Net trained end-to-end on synthetic text strips that decomposes a 48-px-high text line into ink coverage (matte), stroke weight (weight) and per-pixel foreground/background colour, the signals that drive on-device dewarping and enhancement in the Versta Android app. Designed for edge deployment: ships as ONNX (fp32 + fp16) and converts to a ~1.9 MB int8 MNN model bundled into the Versta OCR pack. Entirely trained using renewable energy.
Compact Glyph Decomposer, Trained on Clean Synthetic Labels, Ready for MNN int8
This model was created to close the gap between accurate text enhancement and the tight latency and size budgets of offline mobile OCR. Per line strip it predicts an alpha matte (ink coverage, for dewarp/thresholding), a stroke-weight field (for stroke-aware thinning/boldening), and foreground/background colour fields that contain exact ink/paper colours even under degraded capture. Because training supervision is mathematically exact, labels stay clean while only the RGB input is degraded, a fully synthetic pipeline reaches quality that would otherwise demand hand-annotated pixel labels.
matte (1ch), weight (1ch), foreground (3ch), background (3ch)Trained from scratch on 50,000 synthetic strips from the Versta Glyphmatte dataset (5 new strips per step × 20k steps) with Adam + OneCycleLR, dice/BCE losses on matte and weight plus colour regression losses. Exported to ONNX with inlined weights (fp32) and an fp16 half-precision variant; validated against the fp32 PyTorch reference across four strip widths (figure-of-merit: max |Δ| ≤ 2.2e-06) and evaluated against a fixed validation shard (per-pixel IoU for the matte, AUC for weight).
| Format | Files |
|---|---|
| ONNX fp32 | onnx/glyphmatte.onnx, reference runtime graph |
| ONNX fp16 | onnx/glyphmatte_fp16.onnx, GPU/NPU-friendly half precision |
| Safetensors | glyphmatte.safetensors + config.json, training checkpoint + dims |