graphical representation of my pipeline
I'm trying to get a pose estimation of a face captured from a video feed. I use a face alignement algorithm of tracking.js. This give me points which I then use to try to estimate the position of my face in camera space.
As face is a non-rigid object and angle issue may modify the aligned point on the image, I use a parametrized 3D point list that is then projected onto a plane to get a corresponding 2D point list.
Then I do a point-to-point squared distance to compute an error rate that I then try to minimize.
I'm using FMIN.js's conjugate gradient algorithm to minimize the error rate.
But most of the time, it seems that the algorithm get stuck on the wolfe linear part due to a zero value. Is it due to using a finite differential gradient?
Am I doing something wrong?
I'm pretty new to optimization algorithm, I'm not sure I'm doing everything right for it to work. my values tend to be pretty high (~ 80k) and that causes my gradients to be big too. I tried doing a normalisation process (using the first error as a norm) but that didn't get any better.
Right now for finite difference gradient computing, I'm using a small value from encountered values.
I'm also limiting gradient of rotation to Pi/2 as I think that a too big value would cause the algorithm to over step, going out of the angle bounds.