Class for generating 3D bounding box key points based on anchors.
This class implements the AnchorHandler interface for generating key points from 3D box anchors and providing anchor projection functionality.
Definition at line 34 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/postprocess/sparse_box_3d_generator.h.


Public Member Functions | |
| SparseBox3DKeyPointsGenerator (int embed_dims=256, int num_learnable_pts=0, const std::vector< std::tuple< float, float, float >> &fix_scale={{0.0, 0.0, 0.0}}) | |
| Constructor for SparseBox3DKeyPointsGenerator. More... | |
| void | init_weight () |
| Initialize weights with proper initialization schemes. More... | |
| std::variant< torch::Tensor, std::tuple< torch::Tensor, std::vector< torch::Tensor > > > | forward (const torch::Tensor &anchor, const torch::Tensor &instance_feature=torch::Tensor(), const std::vector< torch::Tensor > &T_cur2temp_list={}, const torch::Tensor &cur_timestamp=torch::Tensor(), const std::vector< torch::Tensor > &temp_timestamps={}) |
| Forward pass to generate key points from anchors. More... | |
| std::vector< torch::Tensor > | anchor_projection (const torch::Tensor &anchors, const std::vector< torch::Tensor > &transforms, const std::vector< torch::Tensor > &time_intervals) override |
| Project anchors using transformation matrices and time intervals. More... | |
| SparseBox3DKeyPointsGenerator (int embed_dims=256, int num_learnable_pts=0, const std::vector< std::tuple< float, float, float >> &fix_scale={{0.0, 0.0, 0.0}}) | |
| Constructor for SparseBox3DKeyPointsGenerator. More... | |
| void | init_weight () |
| Initialize weights with proper initialization schemes. More... | |
| std::variant< torch::Tensor, std::tuple< torch::Tensor, std::vector< torch::Tensor > > > | forward (const torch::Tensor &anchor, const torch::Tensor &instance_feature=torch::Tensor(), const std::vector< torch::Tensor > &T_cur2temp_list={}, const torch::Tensor &cur_timestamp=torch::Tensor(), const std::vector< torch::Tensor > &temp_timestamps={}) |
| Forward pass to generate key points from anchors. More... | |
| std::vector< torch::Tensor > | anchor_projection (const torch::Tensor &anchors, const std::vector< torch::Tensor > &transforms, const std::vector< torch::Tensor > &time_intervals) override |
| Project anchors using transformation matrices and time intervals. More... | |
Static Public Member Functions | |
| static std::vector< torch::Tensor > | anchor_projection_static (const torch::Tensor &anchor, const std::vector< torch::Tensor > &T_src2dst_list, const torch::Tensor &src_timestamp=torch::Tensor(), const std::vector< torch::Tensor > &dst_timestamps={}, const std::vector< torch::Tensor > &time_intervals={}) |
| Static method to project anchors using various parameters. More... | |
| static torch::Tensor | distance (const torch::Tensor &anchor) |
| Calculate Euclidean distance of anchors from origin in 2D. More... | |
| static std::vector< torch::Tensor > | anchor_projection_static (const torch::Tensor &anchor, const std::vector< torch::Tensor > &T_src2dst_list, const torch::Tensor &src_timestamp=torch::Tensor(), const std::vector< torch::Tensor > &dst_timestamps={}, const std::vector< torch::Tensor > &time_intervals={}) |
| Static method to project anchors using various parameters. More... | |
| static torch::Tensor | distance (const torch::Tensor &anchor) |
| Calculate Euclidean distance of anchors from origin in 2D. More... | |
| SparseBox3DKeyPointsGenerator::SparseBox3DKeyPointsGenerator | ( | int | embed_dims = 256, |
| int | num_learnable_pts = 0, |
||
| const std::vector< std::tuple< float, float, float >> & | fix_scale = {{0.0, 0.0, 0.0}} |
||
| ) |
Constructor for SparseBox3DKeyPointsGenerator.
| embed_dims | Dimension of embedding features |
| num_learnable_pts | Number of learnable key points |
| fix_scale | Fixed scale values for key points (array of 3D points) |
| SparseBox3DKeyPointsGenerator::SparseBox3DKeyPointsGenerator | ( | int | embed_dims = 256, |
| int | num_learnable_pts = 0, |
||
| const std::vector< std::tuple< float, float, float >> & | fix_scale = {{0.0, 0.0, 0.0}} |
||
| ) |
Constructor for SparseBox3DKeyPointsGenerator.
| embed_dims | Dimension of embedding features |
| num_learnable_pts | Number of learnable key points |
| fix_scale | Fixed scale values for key points (array of 3D points) |
|
overridevirtual |
Project anchors using transformation matrices and time intervals.
| anchors | Input anchors to project |
| transforms | Transformation matrices for coordinate transforms |
| time_intervals | Time intervals for temporal projection |
Implements AnchorHandler.
|
overridevirtual |
Project anchors using transformation matrices and time intervals.
| anchors | Input anchors to project |
| transforms | Transformation matrices for coordinate transforms |
| time_intervals | Time intervals for temporal projection |
Implements AnchorHandler.
|
static |
Static method to project anchors using various parameters.
| anchor | Input anchor tensor |
| T_src2dst_list | List of transformation matrices |
| src_timestamp | Optional source timestamp |
| dst_timestamps | Optional destination timestamps |
| time_intervals | Optional time intervals |
|
static |
Static method to project anchors using various parameters.
| anchor | Input anchor tensor |
| T_src2dst_list | List of transformation matrices |
| src_timestamp | Optional source timestamp |
| dst_timestamps | Optional destination timestamps |
| time_intervals | Optional time intervals |
|
static |
Calculate Euclidean distance of anchors from origin in 2D.
| anchor | Input anchor tensor |
|
static |
Calculate Euclidean distance of anchors from origin in 2D.
| anchor | Input anchor tensor |
| std::variant<torch::Tensor, std::tuple<torch::Tensor, std::vector<torch::Tensor> > > SparseBox3DKeyPointsGenerator::forward | ( | const torch::Tensor & | anchor, |
| const torch::Tensor & | instance_feature = torch::Tensor(), |
||
| const std::vector< torch::Tensor > & | T_cur2temp_list = {}, |
||
| const torch::Tensor & | cur_timestamp = torch::Tensor(), |
||
| const std::vector< torch::Tensor > & | temp_timestamps = {} |
||
| ) |
Forward pass to generate key points from anchors.
| anchor | Anchor tensors [batch_size, num_anchor, dim] |
| instance_feature | Optional instance features for learnable points |
| T_cur2temp_list | Optional transformation matrices |
| cur_timestamp | Optional current timestamp |
| temp_timestamps | Optional temporal timestamps |
| std::variant<torch::Tensor, std::tuple<torch::Tensor, std::vector<torch::Tensor> > > SparseBox3DKeyPointsGenerator::forward | ( | const torch::Tensor & | anchor, |
| const torch::Tensor & | instance_feature = torch::Tensor(), |
||
| const std::vector< torch::Tensor > & | T_cur2temp_list = {}, |
||
| const torch::Tensor & | cur_timestamp = torch::Tensor(), |
||
| const std::vector< torch::Tensor > & | temp_timestamps = {} |
||
| ) |
Forward pass to generate key points from anchors.
| anchor | Anchor tensors [batch_size, num_anchor, dim] |
| instance_feature | Optional instance features for learnable points |
| T_cur2temp_list | Optional transformation matrices |
| cur_timestamp | Optional current timestamp |
| temp_timestamps | Optional temporal timestamps |
| void SparseBox3DKeyPointsGenerator::init_weight | ( | ) |
Initialize weights with proper initialization schemes.
| void SparseBox3DKeyPointsGenerator::init_weight | ( | ) |
Initialize weights with proper initialization schemes.