# GstAnalyticsModelInfo

The GstAnalyticsModelInfo is an object storing artifical neural network model metadata describing the input and output tensors. These information's are required by inference elements.

The ".modelinfo" files describe the additional metadata for a given serialized model file such as a `.tflite`, `.onnx` or `.pte` files.

The ModelInfo files are ini-style. Each section is matched to a particular input or output tensor.

The title of the section must match the name of the tensor in the model file.

The fields used to match the modelinfo to the model are: `\[title\]`: The name of the tensor, must be unique `dims`: The dimensions as a comma-separated list of ints. -1 matches a dynamic dimension and is a wildcard `dir`: Either "input" or "output" `type`: The data type match GstTensorDataType, one of: `int4` `int8` `int16` `int32` `int64` `uint4` `uint8` `uint16` `uint32` `uint64` `float16` `float32` `float64` `bfloat16`

Based on these fields, the following metadata is applied to output tensors: `id`: The tensor ID so other elements can identity it, ideally registered in the Tensor ID Registry. `group-id`: The group ID that groups related tensors together (e.g., all outputs from the same model) `dims-order`: The dimension ordering, either "row-major" or "col-major". Defaults to "row-major" if not specified.

Those fields are applied to input tensors for normalization: `ranges`: semicolon-separated list of comma-separated pairs of floats, each representing (min, max) for a single channel or dimension. For per-channel normalization: `ranges=0.0,255.0;-1.0,1.0;0.0,1.0` (R,G,B) For single range (applies to all channels): `ranges=0.0,255.0` The inference elements will convert 8-bit input [0-255] to target ranges using: output[i] = input[i] * scale[i] + offset[i] where for each channel i: scale[i] = (max[i] - min[i]) / 255.0 offset[i] = min[i]

Common ranges: `0.0,255.0` - No normalization (passthrough, scale=1.0, offset=0.0) `0.0,1.0` - Normalized to [0,1] range (scale≈0.00392, offset=0.0) `-1.0,1.0` - Normalized to [-1,1] range (scale≈0.00784, offset=-1.0) `16.0,235.0` - TV/limited range (scale≈0.859, offset=16.0)

Other fields are ignored for now.

The API is meant to be used by inference elements

## GstAnalyticsModelInfo

The GstAnalyticsModelInfo is an object storing artifical neural network model metadata describing the input and output tensors. These information's are required by inference elements.

Since : 1.28

## GstAnalytics.ModelInfo

The GstAnalytics.ModelInfo is an object storing artifical neural network model metadata describing the input and output tensors. These information's are required by inference elements.

Since : 1.28

## GstAnalytics.ModelInfo

The GstAnalytics.ModelInfo is an object storing artifical neural network model metadata describing the input and output tensors. These information's are required by inference elements.

Since : 1.28

### Methods

#### gst_analytics_modelinfo_find_tensor_name

    gchar *
    gst_analytics_modelinfo_find_tensor_name (GstAnalyticsModelInfo * modelinfo,
                                              GstAnalyticsModelInfoTensorDirection dir,
                                              gsize index,
                                              const gchar * in_tensor_name,
                                              GstTensorDataType data_type,
                                              gsize num_dims,
                                              const gsize * dims)

Find the name of a tensor in the modelinfo that matches the given criteria.

The function performs the following checks in order:

1. If in_tensor_name is provided and exists in modelinfo, validate it matches
2. Search by index for the specified direction and validate
3. Search by dimensions and data type

Parameters:

`modelinfo` –

Instance of GstAnalyticsModelInfo

`dir` –

The tensor direction (input or output)

`index` –

The tensor index within the specified direction

`in_tensor_name` ( [nullable]) –

An optional tensor name hint to check first

`data_type` –

The tensor data type to match

`num_dims` –

The number of dimensions

`dims` ( [array length=num_dims]) –

The dimension sizes. Use -1 for dynamic dimensions.

Returns ( [nullable][transfer: full]) –

