how to add the yolo-plugins metadatas to the output-file like all_bbox_00.txt/kitti

Hello, I have run nvgstiva-app -c ${HOME}/deepstream_reference_apps-DS2/config/nvgstiva-app_yolo_config.txt successfully. The accuracy is ok. However, I don’t know how to save the plugin metadatas.
Thanks.

My environment is SDK1.5 & Jetpack 3.3

Hi,

Are you looking for a sample code of writing information into metadata?
If yes, please check our sample located at ${HONE}/gst-dsexample_sources/gstdsexample.cpp.

/**
 * Attach metadata for the full frame. We will be adding a new metadata.
 */
static void
attach_metadata_full_frame (GstDsExample * dsexample, GstBuffer * inbuf,
    gdouble scale_ratio, DsExampleOutput * output)
{
  IvaMeta *ivameta;
  BBOX_Params *bbparams = (BBOX_Params *) g_malloc0 (sizeof (BBOX_Params));
  // Allocate an array of size equal to the number of objects detected
  bbparams->roi_meta =
      (ROIMeta_Params *) g_malloc0 (sizeof (ROIMeta_Params) *
      output->num_objects);
  // Should be set to 3 for custom elements
  bbparams->gie_type = 3;
  // Use HW for overlaying boxes
  bbparams->nvosd_mode = MODE_HW;
  // Font to be used for label text
  static gchar font_name[] = "Arial";
......

Thanks.

My code as followings:
static void
attach_metadata_full_frame (GstYoloPlugin * yoloplugin, GstBuffer * inbuf,
gdouble scale_ratio, YoloPluginOutput * output, guint batch_id)
{
IvaMeta *ivameta;
BBOX_Params *bbparams = (BBOX_Params *) g_malloc0 (sizeof (BBOX_Params));
// Allocate an array of size equal to the number of objects detected
bbparams->roi_meta =
(ROIMeta_Params *) g_malloc0 (sizeof (ROIMeta_Params) *
output->numObjects);
// Should be set to 3 for custom elements
bbparams->gie_type = 3;
// Use HW for overlaying boxes
bbparams->nvosd_mode = MODE_HW;
bbparams->frame_num = batch_id;
// Font to be used for label text
static gchar font_name = “Arial”;

Code is similar to dsexamples, But it can’t write information into metadata.
Information just can display on the screen.
When I run my projects, It can’t save the results of nvgstiva-app-yolo-plugins to all_box_00.txt or kittidata.

Hi,

Some update is required in the config to enable the kitti-output.
Have you applied this?

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5
<b>gie-kitti-output-dir=streamscl</b>
...

Thanks.

Hi 804138731,

Have you tried with our suggestions?
Any update?

Thanks