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
Quick Function Reference
The following table lists all the functions defined in the vitis::ai::PoseDetect
class:
Type | Member | Arguments |
---|---|---|
std::unique_ptr<
PoseDetect
> |
create |
|
int | getInputWidth |
|
int | getInputHeight |
|
size_t | get_input_batch |
|
PoseDetectResult
|
run |
|
std::vector<
PoseDetectResult
> |
run |
|