NVIDIA DeepStream SDK API Reference
9.2 Release
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.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
50
#pragma once
51
52
#include <string>
53
#include <map>
54
#include <set>
55
#include <glib.h>
56
57
/* ------------------------------------------------------------------ */
58
/* GlobalConfig */
59
/* ------------------------------------------------------------------ */
60
61
struct
GlobalConfig
62
{
63
guint
eval_interval
= 1000;
64
gfloat
iou_threshold
= 0.5f;
65
gboolean
show_gt_overlay
=
FALSE
;
/* draw GT boxes as green rects via nvosd */
66
gboolean
show_ap_table
=
FALSE
;
/* print per-class AP table to console */
67
gboolean
cumulative
=
TRUE
;
/* don't reset accumulator between epochs */
68
gboolean
exclude_undetected
=
TRUE
;
/* auto-exclude classes with 0 TP and 0 FP */
69
std::set<std::string>
exclude_classes
;
/* classes skipped in mean AP/P/R */
70
std::string
report_file
;
71
/* Fallback GT file used for any model that has no per-model gt-file. */
72
std::string
default_gt_file
;
73
/* Base URL of the nvmodelmux REST server (e.g. http://localhost:9000).
74
* When a shadow wins an epoch, the win-action below is applied by POSTing to
75
* <rest_url>/api/v1/model/routing. Empty (default) => no action taken. */
76
std::string
rest_url
;
77
/* Action when the shadow wins an epoch:
78
* 0 = promote (default): winner -> primary, shadow cleared (A/B ends)
79
* 1 = swap : winner -> primary, loser -> shadow (A/B continues)
80
* 2 = report-only : no REST call, pure monitoring mode */
81
guint
promotion_mode
= 0;
82
};
83
84
/* ------------------------------------------------------------------ */
85
/* ModelConfig */
86
/* ------------------------------------------------------------------ */
87
88
struct
ModelConfig
89
{
90
/* Empty → use GlobalConfig::default_gt_file */
91
std::string
gt_file
;
92
93
gfloat
min_ap_margin
= 0.02f;
94
gfloat
kpi_ap50
= 0.0f;
/* 0 = disabled */
95
gfloat
kpi_precision
= 0.0f;
/* 0 = disabled */
96
gfloat
kpi_recall
= 0.0f;
/* 0 = disabled */
97
};
98
99
/* ------------------------------------------------------------------ */
100
/* EvalConfig */
101
/* ------------------------------------------------------------------ */
102
103
struct
EvalConfig
104
{
105
GlobalConfig
global
;
106
std::map<std::string, ModelConfig>
models
;
/* model_name → per-model config */
107
114
ModelConfig
effective_model_config
(
const
std::string &model_name)
const
;
115
};
116
117
/* ------------------------------------------------------------------ */
118
/* Loader */
119
/* ------------------------------------------------------------------ */
120
132
bool
eval_config_load
(
const
std::string &path,
EvalConfig
&cfg);
GlobalConfig::eval_interval
guint eval_interval
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:63
FALSE
#define FALSE
Definition:
sources/libs/nvll_batch_jpeg_encode/oss/jmorecfg.h:247
ModelConfig::kpi_precision
gfloat kpi_precision
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:95
GlobalConfig::cumulative
gboolean cumulative
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:67
ModelConfig::gt_file
std::string gt_file
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:91
GlobalConfig::show_gt_overlay
gboolean show_gt_overlay
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:65
GlobalConfig::show_ap_table
gboolean show_ap_table
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:66
TRUE
#define TRUE
Definition:
sources/libs/nvll_batch_jpeg_encode/oss/jmorecfg.h:250
GlobalConfig::default_gt_file
std::string default_gt_file
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:72
GlobalConfig
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:61
ModelConfig::min_ap_margin
gfloat min_ap_margin
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:93
EvalConfig::models
std::map< std::string, ModelConfig > models
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:106
EvalConfig::effective_model_config
ModelConfig effective_model_config(const std::string &model_name) const
effective_model_config: Return the ModelConfig for model_name, filling absent fields from global defa...
GlobalConfig::report_file
std::string report_file
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:70
GlobalConfig::rest_url
std::string rest_url
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:76
eval_config_load
bool eval_config_load(const std::string &path, EvalConfig &cfg)
eval_config_load: Parse the GKeyFile INI at @path and overlay found values into @cfg.
GlobalConfig::promotion_mode
guint promotion_mode
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:81
GlobalConfig::exclude_undetected
gboolean exclude_undetected
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:68
ModelConfig::kpi_ap50
gfloat kpi_ap50
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:94
GlobalConfig::exclude_classes
std::set< std::string > exclude_classes
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:69
GlobalConfig::iou_threshold
gfloat iou_threshold
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:64
EvalConfig
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:103
ModelConfig
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:88
ModelConfig::kpi_recall
gfloat kpi_recall
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:96
EvalConfig::global
GlobalConfig global
Definition:
sources/gst-plugins/gst-nvinfereval/nvds_eval_config.h:105
Privacy Policy
|
Your Privacy Choices
|
Terms of Service
|
Accessibility
|
Corporate Policies
|
Product Security
|
Contact
© 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
NVIDIA Confidential | Subject to Change | For test and development only.
Wed Oct 28 2026 12:02:29 | PR-09318-R32