NVIDIA DeepStream SDK API Reference

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