vitis::ai::PoseDetect - 3.5 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2023-06-29
Version
3.5 English
Base class for detecting a pose from an input image (cv::Mat).

Input an image (cv::Mat).

Note: Support detect a single pose.

Output is a struct of PoseDetectResult , include 14 point.

Sample code:

auto det = vitis::ai::PoseDetect::create("sp_net");
auto image = cv::imread("sample_posedetect.jpg");
auto results = det->run(image);
for(auto result: results.pose14pt) {
    std::cout << result << std::endl;
}

Display of the posedetect model results:

Figure 1. pose detect image
pose detect image

Quick Function Reference

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

Table 1. Quick Function Reference
Type Member Arguments
std::unique_ptr< PoseDetect > create
  • const std::string & model_name
  • bool need_preprocess
int getInputWidth
  • void
int getInputHeight
  • void
size_t get_input_batch
  • void
PoseDetectResult run
  • const cv::Mat & image
std::vector< PoseDetectResult > run
  • const std::vector< cv::Mat > & images