NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/sources/apps/apps-common/includes/deepstream_visionencoder.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 
18 #ifndef __NVGSTDS_VISIONENCODER_H__
19 #define __NVGSTDS_VISIONENCODER_H__
20 
21 #include <gst/gst.h>
22 
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27 
28 typedef struct
29 {
30  gboolean enable;
31  gchar *model_variant;
32  guint batch_size;
33  gchar *device;
34  guint min_crop_size;
35  gboolean verbose;
36  guint gpu_id;
37  gchar *backend; // "transformers", "triton", or "tensorrt"
38  gchar *triton_url; // Triton gRPC endpoint (host:port)
39  gchar *triton_model; // Model name in Triton repository
40  guint skip_interval; // Frame skip interval (0=none, 1=every other, 2=every 3rd, etc.)
41  gchar *embedding_classes; // Semicolon-separated list of classes to generate embeddings for
42  gchar *onnx_model; // Path to ONNX model for TensorRT engine building
43  gchar *tensorrt_engine; // Path to TensorRT engine file (for direct TensorRT backend)
44  gboolean query_only; // Init model but skip per-frame inference; REST queries still work
45  gboolean smart_infer; // Enable smart inference (cache embeddings for tracked objects)
46  guint cache_refresh_interval; // Re-infer cached objects every N frames (0 = never)
47  guint cache_max_size; // Maximum cached embeddings
48  gboolean ofa_predict; // Enable OFA-based temporal embedding prediction
49  gfloat ofa_motion_threshold; // Below this: trust cache; above: predict
50  gfloat ofa_high_motion_threshold; // Above this: force full re-inference
52 
53 typedef struct
54 {
55  GstElement *bin;
56  GstElement *queue;
57  GstElement *visionencoder;
59 
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif /* __NVGSTDS_VISIONENCODER_H__ */
NvDsVisionEncoderConfig
Definition: sources/apps/apps-common/includes/deepstream_visionencoder.h:28
create_visionencoder_bin
gboolean create_visionencoder_bin(NvDsVisionEncoderConfig *config, NvDsVisionEncoderBin *bin)
NvDsVisionEncoderBin
Definition: sources/apps/apps-common/includes/deepstream_visionencoder.h:53