Crate vaal_sys

Source

Structs§

VAALBox
Common bounding box structure used by all decoders. The box is defined by the minimum and maximum coordinates of the x,y points as normalized values. Normalized values are in the range 0..1 and can be multiplied by the size of an image to de-normalize back to actual pixel locations.
VAALEuler
@struct VAALEuler
VAALKeypoint
@struct VAALKeypoint
nn_context
nn_tensor
vaal_context

Constants§

VAALError_VAAL_ERROR_GRAPH_VERIFY_FAILED
Failed to verify graph generateed from model.
VAALError_VAAL_ERROR_INTERNAL
Internal error without a specific error code, catch-all error.
VAALError_VAAL_ERROR_INVALID_AXIS
The requested axis for an operation was invalid or unsupported.
VAALError_VAAL_ERROR_INVALID_ENGINE
The requested engine is invalid.
VAALError_VAAL_ERROR_INVALID_HANDLE
The provided handle is invalid. This error is typically used by NNEngine when interfacing with another API
VAALError_VAAL_ERROR_INVALID_LAYER
When working with a model a reference was made to a layer which did not exist.
VAALError_VAAL_ERROR_INVALID_ORDER
The requested ordering was invalid.
VAALError_VAAL_ERROR_INVALID_PARAMETER
A required parameter was missing or NULL or simply invalid.
VAALError_VAAL_ERROR_INVALID_QUANT
The quantization parameters are invalid.
VAALError_VAAL_ERROR_INVALID_SHAPE
The tensor’s shape is invalid for the given operation. It differs from the shape mismatch in that the shape is invalid on its own and not relative to another related tensor. An example would be a shape with more than one -1 dimension.
VAALError_VAAL_ERROR_KERNEL_MISSING
The internal kernel or subroutine required to complete an operation using the engine plugin was missing. An example would be OpenCL or OpenVX operation where the kernel implementation cannot be located.
VAALError_VAAL_ERROR_LIBRARY_UNINITIALIZED
Library has not been initialized for use, this should happen automatically but can be done manually using vaal_init().
VAALError_VAAL_ERROR_MISSING_RESOURCE
A required resource was missing or the reference invalid.
VAALError_VAAL_ERROR_MODEL_GRAPH_FAILED
Failed to generate graph representation of model.
VAALError_VAAL_ERROR_MODEL_INVALID
The model is invalid or corrupted.
VAALError_VAAL_ERROR_MODEL_MISSING
An operation referenced a model but the model was not provided.
VAALError_VAAL_ERROR_NOT_IMPLEMENTED
Signals an API has not been implemented..
VAALError_VAAL_ERROR_OUT_OF_MEMORY
Out of memory error, returned if a call to malloc returns NULL or similar error.
VAALError_VAAL_ERROR_OUT_OF_RESOURCES
Out of resources errors are similar to out of memory though sometimes treated separately by underlying plugins.
VAALError_VAAL_ERROR_PARAMETER_NOT_FOUND
Lookup of named parameter was not found.
VAALError_VAAL_ERROR_PARAMETER_READ_ONLY
Attempted to write to read-only parameter.
VAALError_VAAL_ERROR_PLATFORM_UNSUPPORTED
Attempted an operation which is unsupported on the current platform.
VAALError_VAAL_ERROR_SHAPE_MISMATCH
When attempting to run an operation and the input/output tensors have invalid or unsupported shape combinations. Some operations require the shapes to be the same while others, such as arithmetic broadcasting operations, will support various shape combinations but if the provided pairs are invalid then the shape mismatch is returned.
VAALError_VAAL_ERROR_STRING_TOO_LARGE
The string was too large.
VAALError_VAAL_ERROR_SYSTEM_ERROR
A system error occured when interfacing with an operating system function. On some systems errno might be updated with the underlying error code.
VAALError_VAAL_ERROR_TENSOR_NO_DATA
The tensor has no data or the data is not currently accessible.
VAALError_VAAL_ERROR_TENSOR_TYPE_UNSUPPORTED
The operation does not support the tensor’s type.
VAALError_VAAL_ERROR_TOO_MANY_INPUTS
For operations which can operate on an array of inputs, the provided list of inputs was too large.
VAALError_VAAL_ERROR_TYPE_MISMATCH
When attempting to run an operation where the input/output tensors are of different types and the operation does not support automatic type conversions.
VAALError_VAAL_ERROR_UNKNOWN_DECODER
Unknown decoder was provided or failed to detect decoder.
VAALError_VAAL_SUCCESS
Successfull operation, no error.
VAALType_VAAL_F16
The VAAL_F16 type is currently unsupported but would map to either an ARM __fp16 or C11 (GCC extension) _Float16 type.
VAALType_VAAL_F32
The VAAL_F32 type maps to a C float
VAALType_VAAL_F64
The VAAL_F64 type maps to a C double
VAALType_VAAL_FUNC
The VAAL_FUNC is a function pointer.
VAALType_VAAL_I8
The VAAL_I8 type maps to a C int8_t
VAALType_VAAL_I16
The VAAL_I16 type maps to a C int16_t
VAALType_VAAL_I32
The VAAL_I32 type maps to a C int32_t
VAALType_VAAL_I64
The VAAL_I64 type maps to a C int64_t
VAALType_VAAL_PTR
The VAAL_PTR is a standard void* pointer.
VAALType_VAAL_RAW
The VAAL_RAW type is untyped and left to the caller to handle.
VAALType_VAAL_STR
The VAAL_STR type is a standard NULL-terminated C-string.
VAALType_VAAL_U8
The VAAL_U8 type maps to a C uint8_t
VAALType_VAAL_U16
The VAAL_U16 type maps to a C uint16_t
VAALType_VAAL_U32
The VAAL_U32 type maps to a C uint32_t
VAALType_VAAL_U64
The VAAL_U64 type maps to a C uint64_t
vaal_model_type_model_type_face_detection
vaal_model_type_model_type_head_pose
vaal_model_type_model_type_human_pose
vaal_model_type_model_type_none
vaal_model_type_model_type_people_detection