The tensor name if found, or NULL otherwise. The caller must free this with g_free when done.

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.find_tensor_name

    function GstAnalytics.ModelInfo.prototype.find_tensor_name(dir: GstAnalytics.ModelInfoTensorDirection, index: Number, in_tensor_name: String, data_type: GstAnalytics.TensorDataType, num_dims: Number, dims: [ Number ]): {
        // javascript wrapper for 'gst_analytics_modelinfo_find_tensor_name'
    }

Find the name of a tensor in the modelinfo that matches the given criteria.

The function performs the following checks in order:

1. If in_tensor_name is provided and exists in modelinfo, validate it matches
2. Search by index for the specified direction and validate
3. Search by dimensions and data type

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`dir` (GstAnalytics.ModelInfoTensorDirection) –

The tensor direction (input or output)

`index` (Number) –

The tensor index within the specified direction

`in_tensor_name` (String) –

An optional tensor name hint to check first

`data_type` (GstAnalytics.TensorDataType) –

The tensor data type to match

`num_dims` (Number) –

The number of dimensions

`dims` ([ Number ]) –

The dimension sizes. Use -1 for dynamic dimensions.

Returns (String) –

The tensor name if found, or null otherwise. The caller must free this with GLib.prototype.free when done.

Since : 1.28

#### GstAnalytics.ModelInfo.find_tensor_name

    def GstAnalytics.ModelInfo.find_tensor_name (self, dir, index, in_tensor_name, data_type, num_dims, dims):
        #python wrapper for 'gst_analytics_modelinfo_find_tensor_name'

Find the name of a tensor in the modelinfo that matches the given criteria.

The function performs the following checks in order:

1. If in_tensor_name is provided and exists in modelinfo, validate it matches
2. Search by index for the specified direction and validate
3. Search by dimensions and data type

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`dir` (GstAnalytics.ModelInfoTensorDirection) –

The tensor direction (input or output)

`index` (int) –

The tensor index within the specified direction

`in_tensor_name` (str) –

An optional tensor name hint to check first

`data_type` (GstAnalytics.TensorDataType) –

The tensor data type to match

`num_dims` (int) –

The number of dimensions

`dims` ([ int ]) –

The dimension sizes. Use -1 for dynamic dimensions.

Returns (str) –

The tensor name if found, or None otherwise. The caller must free this with GLib.free when done.

Since : 1.28

#### gst_analytics_modelinfo_free

    gst_analytics_modelinfo_free (GstAnalyticsModelInfo * model_info)

Free a modelinfo object allocated by gst_analytics_modelinfo_load.

This function should be called when the modelinfo is no longer needed to release the associated resources.

Parameters:

`model_info` ( [transfer: full][nullable]) –

Instance of GstAnalyticsModelInfo

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.free

    function GstAnalytics.ModelInfo.prototype.free(): {
        // javascript wrapper for 'gst_analytics_modelinfo_free'
    }

Free a modelinfo object allocated by GstAnalytics.ModelInfo.prototype.load.

This function should be called when the modelinfo is no longer needed to release the associated resources.

Parameters:

`model_info` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

Since : 1.28

#### GstAnalytics.ModelInfo.free

    def GstAnalytics.ModelInfo.free (self):
        #python wrapper for 'gst_analytics_modelinfo_free'

Free a modelinfo object allocated by GstAnalytics.ModelInfo.load.

This function should be called when the modelinfo is no longer needed to release the associated resources.

Parameters:

`model_info` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

Since : 1.28

#### gst_analytics_modelinfo_get_dims_order

    GstTensorDimOrder
    gst_analytics_modelinfo_get_dims_order (GstAnalyticsModelInfo * modelinfo,
                                            const gchar * tensor_name)

Retrieve the dimension ordering for a given tensor.

The dimension ordering specifies how multi-dimensional tensor data is laid out in memory:

- Row-major (C/NumPy style): Last dimension changes fastest in memory
- Column-major (Fortran style): First dimension changes fastest in memory

If not specified in the modelinfo, defaults to row-major.

Parameters:

`modelinfo` –

Instance of GstAnalyticsModelInfo

`tensor_name` –

The name of the tensor

Returns –

