GstInference/Metadatas/GstEmbeddingMeta: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
{{GstInference/Head|previous=Supported architectures/MobileNet|next=Supported backends/NCSDK|keywords=GstInference backends}}
{{GstInference/Head|previous=Metadatas/GstClassificationMeta|next=Metadatas/GstDetectionMeta|keywords=GstInference backends}}
</noinclude>
</noinclude>


Line 23: Line 23:


<noinclude>
<noinclude>
{{GstInference/Foot|Supported architectures/TinyYoloV2|Supported backends/NCSDK}}
{{GstInference/Foot|Metadatas/GstClassificationMeta|Metadatas/GstDetectionMeta}}
</noinclude>
</noinclude>

Revision as of 16:22, 8 November 2019




Previous: Metadatas/GstClassificationMeta Index Next: Metadatas/GstDetectionMeta





This metadata consist on an 128 elements array, that is filed with the embedding produced by facenet. This element draws a green border and writes "Pass" on the frame if its embedding is close to a known value or a red border and "Fail" otherwise.

Fields

The facenet element and embedding overlay uses similar metadata as the classification plugins. GstEmbeddingMeta consist on the following fields:

  • num_dimensions: The number of labels outputted by the model. This can vary from model to model. Facenet uses 128.
  • embedding: The embedding produced by the network

Access metadata

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

  1. Add the Facenet element to your pipeline
  2. Include GstInference metadata header: #include "gst/r2inference/gstinferencemeta.h"
  3. Get a GstClassificationMeta object from the buffer: class_meta = (GstClassificationMeta *) gst_buffer_get_meta (frame->buffer, GST_CLASSIFICATION_META_API_TYPE);

FaceNet also raises a signal containing GstClassificationMeta, for details on how to use this signal please check the example applications section.


Previous: Metadatas/GstClassificationMeta Index Next: Metadatas/GstDetectionMeta