Functions§

vaal_boxes
Handles post-processing the model’s output and reading the bounding boxes into the user provided array of boxes, up to @param max_boxes. The function can be called with max_boxes set to 0 to cause the function to return the number of boxes detected, doing so causes the post-processing function to avoid storing the box results into @param boxes and ignoring @param max_boxes for early stopping.
vaal_check_model_string
vaal_clock_now
Returns the current monotonic time in nanoseconds.
vaal_context_cache
Retrieves the cache tensor associated with VAAL context. Cache is used for post-processing and CPU inference
vaal_context_create
Creates a VAALContext for the provided device. A context can manage a single model but many contexts can be created within an application. If device is NULL then the default DeepViewRT engine will be used which evaluates models on the CPU.
vaal_context_deepviewrt
Retrieves the DeepViewRT NNContext associated with the VAALContext. This can be used to further query the underlying NNEngine, NNModel, and other DeepViewRT API.
vaal_context_dict
Retrieves the dictionary data struct associated with the VAALContext.
vaal_context_model
Retrieves the model associated with the VAALContext.
vaal_context_release
Releases the VAALContext unloading models and releasing any data structures under the control of the context.
vaal_euler
@brief Handles post-processing of the model’s outputs and reading the euler angles into the user provided array of orientations. This function currently will only return a single set of euler angles, but will be extended in the future to have the same capability as other post-processing functions.
vaal_facedet_decode
vaal_keypoints
@brief Handles post-processing of the model’s outputs and reading the keypoints into the user provided array of keypoints, up to @param max_keypoints.
vaal_label
Returns the text value for the label. If the label is not available in the model then NULL will be returned.
vaal_load_frame_dmabuf
Loads a video frame from a dmabuf video buffer into the tensor, handling any required conversions (such as casting to floating point, if required). The frame must have a stride calculated from with and a known fourcc code, for example YUYV would need stride to be width*2 whereas NV12 would required stride to be width. For planar formats each plane must be packed sequentially, so for NV12 the UV planes must follow immediately after the Y plane.
vaal_load_frame_memory
Loads a video frame from virtual memory into the tensor, handling any required conversions (such as casting to floating point, if required). The frame must have a stride calculated from with and a known fourcc code, for example YUYV would need stride to be width*2 whereas NV12 would required stride to be width. For planar formats each plane must be packed sequentially, so for NV12 the UV planes must follow immediately after the Y plane.
vaal_load_frame_physical
Loads a video frame from physical memory into the tensor, handling any required conversions (such as casting to floating point, if required). The frame must have a stride calculated from with and a known fourcc code, for example YUYV would need stride to be width*2 whereas NV12 would required stride to be width. For planar formats each plane must be packed sequentially, so for NV12 the UV planes must follow immediately after the Y plane.
vaal_load_image
Convenience around the @ref vaal_load_frame_memory() function which will first decode the image into a raw buffer. Once the image has been decoded it will be sent to the load_frame function for further processing.
vaal_load_image_file
Convenience around the @ref vaal_load_image() function which first loads the image from a file.
vaal_load_model
Loads a model into the context. This function extends the DeepViewRT model loading API to add model parameters and enabling input/output acceleration.
vaal_load_model_file
Loads a model into the context. This function extends the DeepViewRT model loading API to add model parameters and enabling input/output acceleration.
vaal_model_path
@brief Returns the model path that VAAL will search for models requested.
vaal_model_probe
@brief Creates a VAALContext that is using the specified engine and attempts to load a model that is of the provided model type. Must call vaal_context_release on returned context, to avoid memory leak.
vaal_output_count
Returns the number of tensor outputs defined by the current model. If the context is invalid, has no model loaded, or the model does not identify any outputs then the function will return 0.
vaal_output_name
Returns the layer name from the model which corresponds to the output at the provided index. If the context is invalid, has no model loaded, or the index is out of range then the function will return NULL.
vaal_output_tensor
Access the DeepViewRT NNTensor objects for the model’s output. The function supports multiple outputs which are selected using the index parameter. To confirm the number of outputs you may use the @ref vaal_output_count() function and to read the names of the outputs as defined in the model file you may use @ref vaal_output_name().
vaal_parameter_count
Queries the number of available parameters in the current context. The count can be used along with @vaal_parameter_name() to query the names of the parameters.
vaal_parameter_get_raw
Get the raw memory address of values given a key
vaal_parameter_getf
Read the float values for a given “name” key in the context. It can be a scalar value or an array.
vaal_parameter_geti
Read the int values for a given “name” key in the context. It can be a scalar or an array.
vaal_parameter_gets
Reads the current value as a string for the parameter into the user provided string buffer. It can be called with max_value of 0 or value of NULL to query the required storage size. If length is non-NULL then the total size of the string representation will be stored, even if the actual result was truncated.
vaal_parameter_getu
Read the int values for a given “name” key in the context. It can be a scalar or an array.
vaal_parameter_info
Queries the parameter for information about the type, length, and mutability.
vaal_parameter_name
Queries the names of parameters according to the index. Note the indices are not deterministic and will vary depending on the state of the context. This function is meant to be used to lookup currently available parameter names.
vaal_parameter_set_func
Writes the function pointer into the context under a given key.
vaal_parameter_setf
Writes the provided value into the parameter. The value is provided as a float array representation.
vaal_parameter_seti
Writes the provided value into the parameter. The value is provided as a int array representation.
vaal_parameter_sets
Writes the provided value into the parameter. The value is provided as a string representation.
vaal_parameter_setu
Writes the provided value into the parameter. The value is provided as a uint32_t array representation.
vaal_postprocessing_centernet
CenterNet decoder.
vaal_postprocessing_centernet_sigmoid
YOLO decoder.
vaal_postprocessing_nms
vaal_postprocessing_ssd_standard_bbx
Box NMS.
vaal_postprocessing_yolo
vaal_remap_detection_tensors
vaal_run_model
Runs the model loaded by the VAALContext.
vaal_set_class_filter
vaal_set_detection_model_type
vaal_set_nms_type
vaal_strerror
DeepView VAAL string encoding of error enum
vaal_type_name
Returns the string name for the @ref VAALType.
vaal_type_sizeof
Returns the size of the @ref VAALType in bytes. Note that VAAL parameters can be arrays of types, so a full buffer would be length * vaal_type_sizeof.
vaal_unload_model
Unloads the model from the current context.
vaal_version
DeepView VAAL library version as MAJOR.MINOR.PATCH. The library returns a string encoding the version and also optionally sets the provided arguments.

Type Aliases§

NNContext
@struct NNContext
NNModel
@struct NNModel
NNTensor
@struct NNTensor
VAALContext
@struct VAALContext
VAALError
Enumeration of all errors provided by VAAL. Most functions will return a VAALError with VAAL_SUCCESS being zero. A common usage pattern for client code is to check for err using if (err) ... as any error condition will return non-zero.
VAALType
VAAL datatype definitions are used for identifying type information of the context parameters.
vaal_model_type