Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstAnalytics.buffer_add_analytics_batch_meta(buffer)¶
- Parameters:
buffer (
Gst.Buffer) – A writableGst.Buffer- Returns:
The new
GstAnalytics.BatchMeta- Return type:
Adds a
GstAnalytics.BatchMetato a buffer or returns the existing oneAdded in version 1.28.
- GstAnalytics.buffer_add_analytics_relation_meta(buffer)¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Buffer- Returns:
Newly attached
GstAnalytics.RelationMeta- Return type:
Attach a analysis-results-meta-relation meta (
GstAnalytics.RelationMeta)to buffer.A
GstAnalytics.RelationMetais a metadata describing relation between other analysis meta. It’s more efficient to useGstAnalytics.buffer_add_analytics_relation_meta_fulland providing the maximum number of analysis meta that will attached to a buffer.Added in version 1.24.
- GstAnalytics.buffer_add_analytics_relation_meta_full(buffer, init_params)¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Bufferinit_params (
GstAnalytics.RelationMetaInitParams) – Initialization parameters
- Returns:
Newly attached
GstAnalytics.RelationMeta- Return type:
Attache a analysis-results relation-meta (
GstAnalytics.RelationMeta) to buffer.A
GstAnalytics.RelationMetais a metadata describing relation between other analysis meta.Added in version 1.24.
- GstAnalytics.buffer_add_tensor_meta(buffer)¶
- Parameters:
buffer (
Gst.Buffer) – A writableGst.Buffer- Returns:
The new
GstAnalytics.TensorMeta- Return type:
Adds a
GstAnalytics.TensorMetato a bufferAdded in version 1.26.
- GstAnalytics.buffer_get_analytics_batch_meta(buffer)¶
- Parameters:
buffer (
Gst.Buffer) – AGst.Buffer- Returns:
The
GstAnalytics.BatchMetaif there is one- Return type:
Gets the
GstAnalytics.BatchMetafrom a bufferAdded in version 1.28.
- GstAnalytics.buffer_get_analytics_relation_meta(buffer)¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Buffer- Returns:
The
GstAnalytics.RelationMetaif there is one- Return type:
Retrives the meta or
Noneif it doesn’t existAdded in version 1.24.
- GstAnalytics.buffer_get_tensor_meta(buffer)¶
- Parameters:
buffer (
Gst.Buffer) – AGst.Buffer- Returns:
The
GstAnalytics.TensorMetaif there is wone- Return type:
Gets the
GstAnalytics.TensorMetafrom a bufferAdded in version 1.26.
- GstAnalytics.cls_mtd_get_mtd_type()¶
- Returns:
opaque id of
GstAnalytics.Mtdtype- Return type:
Get an id identifying
GstAnalytics.Mtdtype.Added in version 1.24.
- GstAnalytics.image_util_iou_float(bb1_x, bb1_y, bb1_w, bb1_h, bb2_x, bb2_y, bb2_w, bb2_h)¶
- Parameters:
bb1_x (
float) – Bounding box 1, X coordinatebb1_y (
float) – Bounding box 1, Y coordinatebb1_w (
float) – Bounding box 1, widthbb1_h (
float) – Bounding box 1, heightbb2_x (
float) – Bounding box 2, X coordinatebb2_y (
float) – Bounding box 2, Y coordinatebb2_w (
float) – Bounding box 2, widthbb2_h (
float) – Bounding box 2, height
- Returns:
IoU of bb1 and bb2.
- Return type:
Calculate the intersection over the union (IoU) of the two areas defined by the bounding box 1 and bounding box 2. IoU is a measure of how much two regions overlap.
Added in version 1.28.
- GstAnalytics.image_util_iou_int(bb1_x, bb1_y, bb1_w, bb1_h, bb2_x, bb2_y, bb2_w, bb2_h)¶
- Parameters:
bb1_x (
int) – Bounding box 1, X coordinatebb1_y (
int) – Bounding box 1, Y coordinatebb1_w (
int) – Bounding box 1, widthbb1_h (
int) – Bounding box 1, heightbb2_x (
int) – Bounding box 2, X coordinatebb2_y (
int) – Bounding box 2, Y coordinatebb2_w (
int) – Bounding box 2, widthbb2_h (
int) – Bounding box 2, height
- Returns:
IoU of bb1 and bb2.
- Return type:
Calculate the intersection over the union (IoU) of the two areas defined by the bounding box 1 and bounding box 2. IoU is a measure of how much two regions overlap.
Added in version 1.28.
- GstAnalytics.modelinfo_load(model_filename)¶
- Parameters:
model_filename (
str) – Path to the model file (e.g., “model.onnx”, “model.tflite”)- Returns:
A new
GstAnalytics.ModelInfoinstance, orNoneif the modelinfo file could not be found or loaded.- Return type:
Load a modelinfo file associated with the given model file.
This function attempts to load a
.modelinfofile in the following order:{model_filename}.modelinfo{model_filename_without_extension}.modelinfoThe modelinfo file contains metadata for the model’s input and output tensors, including normalization ranges, dimension ordering, tensor IDs, etc.
The loaded modelinfo must be freed with
GstAnalytics.ModelInfo.free() when no longer needed.Added in version 1.28.
- GstAnalytics.mtd_type_get_name(type)¶
-
Gets the string version of the name of this type of analytics data
Added in version 1.24.
- GstAnalytics.od_mtd_get_mtd_type()¶
- Returns:
Opaque id of the
GstAnalytics.Mtdtype- Return type:
Get an id that represent object-detection metadata type
Added in version 1.24.
- GstAnalytics.relation_get_length(instance)¶
- Parameters:
instance (
GstAnalytics.RelationMeta) – Instance ofGstAnalytics.RelationMeta- Returns:
Number of analysis-meta attached to this instance.
- Return type:
Get number of relatable meta attached to instance
Added in version 1.24.
- GstAnalytics.relation_meta_api_get_type()¶
- Returns:
- Return type:
Added in version 1.24.
- GstAnalytics.segmentation_mtd_get_mtd_type()¶
- Returns:
A #GstAnalyticsMtdType type
- Return type:
Get an instance of #GstAnalyticsMtdType that represent segmentation metadata type.
Added in version 1.26.
- GstAnalytics.tensor_data_type_get_name(data_type)¶
- Parameters:
data_type (
GstAnalytics.TensorDataType) – aGstAnalytics.TensorDataType- Returns:
a constant string with the name of the data type
- Return type:
Get a string version of the data type
Added in version 1.28.
- GstAnalytics.tensor_mtd_get_mtd_type()¶
- Returns:
Opaque id of the
GstAnalytics.Mtdtype- Return type:
Get an id that represent tensor metadata type
Added in version 1.28.