NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/sources/includes/nvdsinferserver/infer_post_datatypes.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-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 __INFER_POST_DATATYPES_H__
19 #define __INFER_POST_DATATYPES_H__
20 
21 #include <string>
22 #include <nvdsinfer.h>
23 
27 typedef struct {
29  float left;
31  float top;
33  float width;
35  float height;
36  /* Index for the object class. */
37  int classIndex;
38  /* String label for the detected object. */
39  char* label;
40  /* confidence score of the detected object. */
41  float confidence;
43 
48 typedef struct {
50  NvDsInferObject* objects;
52  unsigned int numObjects;
54 
55 #ifdef __cplusplus
56 
61 struct InferAttribute : NvDsInferAttribute {
62  /* NvDsInferAttribute::attributeLabel would be ignored */
63  std::string safeAttributeLabel;
64 };
65 
66 typedef struct {
69  std::vector<InferAttribute> attributes;
71  std::string label;
72 } InferClassificationOutput;
73 
74 #endif
75 
80 typedef struct {
82  unsigned int width;
84  unsigned int height;
86  unsigned int classes;
89  int* class_map;
93  float* class_probability_map;
95 
96 struct TritonClassParams {
97  uint32_t topK = 0;
98  float threshold = 0.0f;
99  std::string tensorName;
100 };
101 
102 #define INFER_SERVER_PRIVATE_BUF "@@NvInferServer"
103 
104 #define INFER_SERVER_DETECTION_BUF_NAME INFER_SERVER_PRIVATE_BUF "Detections"
105 #define INFER_SERVER_CLASSIFICATION_BUF_NAME \
106  INFER_SERVER_PRIVATE_BUF "Classfications"
107 #define INFER_SERVER_SEGMENTATION_BUF_NAME \
108  INFER_SERVER_PRIVATE_BUF "Segmentations"
109 
110 #endif
TritonClassParams
Definition: sources/includes/nvdsinferserver/infer_post_datatypes.h:96
NvDsInferSegmentationOutput
Holds information parsed from segmentation network output for one frame.
Definition: sources/includes/nvdsinfer_context.h:599
NvDsInferDetectionOutput
Holds information on all objects detected by a detector network in one frame.
Definition: sources/includes/nvdsinfer_context.h:571
TritonClassParams::threshold
float threshold
Definition: sources/includes/nvdsinferserver/infer_post_datatypes.h:98
TritonClassParams::topK
uint32_t topK
Definition: sources/includes/nvdsinferserver/infer_post_datatypes.h:97
TritonClassParams::tensorName
std::string tensorName
Definition: sources/includes/nvdsinferserver/infer_post_datatypes.h:99
NvDsInferObject
Holds information about one detected object.
Definition: sources/includes/nvdsinfer_context.h:538
NvDsInferAttribute
Holds information about one classified attribute.
Definition: sources/includes/nvdsinfer.h:212