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.
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.
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.
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.
When attempting to run an operation where the input/output tensors are
of different types and the operation does not support automatic type
conversions.
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.
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.
Retrieves the DeepViewRT NNContext associated with the VAALContext. This can
be used to further query the underlying NNEngine, NNModel, and other
DeepViewRT API.
@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.
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.
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.
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.
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.
@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.
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.
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.
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().
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.
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.
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.
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.