此基本类对应 cloc。
输入是点数据和相关参数。
输出是检测结果的结构体,名为 ClocsResult。
代码样本:
...
std::string yolo_model_name = "clocs_yolox_pt";
std::string pp_model_0 = "clocs_pointpillars_kitti_0_pt";
std::string pp_model_1 = "clocs_pointpillars_kitti_1_pt";
std::string fusion_model_name = "clocs_fusion_cnn_pt";
auto clocs = vitis::ai::Clocs::create
(yolo_model_name, pp_model_0,
pp_model_1, fusion_model_name, true);
vector<ClocsInfo> batch_clocs_info(input_num);
// see the test sample to read ClocsInfo
//
auto batch_ret = clocs->run(batch_clocs_info);
...
please see the test sample for detail.
函数快速参考
下表列出了 vitis::ai::Clocs
类中定义的所有函数:
类型 | 成员 | 实参 |
---|---|---|
std::unique_ptr< Clocs > |
create |
|
int | getInputWidth |
|
int | getInputHeight |
|
size_t | get_input_batch |
|
int | getPointsDim |
|
ClocsResult | run |
|
ClocsResult | run |
|
std::vector< ClocsResult > | run |
|
std::vector< ClocsResult > | run |
|