Loading...
Searching...
No Matches
inference_model.h
Go to the documentation of this file.
30/** @brief Parsed descriptor with self-referencing tensor-name pointers; do not copy after parsing. */
42/** @brief Independent, noncopyable model owner; mapped tensor buffers and session are reused between jobs. */
51 bool capture_identity; /**< Sequence/time came from this retained capture rather than an offline request. */
55/** @brief Load a bounded descriptor and verify its exact graph digest; hashes are not authentication.
64/** @brief Parse a descriptor, not graph bytes; graph integrity remains a separate read-time check.
93 * @note Mapping tensor storage does not make ORT allocations heap-free or bound whole-board RAM. */
103/** @brief Prepare a single image input without running the model, so camera leases can be released first.
Source-independent, bounded model preprocessing with reversible coordinate bookkeeping.
bool inference_context_run(struct inference_context *context, char *error, size_t capacity)
Run the currently prepared tensors using the context's timeout policy.
Definition inference_model.c:346
bool inference_context_open(struct inference_context *context, const struct inference_settings *settings, const char *adapter, char *error, size_t capacity)
Verify a bundle, map bounded tensors and bind one warm session.
Definition inference_model.c:277
bool inference_context_prepare_image(struct inference_context *context, const struct inference_image *image, char *error, size_t capacity)
Prepare a single image input without running the model, so camera leases can be released first.
Definition inference_model.c:361
bool inference_file_sha256(const char *filename, char digest[65])
Hash a stable nonempty regular file using bounded streaming scratch.
Definition inference_model.c:41
bool inference_model_read(struct inference_model *model, const char *descriptor, const char *graph, char *error, size_t capacity)
Load a bounded descriptor and verify its exact graph digest; hashes are not authentication.
Definition inference_model.c:258
bool inference_model_label(const struct inference_model *model, unsigned category, char *label, size_t capacity)
Resolve one model-owned label without retaining a pointer into a mutable list.
Definition inference_model.c:237
void inference_context_close(struct inference_context *context)
Release the session before unmapping its borrowed tensor storage.
Definition inference_model.c:373
bool inference_model_parse(struct inference_model *model, char *contents, size_t length, char *error, size_t capacity)
Parse a descriptor, not graph bytes; graph integrity remains a separate read-time check.
Definition inference_model.c:189
Shared application_settings.ini discovery with module-owned extra keys.
Independent, noncopyable model owner; mapped tensor buffers and session are reused between jobs.
Definition inference_model.h:43
struct inference_image_transform transform
Definition inference_model.h:46
Model-owned preprocessing; normalized samples are (sample - mean) * scale.
Definition inference_image.h:45
Exact resized content rectangle, including rounded letterbox offsets.
Definition inference_image.h:55
Borrowed immutable planes; lengths/strides prove all addressed rows are available.
Definition inference_image.h:37
Parsed descriptor with self-referencing tensor-name pointers; do not copy after parsing.
Definition inference_model.h:31
char input_names[ONNX_TENSOR_LIMIT][ONNX_NAME_CAPACITY]
Definition inference_model.h:34
char output_names[ONNX_TENSOR_LIMIT][ONNX_NAME_CAPACITY]
Definition inference_model.h:35
struct onnx_tensor outputs[ONNX_TENSOR_LIMIT]
Definition inference_model.h:36
Per-application configuration; all resolved paths belong to this caller-owned value.
Definition inference_settings.h:39
Noncopyable caller-owned session; zero-initialize and serialize open/run/close ownership.
Definition onnx_session.h:64
Named concrete tensor view; its aligned backing storage must outlive the session.
Definition onnx_session.h:44