NVIDIA DeepStream SDK API Reference

9.2 Release
9.2/sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
49 #ifndef __GST_NVINFEREVAL_H__
50 #define __GST_NVINFEREVAL_H__
51 
52 #include <gst/gst.h>
53 #include "nvds_eval_engine.h" /* opaque C++ engine handle + C API */
54 #include "nvdsmeta.h" /* NvDsMetaType */
55 
56 G_BEGIN_DECLS
57 
58 #define GST_TYPE_NVINFEREVAL (gst_nv_infer_eval_get_type ())
59 #define GST_NVINFEREVAL(obj) \
60  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_NVINFEREVAL, GstNvInferEval))
61 #define GST_NVINFEREVAL_CLASS(klass) \
62  (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_NVINFEREVAL, GstNvInferEvalClass))
63 #define GST_IS_NVINFEREVAL(obj) \
64  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_NVINFEREVAL))
65 #define GST_IS_NVINFEREVAL_CLASS(klass) \
66  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_NVINFEREVAL))
67 
70 
76 struct _GstNvInferEval
77 {
78  GstElement parent;
79 
80  /* pads */
81  GstPad *sinkpad;
82  GstPad *srcpad;
83 
84  /* C++ evaluation engine (opaque handle) */
86 
87  /* upstream nvmodelmux element (NULL in Mode A).
88  * Discovered at READY->PAUSED; ref held until PAUSED->READY. */
89  GstElement *mm_element;
90 
91  /* TRUE when upstream (after transparent-element walk) is nvmodelmux */
92  gboolean mode_ab;
93 
94  /* InferenceProvenanceMeta user-meta type, resolved once at READY->PAUSED */
96 
97  /* Rate-limit the "prov found but mm_element NULL" warning to once per run */
98  gboolean prov_warn_once;
99 
100  /* --- raw property storage --- */
101  gchar *gt_file;
102  guint eval_interval;
103  gfloat iou_threshold;
104  gfloat min_ap_margin;
105  gfloat kpi_ap50;
106  gfloat kpi_precision;
107  gfloat kpi_recall;
108  guint promotion_mode; /* 0=promote 1=swap 2=report-only */
109  gchar *report_file;
110  gchar *config_file; /* path to GKeyFile INI config */
111  gboolean show_gt_overlay; /* draw GT boxes as green rects via nvosd */
112  gboolean show_ap_table; /* print per-class AP table to console */
113  gboolean cumulative; /* don't reset accumulator between epochs */
114  gboolean exclude_undetected; /* auto-exclude classes with 0 TP+FP */
115  gchar *exclude_classes; /* comma-separated classes to skip in mean */
116 };
117 
119 {
120  GstElementClass parent_class;
121 };
122 
123 GType gst_nv_infer_eval_get_type (void);
124 
125 G_END_DECLS
126 
127 #endif /* __GST_NVINFEREVAL_H__ */
_GstNvInferEvalClass
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:118
_GstNvInferEval::show_gt_overlay
gboolean show_gt_overlay
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:111
_GstNvInferEval::min_ap_margin
gfloat min_ap_margin
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:104
_GstNvInferEval::parent
GstElement parent
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:78
_GstNvInferEval::srcpad
GstPad * srcpad
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:82
_GstNvInferEval::eng
NvdsEvalEngine * eng
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:85
gst_nv_infer_eval_get_type
GType gst_nv_infer_eval_get_type(void)
_GstNvInferEval::report_file
gchar * report_file
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:109
_GstNvInferEval::config_file
gchar * config_file
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:110
_GstNvInferEval::exclude_undetected
gboolean exclude_undetected
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:114
_GstNvInferEval
GstNvInferEval:
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:76
_GstNvInferEval::promotion_mode
guint promotion_mode
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:108
nvds_eval_engine.h
_GstNvInferEval::prov_meta_type
NvDsMetaType prov_meta_type
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:95
_GstNvInferEval::mode_ab
gboolean mode_ab
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:92
_GstNvInferEval::mm_element
GstElement * mm_element
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:89
_GstNvInferEval::eval_interval
guint eval_interval
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:102
_GstNvInferEval::gt_file
gchar * gt_file
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:101
_GstNvInferEval::exclude_classes
gchar * exclude_classes
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:115
_GstNvInferEval::kpi_recall
gfloat kpi_recall
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:107
_GstNvInferEval::prov_warn_once
gboolean prov_warn_once
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:98
_GstNvInferEval::kpi_ap50
gfloat kpi_ap50
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:105
_GstNvInferEvalClass::parent_class
GstElementClass parent_class
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:120
_GstNvInferEval::iou_threshold
gfloat iou_threshold
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:103
_GstNvInferEval::kpi_precision
gfloat kpi_precision
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:106
_GstNvInferEval::sinkpad
GstPad * sinkpad
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:81
_GstNvInferEval::cumulative
gboolean cumulative
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:113
NvDsMetaType
NvDsMetaType
Specifies the type of metadata.
Definition: includes/nvdsmeta.h:105
_GstNvInferEval::show_ap_table
gboolean show_ap_table
Definition: sources/gst-plugins/gst-nvinfereval/gstnvinfereval.h:112
NvdsEvalEngine
struct NvdsEvalEngine NvdsEvalEngine
Opaque handle; defined as a C++ struct in nvds_eval_engine.cpp.
Definition: sources/gst-plugins/gst-nvinfereval/nvds_eval_engine.h:62