The dimension order as GstTensorDimOrder

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.get_dims_order

    function GstAnalytics.ModelInfo.prototype.get_dims_order(tensor_name: String): {
        // javascript wrapper for 'gst_analytics_modelinfo_get_dims_order'
    }

Retrieve the dimension ordering for a given tensor.

The dimension ordering specifies how multi-dimensional tensor data is laid out in memory:

- Row-major (C/NumPy style): Last dimension changes fastest in memory
- Column-major (Fortran style): First dimension changes fastest in memory

If not specified in the modelinfo, defaults to row-major.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (String) –

The name of the tensor

Returns (GstAnalytics.TensorDimOrder) –

The dimension order as GstAnalytics.TensorDimOrder

Since : 1.28

#### GstAnalytics.ModelInfo.get_dims_order

    def GstAnalytics.ModelInfo.get_dims_order (self, tensor_name):
        #python wrapper for 'gst_analytics_modelinfo_get_dims_order'

Retrieve the dimension ordering for a given tensor.

The dimension ordering specifies how multi-dimensional tensor data is laid out in memory:

- Row-major (C/NumPy style): Last dimension changes fastest in memory
- Column-major (Fortran style): First dimension changes fastest in memory

If not specified in the modelinfo, defaults to row-major.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (str) –

The name of the tensor

Returns (GstAnalytics.TensorDimOrder) –

The dimension order as GstAnalytics.TensorDimOrder

Since : 1.28

#### gst_analytics_modelinfo_get_group_id

    gchar *
    gst_analytics_modelinfo_get_group_id (GstAnalyticsModelInfo * modelinfo)

Get the group ID that groups related tensors together (e.g., all outputs from the same model).

The group ID is stored in the modelinfo section and is global for all tensors in the model.

Parameters:

`modelinfo` –

Instance of GstAnalyticsModelInfo

Returns ( [nullable][transfer: full]) –

The group ID string, or NULL if not found. The caller must free this with g_free when done.

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.get_group_id

    function GstAnalytics.ModelInfo.prototype.get_group_id(): {
        // javascript wrapper for 'gst_analytics_modelinfo_get_group_id'
    }

Get the group ID that groups related tensors together (e.g., all outputs from the same model).

The group ID is stored in the modelinfo section and is global for all tensors in the model.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

Returns (String) –

The group ID string, or null if not found. The caller must free this with GLib.prototype.free when done.

Since : 1.28

#### GstAnalytics.ModelInfo.get_group_id

    def GstAnalytics.ModelInfo.get_group_id (self):
        #python wrapper for 'gst_analytics_modelinfo_get_group_id'

Get the group ID that groups related tensors together (e.g., all outputs from the same model).

The group ID is stored in the modelinfo section and is global for all tensors in the model.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

Returns (str) –

The group ID string, or None if not found. The caller must free this with GLib.free when done.

Since : 1.28

#### gst_analytics_modelinfo_get_id

    gchar *
    gst_analytics_modelinfo_get_id (GstAnalyticsModelInfo * modelinfo,
                                    const gchar * tensor_name)

Get the tensor ID from the modelinfo for the specified tensor name.

The tensor ID is ideally registered in the Tensor ID Registry.

Parameters:

`modelinfo` –

Instance of GstAnalyticsModelInfo

`tensor_name` –

The name of the tensor

Returns ( [nullable][transfer: full]) –

The tensor ID string, or NULL if not found. The caller must free this with g_free when done.

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.get_id

    function GstAnalytics.ModelInfo.prototype.get_id(tensor_name: String): {
        // javascript wrapper for 'gst_analytics_modelinfo_get_id'
    }

Get the tensor ID from the modelinfo for the specified tensor name.

The tensor ID is ideally registered in the Tensor ID Registry.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (String) –

The name of the tensor

Returns (String) –

The tensor ID string, or null if not found. The caller must free this with GLib.prototype.free when done.

Since : 1.28

#### GstAnalytics.ModelInfo.get_id

    def GstAnalytics.ModelInfo.get_id (self, tensor_name):
        #python wrapper for 'gst_analytics_modelinfo_get_id'

Get the tensor ID from the modelinfo for the specified tensor name.

The tensor ID is ideally registered in the Tensor ID Registry.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (str) –

