NVIDIA DeepStream SDK API Reference

9.1 Release
sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-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 __LIDAR_VOXELIZATION_HPP__
19 #define __LIDAR_VOXELIZATION_HPP__
20 
21 #include <memory>
22 #include "dtype.hpp"
23 
24 namespace bevfusion {
25 namespace pointpillars {
26 
34  int max_batch; // cache memory = max_batch * max_points
35  int input_feature = 4;
37 
39  const ds3d::Float3& voxel_size);
40 };
41 
42 class Voxelization {
43  public:
44  // points and voxels must be of half-float device pointer
45  virtual void forward(const float * const*points, const int *num_points, unsigned int batch, void *stream = nullptr) = 0;
46 
47  // N x max_points_per_voxel x 9
48  virtual const ds3d::half* features() = 0;
49 
50  // N x 4 (x, y, z, ib)
51  virtual const ds3d::Int4 *indices() = 0;
52 
53  // (1,) N
54  virtual const unsigned int* num_voxels_device() = 0;
55  virtual unsigned int num_voxels() = 0;
56  virtual ~Voxelization() = default;
57 };
58 
59 std::unique_ptr<Voxelization> create_voxelization(VoxelizationParameter param);
60 
61 }; // namespace lidar
62 }; // namespace pointpillar
63 
64 #endif // __LIDAR_VOXELIZATION_HPP__
bevfusion
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:24
bevfusion::pointpillars::Voxelization::~Voxelization
virtual ~Voxelization()=default
bevfusion::pointpillars::VoxelizationParameter::max_points
int max_points
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:36
ds3d::Int4
Definition: sources/includes/ds3d/common/helper/dtype.hpp:37
bevfusion::pointpillars::Voxelization::indices
virtual const ds3d::Int4 * indices()=0
bevfusion::pointpillars::VoxelizationParameter::voxel_size
ds3d::Float3 voxel_size
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:30
bevfusion::pointpillars::Voxelization::num_voxels
virtual unsigned int num_voxels()=0
bevfusion::pointpillars::VoxelizationParameter::grid_size
ds3d::Int3 grid_size
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:31
bevfusion::pointpillars::Voxelization::features
virtual const ds3d::half * features()=0
bevfusion::pointpillars::Voxelization::forward
virtual void forward(const float *const *points, const int *num_points, unsigned int batch, void *stream=nullptr)=0
bevfusion::pointpillars::VoxelizationParameter::max_batch
int max_batch
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:34
bevfusion::pointpillars::VoxelizationParameter::min_range
ds3d::Float3 min_range
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:28
bevfusion::pointpillars::VoxelizationParameter::input_feature
int input_feature
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:35
bevfusion::pointpillars::VoxelizationParameter::compute_grid_size
static ds3d::Int3 compute_grid_size(const ds3d::Float3 &max_range, const ds3d::Float3 &min_range, const ds3d::Float3 &voxel_size)
bevfusion::pointpillars::VoxelizationParameter::max_voxels
int max_voxels
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:32
ds3d::Float3
Definition: sources/includes/ds3d/common/helper/dtype.hpp:51
bevfusion::pointpillars::create_voxelization
std::unique_ptr< Voxelization > create_voxelization(VoxelizationParameter param)
bevfusion::pointpillars::Voxelization::num_voxels_device
virtual const unsigned int * num_voxels_device()=0
ds3d::half
Definition: sources/includes/ds3d/common/helper/dtype.hpp:66
bevfusion::pointpillars::VoxelizationParameter
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:27
bevfusion::pointpillars::VoxelizationParameter::max_points_per_voxel
int max_points_per_voxel
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:33
bevfusion::pointpillars::VoxelizationParameter::max_range
ds3d::Float3 max_range
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:29
ds3d::Int3
Definition: sources/includes/ds3d/common/helper/dtype.hpp:30
bevfusion::pointpillars::Voxelization
Definition: sources/libs/ds3d/datafilter/lidar_preprocess/voxelization.hpp:42