vitis::ai::Clocs - 2.0 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2022-01-20
Version
2.0 English
Base class for clocs.

Input is points data and related params.

Output is a struct of detection results, named ClocsResult.

Sample code :

    ...
    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.

Quick Function Reference

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

Table 1. Quick Function Reference
Type Name Arguments
std::unique_ptr< Clocs > create
  • const std::string & yolo
  • const std::string & pointpillars_0
  • const std::string & pointpillars_1
  • const std::string & fusionnet
  • bool need_preprocess
int getInputWidth
  • void
int getInputHeight
  • void
size_t get_input_batch
  • void
int getPointsDim
  • void
ClocsResult run
  • const clocs::ClocsInfo & input
ClocsResult run
  • const std::vector< float > & detect2d_result
  • const clocs::ClocsInfo & input
std::vector< ClocsResult > run
  • const std::vector< clocs::ClocsInfo > & batch_inputs
std::vector< ClocsResult > run
  • const std::vector< std::vector< float > > & batch_detect2d_result
  • const std::vector< clocs::ClocsInfo > & batch_inputs