NVIDIA DeepStream SDK API Reference

6.4 Release
post_processor_custom_impl.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 #ifndef __POST_PROCESSOR_CUSTOM_IMPL_HPP__
25 #define __POST_PROCESSOR_CUSTOM_IMPL_HPP__
26 #include "post_processor_struct.h"
27 
28 /*
29  * C interfaces
30  */
31 
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36 
49  std::vector<NvDsInferLayerInfo> const &outputLayersInfo,
50  NvDsInferNetworkInfo const &networkInfo,
51  NvDsPostProcessParseDetectionParams const &detectionParams,
52  std::vector<NvDsPostProcessObjectDetectionInfo> &objectList);
53 
58 #define CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE(customParseFunc) \
59  static void checkFunc_ ## customParseFunc (NvDsPostProcessParseCustomFunc func = customParseFunc) \
60  { checkFunc_ ## customParseFunc (); }; \
61  extern "C" bool customParseFunc (std::vector<NvDsInferLayerInfo> const &outputLayersInfo, \
62  NvDsInferNetworkInfo const &networkInfo, \
63  NvDsPostProcessParseDetectionParams const &detectionParams, \
64  std::vector<NvDsPostProcessObjectDetectionInfo> &objectList);
65 
78  std::vector<NvDsInferLayerInfo> const &outputLayersInfo,
79  NvDsInferNetworkInfo const &networkInfo,
80  NvDsPostProcessParseDetectionParams const &detectionParams,
81  std::vector<NvDsPostProcessInstanceMaskInfo> &objectList);
82 
87 #define CHECK_CUSTOM_INSTANCE_MASK_PARSE_FUNC_PROTOTYPE(customParseFunc) \
88  static void checkFunc_ ## customParseFunc (NvDsPostProcessInstanceMaskParseCustomFunc func = customParseFunc) \
89  { checkFunc_ ## customParseFunc (); }; \
90  extern "C" bool customParseFunc (std::vector<NvDsInferLayerInfo> const &outputLayersInfo, \
91  NvDsInferNetworkInfo const &networkInfo, \
92  NvDsPostProcessParseDetectionParams const &detectionParams, \
93  std::vector<NvDsPostProcessInstanceMaskInfo> &objectList);
94 
109  std::vector<NvDsInferLayerInfo> const &outputLayersInfo,
110  NvDsInferNetworkInfo const &networkInfo,
111  float classifierThreshold,
112  std::vector<NvDsPostProcessAttribute> &attrList,
113  std::string &descString);
114 
119 #define CHECK_CUSTOM_CLASSIFIER_PARSE_FUNC_PROTOTYPE(customParseFunc) \
120  static void checkFunc_ ## customParseFunc (NvDsPostProcessClassiferParseCustomFunc func = customParseFunc) \
121  { checkFunc_ ## customParseFunc (); }; \
122  extern "C" bool customParseFunc (std::vector<NvDsInferLayerInfo> const &outputLayersInfo, \
123  NvDsInferNetworkInfo const &networkInfo, \
124  float classifierThreshold, \
125  std::vector<NvDsPostProcessAttribute> &attrList, \
126  std::string &descString);
127 
128 #ifdef __cplusplus
129 }
130 #endif
131 #endif
NvDsPostProcessClassiferParseCustomFunc
bool(* NvDsPostProcessClassiferParseCustomFunc)(std::vector< NvDsInferLayerInfo > const &outputLayersInfo, NvDsInferNetworkInfo const &networkInfo, float classifierThreshold, std::vector< NvDsPostProcessAttribute > &attrList, std::string &descString)
Type definition for the custom classifier output parsing function.
Definition: post_processor_custom_impl.h:108
NvDsInferNetworkInfo
Holds information about the model network.
Definition: nvdsinfer.h:110
NvDsPostProcessParseCustomFunc
bool(* NvDsPostProcessParseCustomFunc)(std::vector< NvDsInferLayerInfo > const &outputLayersInfo, NvDsInferNetworkInfo const &networkInfo, NvDsPostProcessParseDetectionParams const &detectionParams, std::vector< NvDsPostProcessObjectDetectionInfo > &objectList)
Type definition for the custom bounding box parsing function.
Definition: post_processor_custom_impl.h:48
post_processor_struct.h
NvDsPostProcessInstanceMaskParseCustomFunc
bool(* NvDsPostProcessInstanceMaskParseCustomFunc)(std::vector< NvDsInferLayerInfo > const &outputLayersInfo, NvDsInferNetworkInfo const &networkInfo, NvDsPostProcessParseDetectionParams const &detectionParams, std::vector< NvDsPostProcessInstanceMaskInfo > &objectList)
Type definition for the custom bounding box and instance mask parsing function.
Definition: post_processor_custom_impl.h:77
NvDsPostProcessParseDetectionParams
Holds the detection parameters required for parsing objects.
Definition: post_processor_struct.h:539