-1

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.

1 Answers1

0

It seems that the problem came from the gradient computation. As I did a naive finite differentiate on big value, my gradient was pretty big. Trying to follow this huge gradient make the parameters get out of the reasonable space search and the next evaluation returned an even bigger value. The normalization made the problem inverse: my gradient was now too small, and the step were not big enough the statisfy an efficient descent.

I used an in-between solution: making the gradient a ratio of the function evalution then multiplying it by an adequate value for each parameter:

gradient = gradient / fx * eigenVector