Difference between revisions of "GstInference/Metadatas/GstDetectionMeta"

From RidgeRun Developer Connection
Jump to: navigation, search
(Created page with "<noinclude> {{GstInference/Head|previous=Supported architectures/MobileNet|next=Supported backends/NCSDK|keywords=GstInference backends}} </noinclude> <!-- If you want a cust...")
 
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
{{GstInference/Head|previous=Supported architectures/MobileNet|next=Supported backends/NCSDK|keywords=GstInference backends}}
+
{{GstInference/Head|previous=Metadatas/GstEmbeddingMeta|next=Supported backends/NCSDK|keywords=GstInference backends}}
 
</noinclude>
 
</noinclude>
  
Line 31: Line 31:
  
 
<noinclude>
 
<noinclude>
{{GstInference/Foot|Supported architectures/TinyYoloV2|Supported backends/NCSDK}}
+
{{GstInference/Foot|Metadatas/GstEmbeddingMeta|Supported backends/NCSDK}}
 
</noinclude>
 
</noinclude>

Revision as of 11:23, 8 November 2019



Previous: Metadatas/GstEmbeddingMeta Index Next: Supported backends/NCSDK





This metadata consist on an array of bounding boxes, that were previously filtered on the detection element to remove low probability and duplicated boxes.

Fields

All detection elements on GstInference use the same metadata standard. GstDetectionMeta consist on the following fields:

  • num_boxes: The number of boxes outputted by the model. This can vary over time.
  • boxes: The array of bounding boxes.

Each bounding box is an struct with:

  • label: The label represented
  • prob: The probability of the box. Note that probability on detection works different from classification. This probability does not reflect actual probability but rather the certainty level of the neural network.
  • x: X coordinate (top left corner)
  • y: Y coordinate (top left corner)
  • width: Box width
  • height: Box height

Access metadata

If you want to access this metadata from your custom Gstreamer element instead the process is fairly easy:

  1. Add a GstInference detection element such as TinyYoloV2 to your pipeline
  2. Include GstInference metadata header: #include "gst/r2inference/gstinferencemeta.h"
  3. Get a GstDetectionMeta object from the buffer: detect_meta = (GstDetectionMeta *) gst_buffer_get_meta (frame->buffer, GST_DETECTION_META_API_TYPE);

All GstInference detection elements also raise a signal containing GstDetectionMeta, for details on how to use this signal please check the example applications section.


Previous: Metadatas/GstEmbeddingMeta Index Next: Supported backends/NCSDK