.. Copyright 2021 Xilinx, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ############################################## VVAS GStreamer Inference Meta Data Structures ############################################## This section covers details about the GStreamer Meta Data structures to host inference meta data produced by the machine learning (ML) inference acceleration software libraries. This metadata structure stores the inferred data generated at multiple levels of ML operation into a single structure in a hierarchical way. This data structure combines, and stores metadata generated by detection and classification models. The GStreamer plug-ins can set and get inference metadata from the GstBuffer by using the `gst_buffer_add_meta ()` API and `gst_buffer_get_meta ()` API, respectively. ***************** GstInferenceMeta ***************** .. c:struct:: GstInferenceMeta GstInferenceMeta is the root node of the inference metadata. GstInferencePrediction hosts the actual inference metadata. **Definition** :: struct GstInferenceMeta { GstMeta meta; GstInferencePrediction *prediction; }; **Members** ``meta`` Buffer metadata ``prediction`` Contains all the predictions associated to this node *********************** GstInferencePrediction *********************** .. c:struct:: GstInferencePrediction This structure represents the inference data generated from the ML operation **Definition** :: struct GstInferencePrediction { GstMiniObject base; GMutex mutex; GstBuffer *sub_buffer; VvasInferPrediction prediction; void *reserved_1; void *reserved_2; void *reserved_3; void *reserved_4; void *reserved_5; }; **Members** ``base`` private base object ``mutex`` mutex ``sub_buffer`` buffer contains cropped images for cascade usecase ``prediction`` VVAS core inference structure refe to :doc:`VVASInferPrediction <./vvas_infer_prediction>` ``reserved_1`` for future extension ``reserved_2`` for future extension ``reserved_3`` for future extension ``reserved_4`` for future extension ``reserved_5`` for future extension *************************** GstInferenceClassification *************************** .. c:struct:: GstInferenceClassification This structure stores the results of the ML operation by the classification network **Definition** :: struct GstInferenceClassification { GstMiniObject base; GMutex mutex; VvasInferClassification classification; }; **Members** ``base`` private base object ``mutex`` mutex ``classification`` VVAS core inference structure :doc:`VVASInferClassification <./vvas_infer_classification>` .. ------------ MIT License Copyright (c) 2023 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.