Skip to content

[WIP]: Add JSON model config dispatch system and model enablement fixes - #45

Open
sandeshk-intel wants to merge 3 commits into
OpenVisualCloud:masterfrom
sandeshk-intel:feature/model-config-and-enablement
Open

sandeshk-intel wants to merge 3 commits into
OpenVisualCloud:masterfrom
sandeshk-intel:feature/model-config-and-enablement

Conversation

@sandeshk-intel

Copy link
Copy Markdown
Collaborator

Squashed from internal feature/sandeshk/model_config_and_enablement_innersource:

  • Unified JSON config dispatch for SVP/VideoProc, EDSR, CustomVSR, TSENet, RIFE, VideoSeal
  • HDRTVNet-LE config fixes and documentation updates
  • VideoProc 10-bit output / TV-range clamping fix
  • use-after-free fix in ff_dnn_free_model_ivsr teardown
  • Legacy model_type backward compatibility restored
  • Dockerfile/build.sh updates for patches 0005-0007

(cherry picked from commit c725e474450c4bb19c4b130842f0d4f87aeb36b7)

Squashed from internal feature/sandeshk/model_config_and_enablement_innersource:
- Unified JSON config dispatch for SVP/VideoProc, EDSR, CustomVSR, TSENet, RIFE, VideoSeal
- HDRTVNet-LE config fixes and documentation updates
- VideoProc 10-bit output / TV-range clamping fix
- use-after-free fix in ff_dnn_free_model_ivsr teardown
- Legacy model_type backward compatibility restored
- Dockerfile/build.sh updates for patches 0005-0007

(cherry picked from commit c725e474450c4bb19c4b130842f0d4f87aeb36b7)
Auto-generates an ivsr_ffmpeg_plugin model_config JSON from an
OpenVINO IR: detects layout, nif, channel_divisor, precision, SR
scale, window_type, align, and infers normalize_input/output from
baked-in normalization constants in the .bin weights. Falls back to
a flagged "unconfirmed" default when no signal exists in the IR.

Document usage in ivsr_ffmpeg_plugin/README.md.

Signed-off-by: sandeshk <sandesh.kumar.s@intel.com>
Adds patches/0008-Fix-RGB-model-10-16-bit-normalization.patch and wires
it into build.sh's patch-apply sequence, right after patch 0007.

pack_input_window() and unpack_output_window() in dnn_backend_ivsr.c
hardcoded uint8_t pixel access and a fixed 255.0 scale for every
RGB-channel model (RIFE, SPAN, EDSR, VideoSeal, HDRTVNet-LE, TSENet's
sliding path). The Y-plane (VideoProc/SVP) unpack path already handled
10/16-bit samples via AVPixFmtDescriptor bit depth; the RGB path never
got the equivalent treatment, so any model fed or asked to produce
rgb48le/bgr48le (10/16-bit) frames had its input misread and its output
corrupted (wrong byte width, wrong scale).

Fix: read/write pixel components at the frame's actual bit depth, scale
normalized ([0,1]) models by (2^bits-1) instead of hardcoded 255, and
canonicalize raw-passthrough models ([0,255]-trained) to/from the
frame's native range instead of leaving native samples unconverted.
No-op for bits == 8, so existing 8-bit behavior is unchanged.

Signed-off-by: sandeshk <sandesh.kumar.s@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant