Crate vaal_sys

source ·

Structs

  • 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.
  • @struct VAALEuler
  • @struct VAALKeypoint

Constants

Functions

  • 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.
  • Returns the current monotonic time in nanoseconds.
  • Retrieves the cache tensor associated with VAAL context. Cache is used for post-processing and CPU inference
  • 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.
  • Retrieves the dictionary data struct associated with the VAALContext.
  • Retrieves the model associated with the VAALContext.
  • Releases the VAALContext unloading models and releasing any data structures under the control of the context.
  • @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.
  • @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.
  • Returns the text value for the label. If the label is not available in the model then NULL will be returned.
  • 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.
  • Convenience around the @ref vaal_load_image() function which first loads the image from a file.
  • Loads a model into the context. This function extends the DeepViewRT model loading API to add model parameters and enabling input/output acceleration.
  • Loads a model into the context. This function extends the DeepViewRT model loading API to add model parameters and enabling input/output acceleration.
  • @brief Returns the model path that VAAL will search for models requested.
  • @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.
  • Get the raw memory address of values given a key
  • Read the float values for a given “name” key in the context. It can be a scalar value or an array.
  • Read the int values for a given “name” key in the context. It can be a scalar or an array.
  • 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.
  • Read the int values for a given “name” key in the context. It can be a scalar or an array.
  • Queries the parameter for information about the type, length, and mutability.
  • 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.
  • Writes the function pointer into the context under a given key.
  • Writes the provided value into the parameter. The value is provided as a float array representation.
  • Writes the provided value into the parameter. The value is provided as a int array representation.
  • Writes the provided value into the parameter. The value is provided as a string representation.
  • Writes the provided value into the parameter. The value is provided as a uint32_t array representation.
  • CenterNet decoder.
  • YOLO decoder.
  • Box NMS.
  • Runs the model loaded by the VAALContext.
  • DeepView VAAL string encoding of error enum
  • Returns the string name for the @ref VAALType.
  • 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.
  • Unloads the model from the current context.
  • DeepView VAAL library version as MAJOR.MINOR.PATCH. The library returns a string encoding the version and also optionally sets the provided arguments.

Type Definitions

  • @struct NNContext
  • @struct NNModel
  • @struct NNTensor
  • @struct VAALContext
  • 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.
  • VAAL datatype definitions are used for identifying type information of the context parameters.