Compute Graph Framework SDK Reference  5.8
DetectorTypes.hpp
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2018-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
31#ifndef DW_FRAMEWORK_DETECTOR_TYPES_HPP_
32#define DW_FRAMEWORK_DETECTOR_TYPES_HPP_
33
35#include <dw/core/base/Types.h>
36
37namespace dw
38{
39namespace framework
40{
41
42enum class dwFovealMode
43{
44 OFF, //FOVEAL MODE IS OFF
45 FULL, //FOVEAL MODE IS FULL TIME
46 INTERLEAVED //FOVEAL MODE IS INTERLEAVED - Demosaiced crop and downsampled full view are alternating
47};
48
49template <>
51{
52 static constexpr auto get()
53 {
54 using EnumT = dwFovealMode;
55 return describeEnumeratorCollection<EnumT>(
59 }
60};
61
66enum class dwModeDnnROI
67{
68 TOP, // DNN ROI is set to the top of the image (cut bottom)
69 MIDDLE, // DNN ROI is set to the middle of the image (cut top/bottom half each)
70 BOTTOM // DNN ROI is set to the bottom of the image (cut top)
71};
72
74{
75 bool fovealEnable;
76 dwRect ROI;
77 dwVector2f scales;
79};
80
81template <>
82struct EnumDescription<dwTrivialDataType>
83{
84 static constexpr auto get()
85 {
86 return describeEnumeratorCollection<dwTrivialDataType>(
87 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_UNKNOWN),
88 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_BOOL),
89 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_INT8),
90 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_INT16),
91 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_INT32),
92 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_INT64),
93 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_UINT8),
94 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_UINT16),
95 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_UINT32),
96 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_UINT64),
97 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_FLOAT32),
98 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_FLOAT64),
99 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_FLOAT16),
100 DW_DESCRIBE_C_ENUMERATOR(DW_TYPE_CHAR8));
101 }
102};
103
104template <>
105struct EnumDescription<dwPrecision>
106{
107 static constexpr auto get()
108 {
109 return describeEnumeratorCollection<dwPrecision>(
110 DW_DESCRIBE_C_ENUMERATOR(DW_PRECISION_INT8),
111 DW_DESCRIBE_C_ENUMERATOR(DW_PRECISION_FP16),
112 DW_DESCRIBE_C_ENUMERATOR(DW_PRECISION_FP32),
113 DW_DESCRIBE_C_ENUMERATOR(DW_PRECISION_MIXED));
114 }
115};
116
117template <>
118struct EnumDescription<dwProcessorType>
119{
120 static constexpr auto get()
121 {
122 return describeEnumeratorCollection<dwProcessorType>(
123 DW_DESCRIBE_C_ENUMERATOR(DW_PROCESSOR_TYPE_CPU),
124 DW_DESCRIBE_C_ENUMERATOR(DW_PROCESSOR_TYPE_GPU),
125 DW_DESCRIBE_C_ENUMERATOR(DW_PROCESSOR_TYPE_DLA_0),
126 DW_DESCRIBE_C_ENUMERATOR(DW_PROCESSOR_TYPE_DLA_1),
127 DW_DESCRIBE_C_ENUMERATOR(DW_PROCESSOR_TYPE_PVA_0),
128 DW_DESCRIBE_C_ENUMERATOR(DW_PROCESSOR_TYPE_PVA_1),
129 DW_DESCRIBE_C_ENUMERATOR(DW_PROCESSOR_TYPE_NVENC_0),
130 DW_DESCRIBE_C_ENUMERATOR(DW_PROCESSOR_TYPE_NVENC_1),
131 DW_DESCRIBE_C_ENUMERATOR(DW_PROCESSOR_TYPE_CUDLA));
132 }
133};
134
135} // framework
136} // dw
137#endif // DW_FRAMEWORK_DETECTOR_TYPES_HPP_
#define DW_DESCRIBE_ENUMERATOR(NAME)
Syntactic sugar calling describeEnumerator().
#define DW_DESCRIBE_C_ENUMERATOR(NAME)
Syntactic sugar calling describeEnumerator().
dwVector2f scales
dwDetectorFovealParams { bool fovealEnable dwDetectorFovealParams
dwFovealMode fovealMode
Definition: Exception.hpp:47