The name of the tensor

Returns (str) –

The tensor ID string, or None if not found. The caller must free this with GLib.free when done.

Since : 1.28

#### gst_analytics_modelinfo_get_input_scales_offsets

    gboolean
    gst_analytics_modelinfo_get_input_scales_offsets (GstAnalyticsModelInfo * modelinfo,
                                                      const gchar * tensor_name,
                                                      gsize num_input_ranges,
                                                      const gdouble * input_mins,
                                                      const gdouble * input_maxs,
                                                      gsize * num_output_ranges,
                                                      gdouble ** output_scales,
                                                      gdouble ** output_offsets)

Calculate normalization scales and offsets to transform input data to the target range.

This function calculates transformation parameters to convert from the actual input data range [input_min, input_max] to the target range expected by the model [target_min, target_max]: `normalized_value[i] = input[i] * output_scale[i] + output_offset[i]`

The target ranges are read from the modelinfo `ranges` field: Semicolon-separated list of comma-separated pairs (min,max) for per-channel target ranges (e.g., "0.0,255.0;-1.0,1.0;0.0,1.0" for RGB channels with different target ranges).

Common input ranges:

- [0.0, 255.0]: 8-bit unsigned (uint8)
- [-128.0, 127.0]: 8-bit signed (int8)
- [0.0, 65535.0]: 16-bit unsigned (uint16)
- [-32768.0, 32767.0]: 16-bit signed (int16)
- [0.0, 1.0]: Normalized float
- [-1.0, 1.0]: Normalized signed float

The number of input ranges (@num_input_ranges) must equal the number of target ranges in the modelinfo. The function will return FALSE if they don't match.

The caller must free output_scales and output_offsets with g_free when done.

Parameters:

`modelinfo` –

Instance of GstAnalyticsModelInfo

`tensor_name` –

The name of the tensor

`num_input_ranges` –

The number of input ranges (channels/dimensions)

`input_mins` ( [array length=num_input_ranges]) –

The minimum values of the actual input data for each channel

`input_maxs` ( [array length=num_input_ranges]) –

The maximum values of the actual input data for each channel

`num_output_ranges` ( [out]) –

The number of output ranges/scale-offset pairs

`output_scales` ( [out][transfer: full][array length=num_output_ranges]) –

The scale values for normalization

`output_offsets` ( [out][transfer: full][array length=num_output_ranges]) –

The offset values for normalization

Returns –

TRUE on success, FALSE on error, if ranges field is not found, or if num_input_ranges doesn't match the number of target ranges in the modelinfo

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.get_input_scales_offsets

    function GstAnalytics.ModelInfo.prototype.get_input_scales_offsets(tensor_name: String, num_input_ranges: Number, input_mins: [ Number ], input_maxs: [ Number ]): {
        // javascript wrapper for 'gst_analytics_modelinfo_get_input_scales_offsets'
    }

Calculate normalization scales and offsets to transform input data to the target range.

This function calculates transformation parameters to convert from the actual input data range [input_min, input_max] to the target range expected by the model [target_min, target_max]: `normalized_value[i] = input[i] * output_scale[i] + output_offset[i]`

The target ranges are read from the modelinfo `ranges` field: Semicolon-separated list of comma-separated pairs (min,max) for per-channel target ranges (e.g., "0.0,255.0;-1.0,1.0;0.0,1.0" for RGB channels with different target ranges).

Common input ranges:

- [0.0, 255.0]: 8-bit unsigned (uint8)
- [-128.0, 127.0]: 8-bit signed (int8)
- [0.0, 65535.0]: 16-bit unsigned (uint16)
- [-32768.0, 32767.0]: 16-bit signed (int16)
- [0.0, 1.0]: Normalized float
- [-1.0, 1.0]: Normalized signed float

The number of input ranges (@num_input_ranges) must equal the number of target ranges in the modelinfo. The function will return FALSE if they don't match.

The caller must free output_scales and output_offsets with GLib.prototype.free when done.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (String) –

The name of the tensor

`num_input_ranges` (Number) –

The number of input ranges (channels/dimensions)

