Pipeline
SpatialML pipeline.
Each pipeline defines a computation graph of tensors. A pipeline will not be run until it is submitted, and each submission will schedule one execution of the whole pipeline. One submitted execution will be put onto one thread in the backend, so that multiple submitted pipelines can be run concurrently.
Throws
If the usage is not allowed by the SpatialML run-time Framework, or if the framework encounter internal error and cannot perform the requested behavior.
Types
Color conversion types.
Model inference type, determining what inference engine the algorithm model will be run on, and what hardware backend will be used to accelerate the model inference.
The association of a node in a model (QNN, TFLite, etc.) computation graph and a pipeline tensor.
Normalization type for normalize.
Norm type for norm.
The handle to one submitted pipeline run task.
Enum to determine how a matrix will be sorted.
Horizontal alignment that can be used to update SceneGraphProperty.Text.HorizontalAlignment.
Vertical alignment that can be used to update SceneGraphProperty.Text.VerticalAlignment.
Properties
The BaseHandle's implementation's destructor.
A helper getter to create a new local tensor in-place for an android android.graphics.Color. The R, G, B, and A values of the provided color will be set as the tensor's content automatically.
A helper getter to create a new local tensor in-place for a android android.graphics.Point. The X and Y values of the provided point will be set as the tensor's content automatically.
A helper getter to create a new local tensor in-place for an array of android.graphics.Color. The R, G, B, and A values of the provided colors will be set as the tensor's content automatically.
A helper getter to create a new local tensor in-place for an array of android android.graphics.Point. The X and Y values of the provided points will be set as the tensor's content automatically.
A helper getter to create a new local tensor in-place for a single byte scalar.
A helper getter to create a new local tensor in-place for a single double scalar.
A helper getter to create a new local tensor in-place for double array
A helper getter to create a new local tensor in-place for a single float scalar.
A helper getter to create a new local tensor in-place for a float array.
A helper getter to create a new local tensor in-place for a single int scalar.
A helper getter to create a new local tensor in-place for an int array.
A helper getter to create a new local tensor in-place for a single short scalar.
A helper getter to create a new local tensor in-place for a short array.
A helper getter to create a new local tensor in-place for a string.
Functions
Apply the affine transform on 2D image.
Apply the affine transform on 2D points rather than 2D images.
Defines an arithmetic operator to the pipeline. An arithmetic operator takes in an array of PipelineTensor (size of which must be no more than 10), and write the arithmetic result into result. The arithmetic expression to be executed is defined by expression.
Perform an bitwise-and of two input tensors.
Perform a byte-wise all on all the values constituting the tensor.
Perform a byte-wise any on all the values constituting the tensor.
Convert the color, e.g. RGB-to-Grayscale, RGB-to-BGR, etc.
Copy from a slice of one pipeline tensor to a slice of another tensor. The slice of the copy source must contain the same number of values as the total number of values in the copy destination.
Copy from one slice of a pipeline tensor to another. The slice of the copy source must contain the same number of values as the total number of values in the copy destination.
Copy from one pipeline tensor to a slice of another tensor. The slice of the copy source must contain the same number of values as the total number of values in the copy destination.
Perform an elementwise-max of two input tensors.
Perform an elementwise-min of two input tensors.
Perform an elementwise-multiplication of two input tensors.
Convenient method to directly create a slice of a GlobalTensor using bracket operators from a tensor. This operator overload allows SpatialML framework users to apply tensors output from previous steps as a dynamic slices.
Convenient method to directly create a slice of a GlobalTensor using bracket operators from IntProgression. Different from the overloaded method that uses IntRange as inputs, IntProgression allows skip and backward iteration. Similarly, there must be the same number of IntProgression inputs as the number of this tensor's dimensions
Convenient method to directly create a slice of a GlobalTensor using bracket operators from IntRanges like 0..5, 1..2.
Perform an elementwise-large-equal comparison of two input tensors.
Perform an elementwise-large-than comparison of two input tensors.
Compute the 4x4 transform matrix for translation, rotation and scale.
A helper function to create a new local tensor in-place for an android android.graphics.Color. The R, G, B, and A values of the provided color will be set as the tensor's content automatically.
A helper function to create a new local tensor in-place for a android android.graphics.Point. The X and Y values of the provided point will be set as the tensor's content automatically.
Create a new local tensor inside this pipeline. The tensor have memory allocated local to the pipeline.
A helper function to create a new local tensor in-place for an array of android.graphics.Color. The R, G, B, and A values of the provided colors will be set as the tensor's content automatically.
A helper function to create a new local tensor in-place for an array of android android.graphics.Point. The X and Y values of the provided points will be set as the tensor's content automatically.
A helper function to create a new local tensor in-place for a single character.
A helper function to create a new local tensor in-place for a single double scalar.
A helper function to create a new local tensor in-place for a double array.
A helper function to create a new local tensor in-place for a single float scalar.
A helper function to create a new local tensor in-place for a float array.
A helper function to create a new local tensor in-place for a single int scalar.
A helper function to create a new local tensor in-place for an int array.
A helper function to create a new local tensor in-place for a single short scalar.
A helper function to create a new local tensor in-place for a short array.
A helper function to create a new local tensor in-place for a string.
Create a new placeholder tensor inside this pipeline. Different from a local tensor, a placeholder tensor has no local memory allocated in the pipeline's scope; on the contrary, the placeholder must refer to a compatible global tensor when the pipeline is submitted for execution.
Create a new placeholder tensor inside this pipeline with guarantee compatibility with the a GlobalTensor, i.e., the newly created placeholder share the same configuration with the GlobalTensor. Note: a placeholder tensor has no local memory allocated in the pipeline's scope; on the contrary, the placeholder must refer to a compatible global tensor when the pipeline is submitted for execution.
Create an SpatialML scene from a glTF file already loaded into SharedMemory. Similar to SpatialMLSession.newSceneFromGLTF but that one creates a global scene graph handle, so that multiple pipelines can share, whereas this method creates one scene graph local to the pipeline only.
Compute the norm of a tensor.
Obtain the latest camera images. The images will be rectified internal against len distortion.
Run the inference of an algorithm model provided in binary package.
Perform singular value decomposition of a matrix.
Perform an elementwise-smaller-equal comparison of two input tensors.
Perform an elementwise-smaller-than comparison of two input tensors.
Run the OpenCV solve PnP algorithm. Solve PnP reverses the camera projection procedure: given the projected result (2D points) of the vertices of a mesh, and the original 3D coordinates of the mesh vertices corresponding to the mesh's local space, inferring the most likely pose of the mesh corresponding to the camera space.
Sort a matrix, column-by-column or row-by-row.
Submit the pipeline for one run. Note: the method only submits the run as a task, and SpatialML framework will schedule the task based on its waitFor task, the GlobalTensor it will access, and the current computation resource availability.
Switch tensor content between a CHW and HWC format. A tensor of CHW format means it is a multi-dimensional tensor of 1 channel, 3 dimensions: CxHxW. A tensor of HWC format means it is a multi-dimensional tensor of C channels, 2 dimensions: HxW.
Control the visibility of an already-loaded scene graph tensor.
Update data of a specified component property in the scene graph, using the values from a tensor.
Update data of text content of a text component in the scene graph using a text String.
Update data of horizontal alignment of a text component in the scene graph using the alignment enum defined in TextHorizontalAlignment.
Update data of vertical alignment of a text component in the scene graph using the alignment enum defined in TextVerticalAlignment.