Multiple EvaluationCallbacks?

26 views
Skip to first unread message

Giorgio

unread,
May 22, 2024, 4:37:24 AMMay 22
to Ceres Solver
Hi, 

I am working on a large bundle adjustment problem using ceres and would like to add multiple instances of evaluation callbacks to the problem.
Is that possible? 

Thank you for your help!

Sameer Agarwal

unread,
May 22, 2024, 9:26:45 AMMay 22
to ceres-...@googlegroups.com
No we only allow one evaluationcallback. But that mechanism should allow you to chain things any which you want. 

What's the use case for multiple independent evaluation callbacks?

--
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/45fa3b8c-e7c9-4d99-8fdd-4308756026e0n%40googlegroups.com.

Giorgio

unread,
May 22, 2024, 9:32:35 AMMay 22
to Ceres Solver
thank you for the reply, Sameer. I am implementing some error terms that have a residual relating to a feature observation by multiple poses (so n poses have a shared residual but different jacobians). For simplicity, I wanted to have one evaluation callback computing the residual for every individual feature. 

I fixed this by just looping over all features inside the single evaluation callback. 

Giorgio

unread,
May 27, 2024, 3:24:09 PMMay 27
to Ceres Solver
Hi Sameer, 

I am trying to debug my jacobian computation and would like to use the gradient checker. For this, I understand I need to compute the residuals inside of the evaluate function (I currently precompute the residuals in the EvaluationCallback). 
Intuitively, I was tempted to call PrepareForEvaluation inside of the Evaluate function for every error term and to then turn on the gradient checker. This does not work: my residuals are evaluated as -nan if I call PrepareForEvaluation in Evaluate. 
I suspect this is due to the residual being a function of all the parameters in the problem. 

Is there a better way debugging my jacobians with autodiff?

Thank you!

Sameer Agarwal

unread,
May 27, 2024, 4:21:06 PMMay 27
to ceres-...@googlegroups.com
The simplest thing would be to wrap your computation inside a costfunction and check it.

Reply all
Reply to author
Forward
0 new messages