`input_mins` ([ Number ]) –

The minimum values of the actual input data for each channel

`input_maxs` ([ Number ]) –

The maximum values of the actual input data for each channel

Returns a tuple made of:

(Number ) –

true on success, false on error, if ranges field is not found, or if num_input_ranges doesn't match the number of target ranges in the modelinfo

`num_output_ranges` (Number ) –

true on success, false on error, if ranges field is not found, or if num_input_ranges doesn't match the number of target ranges in the modelinfo

`output_scales` ([ Number ] ) –

true on success, false on error, if ranges field is not found, or if num_input_ranges doesn't match the number of target ranges in the modelinfo

`output_offsets` ([ Number ] ) –

true on success, false on error, if ranges field is not found, or if num_input_ranges doesn't match the number of target ranges in the modelinfo

Since : 1.28

#### GstAnalytics.ModelInfo.get_input_scales_offsets

    def GstAnalytics.ModelInfo.get_input_scales_offsets (self, tensor_name, num_input_ranges, input_mins, input_maxs):
        #python wrapper for 'gst_analytics_modelinfo_get_input_scales_offsets'

Calculate normalization scales and offsets to transform input data to the target range.

This function calculates transformation parameters to convert from the actual input data range [input_min, input_max] to the target range expected by the model [target_min, target_max]: `normalized_value[i] = input[i] * output_scale[i] + output_offset[i]`

The target ranges are read from the modelinfo `ranges` field: Semicolon-separated list of comma-separated pairs (min,max) for per-channel target ranges (e.g., "0.0,255.0;-1.0,1.0;0.0,1.0" for RGB channels with different target ranges).

Common input ranges:

- [0.0, 255.0]: 8-bit unsigned (uint8)
- [-128.0, 127.0]: 8-bit signed (int8)
- [0.0, 65535.0]: 16-bit unsigned (uint16)
- [-32768.0, 32767.0]: 16-bit signed (int16)
- [0.0, 1.0]: Normalized float
- [-1.0, 1.0]: Normalized signed float

The number of input ranges (@num_input_ranges) must equal the number of target ranges in the modelinfo. The function will return FALSE if they don't match.

The caller must free output_scales and output_offsets with GLib.free when done.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (str) –

The name of the tensor

`num_input_ranges` (int) –

The number of input ranges (channels/dimensions)

`input_mins` ([ float ]) –

The minimum values of the actual input data for each channel

`input_maxs` ([ float ]) –

The maximum values of the actual input data for each channel

Returns a tuple made of:

(bool ) –

True on success, False on error, if ranges field is not found, or if num_input_ranges doesn't match the number of target ranges in the modelinfo

`num_output_ranges` (int ) –

True on success, False on error, if ranges field is not found, or if num_input_ranges doesn't match the number of target ranges in the modelinfo

`output_scales` ([ float ] ) –

True on success, False on error, if ranges field is not found, or if num_input_ranges doesn't match the number of target ranges in the modelinfo

`output_offsets` ([ float ] ) –

True on success, False on error, if ranges field is not found, or if num_input_ranges doesn't match the number of target ranges in the modelinfo

Since : 1.28

#### gst_analytics_modelinfo_get_quark_group_id

    GQuark
    gst_analytics_modelinfo_get_quark_group_id (GstAnalyticsModelInfo * modelinfo)

Get the group ID as a GQuark for efficient string comparison and storage.

Using GQuark is more efficient than string comparison when you need to compare multiple group IDs.

Parameters:

`modelinfo` –

Instance of GstAnalyticsModelInfo

Returns –

The GQuark of the group ID, or 0 if not found

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.get_quark_group_id

    function GstAnalytics.ModelInfo.prototype.get_quark_group_id(): {
        // javascript wrapper for 'gst_analytics_modelinfo_get_quark_group_id'
    }

Get the group ID as a GQuark for efficient string comparison and storage.

Using GQuark is more efficient than string comparison when you need to compare multiple group IDs.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

Returns (GLib.Quark) –

The GQuark of the group ID, or 0 if not found

Since : 1.28

