vitis::ai::PoseDetect - 1.4.1 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2021-12-11
Version
1.4.1 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
Image sample_posedetect_result.jpg

Quick Function Reference

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

Table 1. Quick Function Reference
Type Name 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