pcod-common v1.0.0
Shared preprocessing and postprocessing for point-cloud object detection
Loading...
Searching...
No Matches
pillar_preprocess_cuda.hpp
Go to the documentation of this file.
1// Copyright Institute for Automotive Engineering (ika), RWTH Aachen University
2// SPDX-License-Identifier: Apache-2.0
3
4#pragma once
5
6#include <cstdint>
7#include <memory>
8#include <string>
9
11
12namespace pcod_common {
13
16 float x;
17 float y;
18 float z;
19 float intensity;
20};
21
24 float x_min = 0.0f;
25 float x_max = 0.0f;
26 float y_min = 0.0f;
27 float y_max = 0.0f;
28 float z_min = 0.0f;
29 float z_max = 0.0f;
30 float voxel_x = 0.0f;
31 float voxel_y = 0.0f;
32 float value_threshold = 1.0f;
33 float min_value = 0.0f;
34 float max_value = 1.0f;
35 float epsilon = 1e-6f;
36 float z_score_mean = 0.0f;
37 float z_score_std = 1.0f;
38 float center_z = 0.0f;
39 std::int32_t grid_x = 0;
40 std::int32_t grid_y = 0;
41 std::int32_t num_pillars = 0;
42 std::int32_t max_num_points = 0;
43 std::int32_t feature_dim = 0;
45};
46
49 float* point_features = nullptr;
50 std::int64_t* pillar_ids = nullptr;
51 bool* valid_mask = nullptr;
52 bool* pillar_masks = nullptr;
53};
54
57 float* point_features = nullptr;
58 std::int64_t* pillar_ids = nullptr;
59 bool* valid_mask = nullptr;
60 bool* pillar_masks = nullptr;
61};
62
65
68 public:
73
82
84 bool isAvailable() const;
93 bool run(const PillarPreprocessPoint* points,
94 std::int32_t num_points,
95 const PillarPreprocessCudaConfig& config,
96 const PillarPreprocessCudaOutputs& outputs,
97 std::string* error_message);
106 bool runToDevice(const PillarPreprocessPoint* points,
107 std::int32_t num_points,
108 const PillarPreprocessCudaConfig& config,
110 std::string* error_message);
111
112 private:
113 struct Impl;
114 std::unique_ptr<Impl> impl_;
115};
116
117} // namespace pcod_common
PillarPreprocessCudaContext & operator=(PillarPreprocessCudaContext &&other) noexcept
PillarPreprocessCudaContext(PillarPreprocessCudaContext &&other) noexcept
PillarPreprocessCudaContext(const PillarPreprocessCudaContext &)=delete
bool runToDevice(const PillarPreprocessPoint *points, std::int32_t num_points, const PillarPreprocessCudaConfig &config, const PillarPreprocessCudaDeviceOutputs &outputs, std::string *error_message)
PillarPreprocessCudaContext & operator=(const PillarPreprocessCudaContext &)=delete
bool run(const PillarPreprocessPoint *points, std::int32_t num_points, const PillarPreprocessCudaConfig &config, const PillarPreprocessCudaOutputs &outputs, std::string *error_message)
std::int32_t grid_x
Number of grid cells along X.
float center_z
Z center written to pillar coordinates.
std::int32_t num_pillars
Total number of output pillars.
float epsilon
Lower bound for unsafe normalization divisors.
float x_max
Maximum accepted X coordinate.
float z_score_std
Standard deviation for Z-score normalization.
float value_threshold
Divisor for value-threshold normalization.
float z_score_mean
Mean for Z-score normalization.
std::int32_t max_num_points
Maximum number of input points.
PointFeatureNormalizationType normalization_type
Feature transform.
float min_value
Minimum for min-max normalization.
float y_max
Maximum accepted Y coordinate.
std::int32_t feature_dim
Number of output features per point.
float y_min
Minimum accepted Y coordinate.
float z_min
Minimum accepted Z coordinate.
float max_value
Maximum for min-max normalization.
std::int32_t grid_y
Number of grid cells along Y.
float z_max
Maximum accepted Z coordinate.
float x_min
Minimum accepted X coordinate.
bool * pillar_masks
Device pillar-occupancy output.
std::int64_t * pillar_ids
Device pillar index output.
float * point_features
Device point-feature output.
bool * valid_mask
Validity flag per input point.
bool * pillar_masks
Occupancy flag per pillar.
float * point_features
Flat point-feature output.
std::int64_t * pillar_ids
Pillar index per accepted point.
float intensity
Additional scalar point feature.