NVIDIA DeepStream SDK API Reference

7.0 Release
infer_post_datatypes.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef __INFER_POST_DATATYPES_H__
14 #define __INFER_POST_DATATYPES_H__
15 
16 #include <string>
17 #include <nvdsinfer.h>
18 
22 typedef struct {
24  float left;
26  float top;
28  float width;
30  float height;
31  /* Index for the object class. */
33  /* String label for the detected object. */
34  char* label;
35  /* confidence score of the detected object. */
36  float confidence;
38 
43 typedef struct {
47  unsigned int numObjects;
49 
50 #ifdef __cplusplus
51 
56 struct InferAttribute : NvDsInferAttribute {
57  /* NvDsInferAttribute::attributeLabel would be ignored */
58  std::string safeAttributeLabel;
59 };
60 
61 typedef struct {
64  std::vector<InferAttribute> attributes;
66  std::string label;
67 } InferClassificationOutput;
68 
69 #endif
70 
75 typedef struct {
77  unsigned int width;
79  unsigned int height;
81  unsigned int classes;
84  int* class_map;
90 
92  uint32_t topK = 0;
93  float threshold = 0.0f;
94  std::string tensorName;
95 };
96 
97 #define INFER_SERVER_PRIVATE_BUF "@@NvInferServer"
98 
99 #define INFER_SERVER_DETECTION_BUF_NAME INFER_SERVER_PRIVATE_BUF "Detections"
100 #define INFER_SERVER_CLASSIFICATION_BUF_NAME \
101  INFER_SERVER_PRIVATE_BUF "Classfications"
102 #define INFER_SERVER_SEGMENTATION_BUF_NAME \
103  INFER_SERVER_PRIVATE_BUF "Segmentations"
104 
105 #endif
NvDsInferObject::confidence
float confidence
Definition: infer_post_datatypes.h:36
NvDsInferSegmentationOutput::height
unsigned int height
Height of the output.
Definition: infer_post_datatypes.h:79
NvDsInferObject::classIndex
int classIndex
Holds the index for the object's class.
Definition: infer_post_datatypes.h:32
NvDsInferSegmentationOutput::classes
unsigned int classes
Number of classes supported by the network.
Definition: infer_post_datatypes.h:81
TritonClassParams
Definition: infer_post_datatypes.h:91
NvDsInferDetectionOutput::numObjects
unsigned int numObjects
Number of objects in the array.
Definition: infer_post_datatypes.h:47
NvDsInferSegmentationOutput
Holds the information parsed from segmentation network output for one frame.
Definition: infer_post_datatypes.h:75
NvDsInferObject::label
char * label
Holds a pointer to a string containing a label for the object.
Definition: infer_post_datatypes.h:34
NvDsInferObject::height
float height
Object height.
Definition: infer_post_datatypes.h:30
NvDsInferDetectionOutput
Holds the information on all objects detected by a detector network in one frame.
Definition: infer_post_datatypes.h:43
NvDsInferSegmentationOutput::width
unsigned int width
Width of the output.
Definition: infer_post_datatypes.h:77
NvDsInferObject::top
float top
Offset from the top boundary of the frame.
Definition: infer_post_datatypes.h:26
TritonClassParams::threshold
float threshold
Definition: infer_post_datatypes.h:93
NvDsInferObject::left
float left
Offset from the left boundary of the frame.
Definition: infer_post_datatypes.h:24
NvDsInferSegmentationOutput::class_map
int * class_map
Pointer to the array for 2D pixel class map.
Definition: infer_post_datatypes.h:84
nvdsinfer.h
TritonClassParams::topK
uint32_t topK
Definition: infer_post_datatypes.h:92
TritonClassParams::tensorName
std::string tensorName
Definition: infer_post_datatypes.h:94
NvDsInferObject::width
float width
Object width.
Definition: infer_post_datatypes.h:28
NvDsInferObject
Holds the information about one detected object.
Definition: infer_post_datatypes.h:22
NvDsInferDetectionOutput::objects
NvDsInferObject * objects
Array of objects.
Definition: infer_post_datatypes.h:45
NvDsInferAttribute
Holds information about one classified attribute.
Definition: nvdsinfer.h:199
NvDsInferSegmentationOutput::class_probability_map
float * class_probability_map
Pointer to the raw array containing the probabilities.
Definition: infer_post_datatypes.h:88