vitis::ai::C2D2_lite - 2.0 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2022-01-20
Version
2.0 English
Base class for detecting objects in the input image(cv::Mat). Input is an image(cv::Mat). Output is the position of the objects in the input image. Sample code:
std::vector<cv::Mat> images;
for (auto name : image_names) {
  images.push_back(cv::imread(name, cv::IMREAD_GRAYSCALE));
}
auto model = vitis::ai::C2D2_lite::create(C2D2_lite_0_pt, C2D2_lite_1_pt);
auto result = model->run(images);
std::cout << result;

Quick Function Reference

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

Table 1. Quick Function Reference
Type Name Arguments
std::unique_ptr< C2D2_lite > create
  • const std::string & model_name0
  • const std::string & model_name1
  • bool need_preprocess
float run
  • const std::vector< cv::Mat > & image
std::vector< float > run
  • const std::vector< std::vector< cv::Mat > > & images
int getInputWidth
  • void
int getInputHeight
  • void
size_t get_input_batch
  • void