Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

head-pose-estimation-adas-0001 use in opecv dnn? #3850

Closed
fti-sbargule opened this issue Aug 23, 2023 · 1 comment
Closed

head-pose-estimation-adas-0001 use in opecv dnn? #3850

fti-sbargule opened this issue Aug 23, 2023 · 1 comment

Comments

@fti-sbargule
Copy link

I try to head-pose-estimation-adas-0001 this model use in cv::dnn::net

std::string config_pose = "model/pose/head-pose-estimation-adas-0001.xml";
std::string model_pose = "model/pose/head-pose-estimation-adas-0001.bin";
net_pose = cv::dnn::readNet(config_pose, model_pose);
 
inputblob_pose = cv::dnn::blobFromImage(image, scalefactor_pose, cv::Size(width_pose, height_pose), meanVal, false, false);
cv::Mat net_pose.setInput(inputblob_pose);
cv::Mat result_pose = net_pose.forward();
std::cout << "Pose detection size -: " << result_pose.size() << std::endl;

Output :-

Pose detection size -:  [1 x 1]
  • Output is one float value.
  • How to find angle of yaw, roll, pitch.
@Wovchena
Copy link
Collaborator

I'm not familiar with cv::dnn API, but I can see that forward() takes a string as arg where you can specify a name for layer which output is needed to get. There's also CV_WRAP void forward(OutputArrayOfArrays outputBlobs, const String& outputName = String()); which fills outputBlobs with all model outputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants