multiple residual from different spaces (+ nan jacobian)

80 views
Skip to first unread message

Georgios Evangelidis

unread,
Dec 18, 2016, 6:05:11 PM12/18/16
to Ceres Solver
Hi Sameer,

I would appreciate any answer to the following questions:

ii) does ceres any normalization re. the size of the residual vector? Minimizing the sum of residuals from different spaces, e.g. having residuals from 2d and 100d space, one may want to normalize the residuals by 2 or 100 respectively, to make the sum more balanced. Does Ceres any normalization here?

i) what is best way to check for/deal with jacobian nan and return values accordingly (I was confused with an old post), i.e., where this check should better take place? (you can use the bundle_adjuster as an example)

Thank you in advance
Georgios



Sameer Agarwal

unread,
Dec 18, 2016, 7:56:41 PM12/18/16
to ceres-...@googlegroups.com
On Sun, Dec 18, 2016 at 3:05 PM Georgios Evangelidis <george.ev...@gmail.com> wrote:
Hi Sameer,

I would appreciate any answer to the following questions:

ii) does ceres any normalization re. the size of the residual vector? Minimizing the sum of residuals from different spaces, e.g. having residuals from 2d and 100d space, one may want to normalize the residuals by 2 or 100 respectively, to make the sum more balanced. Does Ceres any normalization here?

No ceres does not do any normalization.
 

i) what is best way to check for/deal with jacobian nan and return values accordingly (I was confused with an old post), i.e., where this check should better take place? (you can use the bundle_adjuster as an example)

Ceres will quite verbosely log the parameter values at which a jacobian with non-finite values is being generated. So the first step is to identify these values. Once you have that, I would work with just one cost function and try and log or check using isfinite, intermediate values in your computation of the jacobian/residual to see what expression is generating the indeterminate form (which is the most likely problem).

At this point, you likely need to invoke l`hopital's rule in some form to eliminate the singularity. See for example various corner cases as they are handled in rotation.h

Sameer



Thank you in advance
Georgios



--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/e2f82c18-9b26-4bca-9f77-5363ca4adbcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Georgios Evangelidis

unread,
Dec 19, 2016, 7:09:13 AM12/19/16
to Ceres Solver
Thank you!
Reply all
Reply to author
Forward
0 new messages