miguelriemoliveira / OptimizationUtils

A set of utilities for using the python scipy optimizer functions
GNU General Public License v3.0
6 stars 0 forks source link

Optimization does not seem to work #22

Closed miguelriemoliveira closed 5 years ago

miguelriemoliveira commented 5 years ago

FYI, @tiagomfmadeira

miguelriemoliveira commented 5 years ago

So found out one problem: we were using the euclidean distance in the cost function. This was the distance between the ground truth points and the projected points.

The problem was that the projected points were of type int, so small changes in the pose of the cameras and the arucos would not change the projected pixel coordinate (the rounded integer value).

Only that ... thats exactly how optimizers work, they put small changes in each of the parameters to estimate the gradient. In our case, have integuers, small changes would result in no change. This was confusing the optimizer.

miguelriemoliveira commented 5 years ago

Will commit in a sec a version that optimizes for a long time (20 mins for now, lobby2, all 66 images, including those problematic images 29, 32, etc).

It is still optimizing now and has an average error of 1.3 pixels. This is already very good ...

Screenshot from 2019-04-24 00-49-41 Screenshot from 2019-04-24 00-49-24

tiagomfmadeira commented 5 years ago

Oh, this is great! Coming through big time @miguelriemoliveira!! Can't wait to check out the Hausdorffs on them now

miguelriemoliveira commented 5 years ago

Ahh , então você já viu . Lá se vai a supresa ... Já lhe ligo.