How to infer head pose with IE [closed]
Hi!
I'm doing inference using OpenVino's head-pose-estimation-adas-0001 model in C# using OpenCvSharp.
My code is the following:
var blob2 = CvDnn.BlobFromImage(face, 1.0, new OpenCvSharp.Size(60, 60), new OpenCvSharp.Scalar(0, 0, 0), false, false);
netHead.SetInput(blob2);
var outNames = netHead.GetUnconnectedOutLayersNames(); // three layer names (yaw, pitch, and roll)
using (var detectAngles = netHead.Forward(outNames[0]))
{
Debug.WriteLine(detectAngles.At<float>(0,0));
}
However, the value that I obtain is always 0. Which leads me to think that I'm not properly accessing the output of the network. The output is three layers (yaw, pitch, and roll) and the shape is [1,1]. I've tried to look for examples in C++ since OpenCvSharp is just a directly wrapper around OpenCV but I can only and barely find samples in python. Anyone might know how to get the output from the network?
what about the other outputs ?
If I try outNames[1] it also gives me always zero. But if I try outNames[2] it seems that I get the angle values for yaw. But on Intel's website it says the the last layer should be roll. I've checked now on debug and the last is the yaw. However, pitch and rooll continues to be zero.