#### GstAnalytics.ModelInfo.get_quark_group_id

    def GstAnalytics.ModelInfo.get_quark_group_id (self):
        #python wrapper for 'gst_analytics_modelinfo_get_quark_group_id'

Get the group ID as a GQuark for efficient string comparison and storage.

Using GQuark is more efficient than string comparison when you need to compare multiple group IDs.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

Returns (GLib.Quark) –

The GQuark of the group ID, or 0 if not found

Since : 1.28

#### gst_analytics_modelinfo_get_quark_id

    GQuark
    gst_analytics_modelinfo_get_quark_id (GstAnalyticsModelInfo * modelinfo,
                                          const gchar * tensor_name)

Get the tensor ID as a GQuark for efficient string comparison and storage.

Using GQuark is more efficient than string comparison when you need to compare multiple IDs.

Parameters:

`modelinfo` –

Instance of GstAnalyticsModelInfo

`tensor_name` –

The name of the tensor

Returns –

The GQuark of the tensor ID, or 0 if not found

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.get_quark_id

    function GstAnalytics.ModelInfo.prototype.get_quark_id(tensor_name: String): {
        // javascript wrapper for 'gst_analytics_modelinfo_get_quark_id'
    }

Get the tensor ID as a GQuark for efficient string comparison and storage.

Using GQuark is more efficient than string comparison when you need to compare multiple IDs.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (String) –

The name of the tensor

Returns (GLib.Quark) –

The GQuark of the tensor ID, or 0 if not found

Since : 1.28

#### GstAnalytics.ModelInfo.get_quark_id

    def GstAnalytics.ModelInfo.get_quark_id (self, tensor_name):
        #python wrapper for 'gst_analytics_modelinfo_get_quark_id'

Get the tensor ID as a GQuark for efficient string comparison and storage.

Using GQuark is more efficient than string comparison when you need to compare multiple IDs.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (str) –

The name of the tensor

Returns (GLib.Quark) –

The GQuark of the tensor ID, or 0 if not found

Since : 1.28

#### gst_analytics_modelinfo_get_target_ranges

    gboolean
    gst_analytics_modelinfo_get_target_ranges (GstAnalyticsModelInfo * modelinfo,
                                               const gchar * tensor_name,
                                               gsize * num_ranges,
                                               gdouble ** mins,
                                               gdouble ** maxs)

Retrieve all target ranges (min/max pairs) expected by the model for a given tensor.

This function retrieves all target ranges from the `ranges` field in the modelinfo. Each range represents the expected input range for a channel or dimension that the model requires.

The function reads from the `ranges` field: Semicolon-separated list of comma-separated pairs (min,max) for per-channel target ranges (e.g., "0.0,1.0;-1.0,1.0;0.0,1.0" for RGB channels with different normalization targets).

The caller must free mins and maxs with g_free when done.

Parameters:

`modelinfo` –

Instance of GstAnalyticsModelInfo

`tensor_name` –

The name of the tensor

`num_ranges` ( [out]) –

The number of ranges

`mins` ( [out][transfer: full][array length=num_ranges]) –

The minimum values for each target range

`maxs` ( [out][transfer: full][array length=num_ranges]) –

The maximum values for each target range

Returns –

TRUE if range information was found and valid, FALSE otherwise

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.get_target_ranges

    function GstAnalytics.ModelInfo.prototype.get_target_ranges(tensor_name: String): {
        // javascript wrapper for 'gst_analytics_modelinfo_get_target_ranges'
    }

Retrieve all target ranges (min/max pairs) expected by the model for a given tensor.

This function retrieves all target ranges from the `ranges` field in the modelinfo. Each range represents the expected input range for a channel or dimension that the model requires.

The function reads from the `ranges` field: Semicolon-separated list of comma-separated pairs (min,max) for per-channel target ranges (e.g., "0.0,1.0;-1.0,1.0;0.0,1.0" for RGB channels with different normalization targets).

The caller must free mins and maxs with GLib.prototype.free when done.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (String) –

The name of the tensor

Returns a tuple made of:

(Number ) –

true if range information was found and valid, false otherwise

`num_ranges` (Number ) –

