Skip to main content

Module load_onnx_bytes

Module load_onnx_bytes 

Source
Expand description

Cold-path ONNX file validation (no runtime inference).

PermissiveReady zoo weights: check magic + size so adapters fail closed before claiming ProductionWeights. Actual ORT/tract session is feature work.

Structs§

OnnxFileMeta
ONNX protobuf files typically start with field tags; many begin with 0x08 after optional size, but OpenCV Zoo files often start with \x08 varint or the ASCII is not reliable. We require: readable file, min size, and either protobuf-ish leading bytes or presence of “onnx” string in header.

Enums§

OnnxLoadError

Functions§

load_onnx_file
Load entire ONNX file into memory (cold path; weights stay outside NQuin).
validate_onnx_bytes
Validate bytes without reading disk.