|
NVIDIA DeepStream SDK API Reference
|
8.0 Release
|
Go to the documentation of this file.
14 #ifndef DS3D_DATAFILTER_LIDAR_PREPROCESS_CONFIG_H
15 #define DS3D_DATAFILTER_LIDAR_PREPROCESS_CONFIG_H
27 namespace ds3d {
namespace impl {
namespace filter {
31 bool is2DFrame =
false;
37 uint32_t memPoolSize = 8;
49 LOG_ERROR(
"lidarpreprocess configed wrong mem_pool_size");
61 "parse dataloader component content failed");
63 auto filterInputDatamapKey = node[
"filter_input_datamap_key"];
64 auto yMemPoolSize = node[
"mem_pool_size"];
65 auto modelInputs = node[
"model_inputs"];
66 auto gpuid = node[
"gpu_id"];
67 auto inputTensorMemType = node[
"input_tensor_mem_type"];
68 auto configPath = node[
"config_path"];
69 auto lidarDataFrom = node[
"lidar_data_from"];
71 if (filterInputDatamapKey) {
78 for (
const auto& item :modelInputs) {
81 des.
name = item[
"name"].as<std::string>();
83 if (item[
"datatype"]){
84 dataType = item[
"datatype"].as<std::string>();
87 std::vector<std::string> strStreams = item[
"shape"].as<std::vector<std::string>>();
90 des.
dims.
d[i] = std::stoi(strStreams[i]);
93 [](
int s,
int i) { return s * i; });
95 des.
fromKey = item[
"from"].as<std::string>();
97 if (item[
"is_2d_frame"]) {
98 des.
is2DFrame = item[
"is_2d_frame"].as<
bool>();
101 "modelInputs name:%s, dataType:%s, ndataType:%d, numDims:%d, numElements:%d, from: "
109 config.
gpuid = gpuid.as<uint>();
111 if (inputTensorMemType) {
112 std::string value = inputTensorMemType.as<std::string>();
113 if(!value.compare(
"GpuCuda")){
115 }
else if (!value.compare(
"CpuCuda") || !value.compare(
"Cpu")) {
118 LOG_WARNING(
"%s not supported, use defualt value GpuCuda", value.c_str());
122 config.
configPath = configPath.as<std::string>();
125 config.
lidarDataFrom = lidarDataFrom.as<std::vector<std::string>>();
136 LOG_ERROR(
"model_inputs parse failed, abort");
144 return ErrCode::kGood;
149 #endif // DS3D_DATAFILTER_LIDAR_PREPROCESS_CONFIG_H
This is a header file for pre-processing cuda kernels with normalization and mean subtraction require...
InferDataType grpcStr2DataType(const std::string &type)
std::string filterInputDatamapKey
unsigned int numDims
Number of dimensions of the layer.
InferMemType inputTensorMemType
std::vector< std::string > lidarDataFrom
Header file containing utility functions and classes used by the nvinferserver low level library.
ErrCode parseComponentConfig(const std::string &yamlComp, const std::string &path, ComponentConfig &config)
@ kGpuCuda
GPU CUDA memory.
#define LOG_INFO(fmt,...)
#define LOG_ERROR(fmt,...)
config::ComponentConfig compConfig
std::map< size_t, std::string > modelInputs
#define DS3D_ERROR_RETURN(code, fmt,...)
int d[NVDSINFER_MAX_DIMS]
Size of the layer in each dimension.
InferDataType dataType
Datatype associated with the buffer.
InferMemType
The memory types of inference buffers.
unsigned int numElements
Number of elements in the layer including all dimensions.
InferDims dims
Dimensions of the tensor.
std::map< std::string, ModelInputDesc > inputLayersDes
@ kCpuCuda
CUDA pinned memory.
ErrCode parseConfig(const std::string &content, const std::string &path, Config &config)
std::string name
Name of the buffer.
Holds the information about a inference buffer.