true if range information was found and valid, false otherwise

`mins` ([ Number ] ) –

true if range information was found and valid, false otherwise

`maxs` ([ Number ] ) –

true if range information was found and valid, false otherwise

Since : 1.28

#### GstAnalytics.ModelInfo.get_target_ranges

    def GstAnalytics.ModelInfo.get_target_ranges (self, tensor_name):
        #python wrapper for 'gst_analytics_modelinfo_get_target_ranges'

Retrieve all target ranges (min/max pairs) expected by the model for a given tensor.

This function retrieves all target ranges from the `ranges` field in the modelinfo. Each range represents the expected input range for a channel or dimension that the model requires.

The function reads from the `ranges` field: Semicolon-separated list of comma-separated pairs (min,max) for per-channel target ranges (e.g., "0.0,1.0;-1.0,1.0;0.0,1.0" for RGB channels with different normalization targets).

The caller must free mins and maxs with GLib.free when done.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

`tensor_name` (str) –

The name of the tensor

Returns a tuple made of:

(bool ) –

True if range information was found and valid, False otherwise

`num_ranges` (int ) –

True if range information was found and valid, False otherwise

`mins` ([ float ] ) –

True if range information was found and valid, False otherwise

`maxs` ([ float ] ) –

True if range information was found and valid, False otherwise

Since : 1.28

#### gst_analytics_modelinfo_get_version

    gchar *
    gst_analytics_modelinfo_get_version (GstAnalyticsModelInfo * modelinfo)

Retrieve the version string of the modelinfo file format.

The version is in the format "Major.Minor" and is stored in the [modelinfo] section of the modelinfo file.

Parameters:

`modelinfo` –

Instance of GstAnalyticsModelInfo

Returns ( [transfer: full]) –

The version string (e.g., "1.0"). The caller must free this with g_free when done. Defaults to "1.0" if not specified.

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.get_version

    function GstAnalytics.ModelInfo.prototype.get_version(): {
        // javascript wrapper for 'gst_analytics_modelinfo_get_version'
    }

Retrieve the version string of the modelinfo file format.

The version is in the format "Major.Minor" and is stored in the [modelinfo] section of the modelinfo file.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

Returns (String) –

The version string (e.g., "1.0"). The caller must free this with GLib.prototype.free when done. Defaults to "1.0" if not specified.

Since : 1.28

#### GstAnalytics.ModelInfo.get_version

    def GstAnalytics.ModelInfo.get_version (self):
        #python wrapper for 'gst_analytics_modelinfo_get_version'

Retrieve the version string of the modelinfo file format.

The version is in the format "Major.Minor" and is stored in the [modelinfo] section of the modelinfo file.

Parameters:

`modelinfo` (GstAnalytics.ModelInfo) –

Instance of GstAnalytics.ModelInfo

Returns (str) –

The version string (e.g., "1.0"). The caller must free this with GLib.free when done. Defaults to "1.0" if not specified.

Since : 1.28

### Functions

#### gst_analytics_modelinfo_load

    GstAnalyticsModelInfo *
    gst_analytics_modelinfo_load (const gchar * model_filename)

Load a modelinfo file associated with the given model file.

This function attempts to load a `.modelinfo` file in the following order:

1. `{model_filename}.modelinfo`
2. `{model_filename_without_extension}.modelinfo`

The 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 gst_analytics_modelinfo_free when no longer needed.

Parameters:

`model_filename` ( [type filename]) –

Path to the model file (e.g., "model.onnx", "model.tflite")

Returns ( [transfer: full][nullable]) –

A new GstAnalyticsModelInfo instance, or NULL if the modelinfo file could not be found or loaded.

Since : 1.28

#### GstAnalytics.ModelInfo.prototype.load

    function GstAnalytics.ModelInfo.prototype.load(model_filename: filename): {
        // javascript wrapper for 'gst_analytics_modelinfo_load'
    }

Load a modelinfo file associated with the given model file.

This function attempts to load a `.modelinfo` file in the following order:

1. `{model_filename}.modelinfo`
2. `{model_filename_without_extension}.modelinfo`

The 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.prototype.free when no longer needed.

