Expand description
Super-resolution — specialized_libs::computer_vision::sr.
Modules§
- cnn_
light_ session - Tier: CnnLight — lightweight learned SR (FSRCNN / ESPCN).
- device_
policy - B2 — SR device policy (classical path honesty before WGSL land).
- esrgan_
session - Tier: EsrganEdge — compact Real-ESRGAN generative SR.
- onnx_
sr_ session - Shared ONNX Runtime session helper for learned super-resolution tiers
(feature
vision-onnx). - super_
resolve - Unified classical super-resolution entry (Track B0 / SR0).
- super_
resolve_ tiled - SR1 — tiled classical super-resolution (plan → extract → SR tile → blend).
- swin_
session - Tier: SwinRestore — SwinIR transformer SR (heavy, tiled for large stills).
- tile_
blend - SR1 — feather-blend an upscaled tile into a full-frame output.
- tile_
extract - SR1 — extract an input tile (RGB8 packed) into a caller buffer.
- tile_
plan - SR1 — plan overlapping tiles for bounded SR (VRAM/RAM-aware).
Structs§
- SrReport
- Report returned after a successful enhance.
- SrRequest
- Caller request for
super_resolve. - SrSession
Info - Metadata after a session probe (always available for tests, feature or not).
- Tile
Policy - Tiling policy for classical and learned SR backends.
- Tile
Rect - Axis-aligned tile on the input image (pre-scale).
Enums§
- Classical
Kernel - Classical resampling kernel.
- Enhancement
Mode - Enhancement honesty mode. Medical/forensic paths use
Sharpen. - SrBackend
- Super-resolution backend. Only classical for B0; more variants later.
- SrSession
Error - Errors for the learned SR session layer. Mirrors vision’s
OnnxSessionErrorwith an addedInvalidParameterfor bad request geometry.
Constants§
- DEFAULT_
OVERLAP - Default overlap (pixels on input side).
- DEFAULT_
TILE - Default edge-friendly tile size (pixels on input side).
Functions§
- blend_
tile_ into_ accum - Blend one already scaled tile into float accumulators.
- cnn_
light_ super_ resolve - Super-resolve
rgbbyscaleusing a CnnLight (FSRCNN/ESPCN) ONNX weight. - esrgan_
super_ resolve - Super-resolve
rgbbyscaleusing a Real-ESRGAN-compact ONNX weight. - estimate_
tile_ count - How many tiles would be planned.
- extract_
tile_ rgb8 - Copy
rectfrom full-frame RGB8 (src_w × src_h × 3) intoout(at leastrect.w*rect.h*3). - finalize_
blend - Divide accum by weight into
outRGB8. - plan_
tiles - Plan a grid of overlapping tiles covering
[0,width) × [0,height). - probe_
sr_ asset - Probe an SR weight file for a tier.
- super_
resolve - Super-resolve RGB8 into caller buffer (
out≥w*scale * h*scale * 3). - super_
resolve_ tiled - Super-resolve using overlapping tiles and feather blend.
- super_
resolve_ tiled_ default - Convenience: tiled with default policy.
- super_
resolve_ tiled_ with_ policy - Tiled classical with the same device honesty.
- super_
resolve_ with_ policy - Super-resolve with explicit thermal + VRAM policy (B2 surface).
- swin_
super_ resolve - Super-resolve
rgbbyscaleusing a SwinIR (restoration) ONNX weight.