vitis::ai::PointPillars

Base class for pointpillars .

Input is points data.

Output is a struct of detection results, named PointPillarsResult.

Sample code :

    ...
    auto net = vitis::ai::PointPillars::create("pointpillars_kitti_12000_0_pt",
"pointpillars_kitti_12000_1_pt", true); V1F PointCloud ; int len =
getfloatfilelen( lidar_path); PointCloud.resize( len );
    myreadfile(PointCloud.data(), len, lidar_path);
    auto res = net->run(PointCloud);
    ...
  please see the test sample for detail.

Quick Function Reference

The following table lists all the functions defined in the vitis::ai::PointPillars class:

Table 1. Quick Function Reference
TypeNameArguments
std::unique_ptr< PointPillars >create
  • const std::string & model_name
  • const std::string & model_name1
vitis::ai::PointPillarsResultrun
  • const V1F & v1f
vitis::ai::PointPillarsResultrun
  • const float * points
size_tget_input_batch
  • void
voiddo_pointpillar_display
  • PointPillarsResult & res
  • int flag
  • DISPLAY_PARAM & dispp
  • cv::Mat & rgb_map
  • cv::Mat & bev_map
  • int width
  • int height
  • ANNORET & annoret

create

Factory function to get an instance of derived classes of class PointPillars.

Prototype

std::unique_ptr< PointPillars > create(const std::string &model_name, const std::string &model_name1);

Parameters

The following table lists the create function arguments.

Table 2. create Arguments
Type Name Description
const std::string & model_name Model name for PointNet
const std::string & model_name1 Model name for RPN

Returns

An instance of PointPillars class.

run

Function of get result of the PointPillars neuron network.

Prototype


            vitis::ai::PointPillarsResult run(const V1F &v1f)=0;

Parameters

The following table lists the run function arguments.

Table 3. run Arguments
Type Name Description
const V1F & v1f point data in vector<float>

Returns

PointPillarsResult.

run

Function of get result of the PointPillars neuron network.

Prototype


            vitis::ai::PointPillarsResult run(const float *points, int len)=0;

Parameters

The following table lists the run function arguments.

Table 4. run Arguments
Type Name Description
const float * points point data refered by float* @len: length of the points data ( float data length, not byte data length )

Returns

PointPillarsResult.

get_input_batch

Function to get input batch of the PointPillars network.

Prototype

size_t get_input_batch() const =0;

Returns

Input batch of the PointPillars network.

do_pointpillar_display

Function to produce the visible result from PointPillarsResult after calling run(). This is a helper function which can be ignored if you wants to process the PointPillarsResult using another method.

Prototype

void do_pointpillar_display(PointPillarsResult &res, int flag, DISPLAY_PARAM &dispp, cv::Mat &rgb_map, cv::Mat &bev_map, int width, int height, ANNORET &annoret)=0;

Parameters

The following table lists the do_pointpillar_display function arguments.

Table 5. do_pointpillar_display Arguments
Type Name Description
PointPillarsResult & res [input] PointPillarsResult from run().
int flag [input] which visible result to produce. can be assigned to below values: E_BEV : only produce BEV picture E_RGB : only produce RGB picture E_BEV|E_RGB : produce both pictures
DISPLAY_PARAM & dispp [input] display parameter for the Points data. Refer to the readme in the overview for more detail.
cv::Mat & rgb_map [input|output] : original rgb picture for drawing detect result. It can be blank (cv::Mat{}), if only BEV is required
cv::Mat & bev_map [input|output] original bev picture for drawing detect result. It can be blank (cv::Mat{}), if only RGB required
int width [input] original rgb picture width.
int height [input] original rgb picture height.
ANNORET & annoret [output] return the annoret variable for accuracy calculation.