This sample demonstrates how gvametaconvert and gvametapublish elements are used in a typical DL Streamer pipeline. By placing these elements to the end of a pipeline that performs face detection and emotion classification, you will quickly see how these elements enable publishing of pipeline metadata to an output file, in-memory fifo, or a popular message bus.
These elements are useful for cases where you need to record outcomes (e.g., emitting inferences) of your DL Streamer pipeline to applications running locally or across distributed systems.
The sample utilizes GStreamer command-line tool
gst-launch-1.0 which can build and run GStreamer pipeline described in a string format. The string contains a list of GStreamer elements separated by exclamation mark
!, each element may have properties specified in the format
Overall this sample builds GStreamer pipeline of the following elements:
v4l2srcfor input from file/URL/web-camera
decodebinfor video decoding
fakesinkto terminate the pipeline output without actually rendering video frames.
NOTE: The sample sets property 'json-indent=4' in gvametaconvert element for generating JSON in pretty print format with 4 spaces indent. Remove this property to generate JSON without pretty print.
The sample uses by default the following pre-trained models from OpenVINO™ Toolkit Open Model Zoo
NOTE: Before running samples (including this one), run script
download_models.shonce (the script located in
samplestop folder) to download all models required for this and other samples.
The sample contains
model_proc subfolder with .json files for each model with description of model input/output formats and post-processing rules for classification models.
This sample takes up to four command-line parameters. If no parameters specified, the sample displays pretty printed JSON messages to console (METHOD=file, OUTPUT=stdout)
NOTE: Before running this sample with output to MQTT or Kafka, refer to *this page* how to set up a MQTT or Kafka listener to consume and review results in the console.
```sh ./metapublish.sh [INPUT] [METHOD] [OUTPUT] [TOPIC] ```