Parameters:

`model_filename` (filename) –

Path to the model file (e.g., "model.onnx", "model.tflite")

Returns (GstAnalytics.ModelInfo) –

A new GstAnalytics.ModelInfo instance, or null if the modelinfo file could not be found or loaded.

Since : 1.28

#### GstAnalytics.ModelInfo.load

    def GstAnalytics.ModelInfo.load (model_filename):
        #python wrapper for 'gst_analytics_modelinfo_load'

Load a modelinfo file associated with the given model file.

This function attempts to load a `.modelinfo` file in the following order:

1. `{model_filename}.modelinfo`
2. `{model_filename_without_extension}.modelinfo`

The 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.

Parameters:

`model_filename` (str) –

Path to the model file (e.g., "model.onnx", "model.tflite")

Returns (GstAnalytics.ModelInfo) –

A new GstAnalytics.ModelInfo instance, or None if the modelinfo file could not be found or loaded.

Since : 1.28

## Enumerations

### GstAnalyticsModelInfoTensorDirection

##### Members

`MODELINFO_DIRECTION_UNKNOWN` (0) –

Tensor location is unknown

`MODELINFO_DIRECTION_INPUT` (1) –

Input tensor

`MODELINFO_DIRECTION_OUTPUT` (2) –

Output tensor

Since : 1.28

### GstAnalytics.ModelInfoTensorDirection

##### Members

`GstAnalytics.ModelInfoTensorDirection.UNKNOWN` (0) –

Tensor location is unknown

`GstAnalytics.ModelInfoTensorDirection.INPUT` (1) –

Input tensor

`GstAnalytics.ModelInfoTensorDirection.OUTPUT` (2) –

Output tensor

Since : 1.28

### GstAnalytics.ModelInfoTensorDirection

##### Members

`GstAnalytics.ModelInfoTensorDirection.UNKNOWN` (0) –

Tensor location is unknown

`GstAnalytics.ModelInfoTensorDirection.INPUT` (1) –

Input tensor

`GstAnalytics.ModelInfoTensorDirection.OUTPUT` (2) –

Output tensor

Since : 1.28

## Constants

### GST_ANALYTICS_MODELINFO_TYPE

    #define GST_ANALYTICS_MODELINFO_TYPE (gst_analytics_modelinfo_get_type())

The model info type

Since : 1.28

### GST_MODELINFO_SECTION_NAME

    #define GST_MODELINFO_SECTION_NAME "modelinfo"

The name of the modelinfo header section

Since : 1.28

### GstAnalytics.MODELINFO_SECTION_NAME

The name of the modelinfo header section

Since : 1.28

### GstAnalytics.MODELINFO_SECTION_NAME

The name of the modelinfo header section

Since : 1.28

### GST_MODELINFO_VERSION_MAJOR

    #define GST_MODELINFO_VERSION_MAJOR (1)

The current major version of the modelinfo format

Since : 1.28

### GstAnalytics.MODELINFO_VERSION_MAJOR

The current major version of the modelinfo format

Since : 1.28

### GstAnalytics.MODELINFO_VERSION_MAJOR

The current major version of the modelinfo format

Since : 1.28

### GST_MODELINFO_VERSION_MINOR

    #define GST_MODELINFO_VERSION_MINOR (0)

The current minor version of the modelinfo format

Since : 1.28

### GstAnalytics.MODELINFO_VERSION_MINOR

The current minor version of the modelinfo format

Since : 1.28

### GstAnalytics.MODELINFO_VERSION_MINOR

The current minor version of the modelinfo format

Since : 1.28

### GST_MODELINFO_VERSION_STR

    #define GST_MODELINFO_VERSION_STR "1.0"

The current version string for the modelinfo format. This MUST be updated whenever the format changes.

Since : 1.28

### GstAnalytics.MODELINFO_VERSION_STR

The current version string for the modelinfo format. This MUST be updated whenever the format changes.

Since : 1.28

### GstAnalytics.MODELINFO_VERSION_STR

The current version string for the modelinfo format. This MUST be updated whenever the format changes.

Since : 1.28

The results of the search are