Performance small optimization problem

752 views
Skip to first unread message

Tobias Strauß

unread,
Nov 14, 2014, 3:37:11 AM11/14/14
to ceres-...@googlegroups.com
I have a very small optimization problem calculating the back-projection of a single point (for an implicit camera model). I have to solve nearly the same optimization problem many times for the calculation of lookup tables for image rectification.
Using levmar I need approx. 1s, using ceres 50s (solving 1 million times the optimization problem for each one point). Is there a way to speed up this kind of problem?

Julius Ziegler

unread,
Nov 14, 2014, 4:31:28 AM11/14/14
to ceres-...@googlegroups.com
Hi Tobi,
I have a similar Problem (estimating 3 parameters, ~1000000 times). I
profiled it with Valgrind, and was surprised that most time is spend in
the function ArmijoLineSearch (despite me using a trust region method).

Anyway, this could indicate that the line search is much too verbose and
sould be terminated earlier.

I also observed that, further down the call tree, most time is spent in
the Jet'ified versions of the residual functions. Maybe it could be
beneficial to replace Armijo's rule with something simpler, that does
not require derivatives, like a simple interval subdivision. I think
this would be particularly beneficial if the residual functions are
close to linear.

I admit that I have not yet analyzed the ratio of line search iterations
per solver iterations. If it is very small, then both my observations
are probably meaningless.

Best regards
Julius




Julius Ziegler

unread,
Nov 14, 2014, 8:25:54 AM11/14/14
to ceres-...@googlegroups.com
On 11/14/2014 10:29 AM, Julius Ziegler wrote:
> Hi Tobi,
>
> On 11/14/2014 09:37 AM, Tobias Strauß wrote:
>> I have a very small optimization problem calculating the back-projection of
>> a single point (for an implicit camera model). I have to solve nearly the
>> same optimization problem many times for the calculation of lookup tables
>> for image rectification.
>> Using levmar I need approx. 1s, using ceres 50s (solving 1 million times
>> the optimization problem for each one point). Is there a way to speed up
>> this kind of problem?
>>
>
> I have a similar Problem (estimating 3 parameters, ~1000000 times). I
> profiled it with Valgrind, and was surprised that most time is spend in
> the function ArmijoLineSearch (despite me using a trust region method).

It came to my mind that my problem is probably different from yours in
so far that it has more than a few residuals to compute (121 on my last
experiment). I changed that to only 9 residuals (I cannot easily go
lower), and that changed the profile a bit. The lot (80%) is still in
the line search method, but most of it (60% of total runtime) it spends
with polynomial root finding. Only 12% of runtime is in evaluation of
residuals/jacobians.

Sameer Agarwal

unread,
Nov 14, 2014, 10:21:53 AM11/14/14
to ceres-...@googlegroups.com
Tobias,

It is hard to help here without more details. The first step would be to look at the Summary::FullReport() output.

What is taking time?
1. Preprocessor?
2. Jacobian evaluation?
3. LinearSolver, which linear solver are you using?

Sameer


On Fri Nov 14 2014 at 12:37:12 AM Tobias Strauß <tobias...@web.de> wrote:
I have a very small optimization problem calculating the back-projection of a single point (for an implicit camera model). I have to solve nearly the same optimization problem many times for the calculation of lookup tables for image rectification.
Using levmar I need approx. 1s, using ceres 50s (solving 1 million times the optimization problem for each one point). Is there a way to speed up this kind of problem?

--
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/ef531054-06e7-46e9-9be5-b7654f82dda4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sameer Agarwal

unread,
Nov 14, 2014, 10:25:56 AM11/14/14
to ceres-...@googlegroups.com
Julius,

You are seeing Armijo line search because you have upper or lower bounds enabled. The line search is used to project onto the box constraints.

You are right that Jets have an overhead, for a problem like this where you have such strong performance requirements, I recommend using analytic derivatives.

Last but not the least, I have not exposed the line search settings used in the trust region solver and they are hard coded to use derivatives right now, but if this turns out to be onerous and the bisection based line search is better, then we can expose that in Solver::Options.

Sameer




--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/5465CB89.1030401%40atlatec.de.

Sameer Agarwal

unread,
Nov 14, 2014, 10:29:14 AM11/14/14
to ceres-...@googlegroups.com
Julius,

Can you post the output of Summary::FullReport and your profiling information? Better still is it possible for you to share your code?


There is certainly a performance loss if you have bounds constraints enabled, but I have not spent a ton of time optimizing the performance of the line search routines, the focus has been on correctness rather than speed up till now. If you have a benchmark problem then I can use it to measure and tune the performance.

Sameer



--
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+unsubscribe@googlegroups.com.

Julius Ziegler

unread,
Nov 14, 2014, 11:23:26 AM11/14/14
to ceres-...@googlegroups.com
Hi Sameer,

On 11/14/2014 04:29 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> Julius,
>
> Can you post the output of Summary::FullReport and your profiling
> information? Better still is it possible for you to share your code?

attached you find a random piece of the output. I have also attached the
callgrind output to view with kcachegrind. I actually dont know if it is
of any use standalone, or if it is necessary to have the code and
binaries around.

As for the code, currently I am tied up with other stuff, but maybe I
can put something together next week.

Julius
>> email to ceres-solver...@googlegroups.com.
summary.txt
callgrind.out.15820

Sameer Agarwal

unread,
Nov 14, 2014, 1:03:21 PM11/14/14
to ceres-...@googlegroups.com
Thanks Julius,
This is interesting. Let me do some experiments on my end.
Sameer




>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/ceres-solver/5466027A.2050902%40atlatec.de.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/54662C16.60502%40atlatec.de.

Sameer Agarwal

unread,
Nov 14, 2014, 1:44:28 PM11/14/14
to ceres-...@googlegroups.com
Julius,
Try

Solver::Options::line_search_interpolation_type = BISECTION

and see how well that does for you. This should disable all the jacobian computation inside the armijo line search and just use the objective function values.

Sameer

Julius Ziegler

unread,
Nov 14, 2014, 3:02:46 PM11/14/14
to ceres-...@googlegroups.com
On 11/14/2014 07:44 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> Julius,
> Try
>
> Solver::Options::line_search_interpolation_type = BISECTION
>
> and see how well that does for you. This should disable all the jacobian
> computation inside the armijo line search and just use the objective
> function values.

Ok, thanks. I will try that tomorrow (its already late here). Btw, I
feel we have hijacked Tobias' thread. His original post had nothing to
do with constrained optimization. So, to sooth him, I will also disable
the constraints on my problem and profile that.

Julius
>>>>> email to ceres-solver...@googlegroups.com.
>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/ceres-solver/5466027A.2050902%40atlatec.de.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>
>>> --
>>> 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/ms
>>> gid/ceres-solver/54662C16.60502%40atlatec.de.

Julius Ziegler

unread,
Nov 14, 2014, 3:04:21 PM11/14/14
to ceres-...@googlegroups.com
Btw, did the callgrind output help? Were you able to view it?
>>>>> email to ceres-solver...@googlegroups.com.
>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/ceres-solver/5466027A.2050902%40atlatec.de.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>
>>> --
>>> 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/ms
>>> gid/ceres-solver/54662C16.60502%40atlatec.de.

Sameer Agarwal

unread,
Nov 14, 2014, 3:05:11 PM11/14/14
to ceres-...@googlegroups.com
no, I did not look at the callgrind output, no callgrind on my laptop.


>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/ceres-solver/5466027A.2050902%40atlatec.de.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>
>>> --
>>> 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

>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/ceres-solver/54662C16.60502%40atlatec.de.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/54665FCF.2050607%40atlatec.de.

Sameer Agarwal

unread,
Nov 14, 2014, 3:07:50 PM11/14/14
to ceres-...@googlegroups.com
great, I am also going to try and add some more profiling data into ceres around the line search. 

Sameer


>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/ceres-solver/5466027A.2050902%40atlatec.de.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>
>>> --
>>> 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

>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/ceres-solver/54662C16.60502%40atlatec.de.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/54665F7A.2010805%40atlatec.de.

Sameer Agarwal

unread,
Nov 16, 2014, 10:41:19 AM11/16/14
to ceres-...@googlegroups.com
Julius,

Your email prompted me to look a bit more closely at the performance of the line search as it is being called from the trust region solver and there are some obvious places where we will make significant improvements over the next two weeks.

Sameer



>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/ceres-solver/5466027A.2050902%40atlatec.de.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>
>>> --
>>> 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

>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/ceres-solver/54662C16.60502%40atlatec.de.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/54665F7A.2010805%40atlatec.de.

Julius Ziegler

unread,
Nov 17, 2014, 11:33:59 AM11/17/14
to ceres-...@googlegroups.com
On 11/14/2014 09:37 AM, Tobias Strauß wrote:
Hi Tobias, Sameer,

As promised, I profiled the problem again without bound constraints. I
have the profile attached, this time as a kcachegrind-screenshot. Most
time is spent in evaluating the cost function, and in some linear
algebra stuff (householderQr). This is somehow what I would expect.

Perhaps a third of the runtime is spent in memory management related
stuff (free, malloc), and this is something that probably could be
avoided. But this wont bring you near the 50 fold speedup of liblevmar.

Best regards
Julius





profile.png

Sameer Agarwal

unread,
Nov 17, 2014, 11:50:13 AM11/17/14
to ceres-...@googlegroups.com
Hi Julius,

Thanks for the profile. This is very useful. 

There are a few places where we are doing mallocs which we are in the process of tracking down and removing. 

That said, I am not sure your comparison to levmar is totally fair though. You are using autodiff. Which is not possible with levmar and that has its overhead, and for small problems this overhead is substantial. I think you will gain substantial performance if you moved to analytic derivatives.

You could also try using DENSE_NORMAL_CHOLESKY as your linear solver (Which is what levmar uses), it should be a bit more efficient.

Sameer





--
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+unsubscribe@googlegroups.com.

Julius Ziegler

unread,
Nov 17, 2014, 12:26:07 PM11/17/14
to ceres-...@googlegroups.com
On 11/17/2014 05:50 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> Hi Julius,
>
> Thanks for the profile. This is very useful.
>
> There are a few places where we are doing mallocs which we are in the
> process of tracking down and removing.
>
> That said, I am not sure your comparison to levmar is totally fair though.

Just for completeness, I did not compare my problem to levmar. Tobias
did this with his problem, and his problem might be very different from
mine.

I actually suspect the following (but it is impossible to say without a
proper profile of Tobias problem):
- He uses analytic derivatives, and his cost function is simpler then mine.
- His problem is well natured (close to linear), and converges faster
then mine.
- THEN the overhead of the malloc's (and other bootstrapping code in
solve) might actually start to show.

levmar is probably much leaner in that last respect (it is also more
limited of course).

Best
Julius
>> email to ceres-solver...@googlegroups.com.

Sameer Agarwal

unread,
Nov 17, 2014, 12:35:07 PM11/17/14
to ceres-...@googlegroups.com
To be honest I have not devoted much time to optimizing startup performance of ceres and performance on small problems. This series of emails is starting to make me spend a bit more time on it, which is a good thing. 
Sameer



>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/ceres-solver/546A2308.9090104%40atlatec.de.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/546A2F41.1030407%40atlatec.de.

Julius Ziegler

unread,
Nov 17, 2014, 12:36:38 PM11/17/14
to ceres-...@googlegroups.com
Sameer, you are a very industrious guy, every single email makes you try
harder :-)

We appreciate it!
>>>> email to ceres-solver...@googlegroups.com.
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/ceres-solver/546A2308.9090104%40atlatec.de.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>
>> --
>> 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/546A2F41.1030407%40atlatec.de.

Keir Mierle

unread,
Nov 17, 2014, 2:08:16 PM11/17/14
to ceres-...@googlegroups.com
Ceres has a long history of optimizing for large problems at the cost of startup time and memory. This isn't always the right tradeoff. In the past Sameer and myself have debated making a "stripped down" solver that avoided some of the startup overhead that Ceres has. This is especially the case for non-sparse problems where all the bookkeeping we do for handling sparse problems is pure overhead.

It's hard to make a solver that scales both up to massive problems, and down to the size of running an optimization per-pixel. In the latter case, every allocation and operation counts. In libmv, the vision library used in Blender, I implemented a truly minimal LM that inlines the cost function inside the core LM loop with templates [1]. It's inferior to Ceres in many ways, but for Blender, it is much much faster to use this inferior LM that's "good enough" to solve for the per-pixel inverse of a distortion model.


Julius Ziegler

unread,
Feb 12, 2015, 3:46:28 PM2/12/15
to ceres-...@googlegroups.com
Hi Keir,

I have looked at

> [1]
https://developer.blender.org/diffusion/LMV/browse/master/src/libmv/numeric/levenberg_marquardt.h

and adapted it to use automatic differentiation with Jets, and to be
able to accept cost functions that where originally written for Ceres.

In my problem this is 14 times faster then Ceres.

I think this is useful enough to contribute it, but I am not sure what
would be a good place to do so (since the inteface changed from what it
probably has to be within blender).

Do you have any suggestions?

Best
Julius


On 11/17/2014 08:08 PM, Keir Mierle wrote:
> Ceres has a long history of optimizing for large problems at the cost of
> startup time and memory. This isn't always the right tradeoff. In the
> past Sameer and myself have debated making a "stripped down" solver that
> avoided some of the startup overhead that Ceres has. This is especially
> the case for non-sparse problems where all the bookkeeping we do for
> handling sparse problems is pure overhead.
>
> It's hard to make a solver that scales both up to massive problems, and
> down to the size of running an optimization per-pixel. In the latter
> case, every allocation and operation counts. In libmv
> <https://developer.blender.org/diffusion/LMV/>, the vision library used
> in Blender, I implemented a truly minimal LM that inlines the cost
> function inside the core LM loop with templates [1]. It's inferior to
> Ceres in many ways, but for Blender, it is much much faster to use this
> inferior LM that's "good enough" to solve for the per-pixel inverse of a
> distortion model.
>
> [1] https://developer.blender.org/diffusion/LMV/browse/master/src/libmv/numeric/levenberg_marquardt.h
>
> On Mon, Nov 17, 2014 at 9:34 AM, Julius Ziegler <zie...@atlatec.de
> <mailto:zie...@atlatec.de>> wrote:
>
> Sameer, you are a very industrious guy, every single email makes you try
> harder :-)
>
> We appreciate it!
>
> On 11/17/2014 06:35 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> > To be honest I have not devoted much time to optimizing startup
> performance
> > of ceres and performance on small problems. This series of emails is
> > starting to make me spend a bit more time on it, which is a good
> thing.
> > Sameer
> >
> >
> > On Mon Nov 17 2014 at 9:26:08 AM Julius Ziegler
> <zie...@atlatec.de <mailto:zie...@atlatec.de>>
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> >>>> To view this discussion on the web visit
> https://groups.google.com/d/
> >>>> msgid/ceres-solver/546A2308.9090104%40atlatec.de
> <http://40atlatec.de>.
> >>>> For more options, visit https://groups.google.com/d/optout.
> >>>>
> >>>
> >>
> >> --
> >> 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> >> To view this discussion on the web visit https://groups.google.com/d/
> >> msgid/ceres-solver/546A2F41.1030407%40atlatec.de
> <http://40atlatec.de>.
> >> For more options, visit https://groups.google.com/d/optout.
> >>
> >
>
> --
> 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/546A31B9.3050706%40atlatec.de.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Sameer Agarwal

unread,
Feb 13, 2015, 12:07:16 AM2/13/15
to ceres-...@googlegroups.com
This is interesting and surprising.

How is it that in your previous profile the bulk of your time was spent in evaluating the cost function, but replacing the core loop gets you 14x speedup. 

Could you share the benchmark code and numbers? I'd love to take a look at it and see if there is anything I can do to speed things up.

Sameer


>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
>     >>>> To view this discussion on the web visit
>     https://groups.google.com/d/
>     >>>> msgid/ceres-solver/546A2308.9090104%40atlatec.de
>     <http://40atlatec.de>.
>     >>>> For more options, visit https://groups.google.com/d/optout.
>     >>>>
>     >>>
>     >>
>     >> --
>     >> 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

>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
>     >> To view this discussion on the web visit https://groups.google.com/d/
>     >> msgid/ceres-solver/546A2F41.1030407%40atlatec.de
>     <http://40atlatec.de>.
>     >> For more options, visit https://groups.google.com/d/optout.
>     >>
>     >
>
>     --
>     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,

>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
>     To view this discussion on the web visit
>     https://groups.google.com/d/msgid/ceres-solver/546A31B9.3050706%40atlatec.de.
>     For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/54DD10E1.708%40atlatec.de.

Julius Ziegler

unread,
Feb 13, 2015, 4:07:47 AM2/13/15
to ceres-...@googlegroups.com
On 02/13/2015 06:07 AM, Sameer Agarwal wrote:
> This is interesting and surprising.
>
> How is it that in your previous profile the bulk of your time was spent
> in evaluating the cost function, but replacing the core loop gets you
> 14x speedup.

It is a different problem from what I reported earlier, probably more
close to what the original post by Tobi was about. It is simpler (two
paramteres, two residuals) and has no constraints.

I cannot easily cut the code clear of my work stuff (which I cannot
share), but it is maybe a good idea to create the profiles again, hang on...


> Could you share the benchmark code and numbers? I'd love to take a look
> at it and see if there is anything I can do to speed things up.
>
> Sameer
>
> On Thu Feb 12 2015 at 12:46:29 PM Julius Ziegler <zie...@atlatec.de
> <mailto:zie...@atlatec.de>> wrote:
>
> Hi Keir,
>
> I have looked at
>
> > [1]
> https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h
> <https://developer.blender.org/diffusion/LMV/browse/master/src/libmv/numeric/levenberg_marquardt.h>
>
> and adapted it to use automatic differentiation with Jets, and to be
> able to accept cost functions that where originally written for Ceres.
>
> In my problem this is 14 times faster then Ceres.
>
> I think this is useful enough to contribute it, but I am not sure what
> would be a good place to do so (since the inteface changed from what it
> probably has to be within blender).
>
> Do you have any suggestions?
>
> Best
> Julius
>
>
> On 11/17/2014 08:08 PM, Keir Mierle wrote:
> > Ceres has a long history of optimizing for large problems at the
> cost of
> > startup time and memory. This isn't always the right tradeoff. In the
> > past Sameer and myself have debated making a "stripped down"
> solver that
> > avoided some of the startup overhead that Ceres has. This is
> especially
> > the case for non-sparse problems where all the bookkeeping we do for
> > handling sparse problems is pure overhead.
> >
> > It's hard to make a solver that scales both up to massive
> problems, and
> > down to the size of running an optimization per-pixel. In the latter
> > case, every allocation and operation counts. In libmv
> > <https://developer.blender.__org/diffusion/LMV/
> <https://developer.blender.org/diffusion/LMV/>>, the vision library used
> > in Blender, I implemented a truly minimal LM that inlines the cost
> > function inside the core LM loop with templates [1]. It's inferior to
> > Ceres in many ways, but for Blender, it is much much faster to use
> this
> > inferior LM that's "good enough" to solve for the per-pixel
> inverse of a
> > distortion model.
> >
> > [1]
> https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>> wrote:
> >
> > Sameer, you are a very industrious guy, every single email
> makes you try
> > harder :-)
> >
> > We appreciate it!
> >
> > On 11/17/2014 06:35 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> > > To be honest I have not devoted much time to optimizing startup
> > performance
> > > of ceres and performance on small problems. This series of
> emails is
> > > starting to make me spend a bit more time on it, which is a good
> > thing.
> > > Sameer
> > >
> > >
> > > On Mon Nov 17 2014 at 9:26:08 AM Julius Ziegler
> > <zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > >>>> email to ceres-solver+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%__2Buns...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>.
> > >>>> To view this discussion on the web visit
> > https://groups.google.com/d/
> > >>>> msgid/ceres-solver/546A2308.__9090104%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>.
> > >>>> For more options, visit
> https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
> > >>>>
> > >>>
> > >>
> > >> --
> > >> 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%__2Buns...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>.
> > >> To view this discussion on the web visit
> https://groups.google.com/d/
> > >> msgid/ceres-solver/546A2F41.__1030407%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>.
> > >> For more options, visit
> https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
> > >>
> > >
> >
> > --
> > 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%__2Buns...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/__msgid/ceres-solver/546A31B9.__3050706%40atlatec.de
> <https://groups.google.com/d/msgid/ceres-solver/546A31B9.3050706%40atlatec.de>.
> > For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
> >
> >
> > --
> > 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver+...@googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
> > For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/__msgid/ceres-solver/54DD10E1.__708%40atlatec.de
> <https://groups.google.com/d/msgid/ceres-solver/54DD10E1.708%40atlatec.de>.
> For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Sameer Agarwal

unread,
Feb 13, 2015, 5:43:00 AM2/13/15
to ceres-...@googlegroups.com
It is a different problem from what I reported earlier, probably more
close to what the original post by Tobi was about. It is simpler (two
paramteres, two residuals) and has no constraints.

I cannot easily cut the code clear of my work stuff (which I cannot
share), but it is maybe a good idea to create the profiles again, hang on...

Thanks Julius. a 2x2 problem can probably solved much faster with a solver with much fewer layers of abstraction than ceres. That said, I am still curious what is the fraction of time being spent in various parts of ceres for problems of this size and what I can do to fix them.

Sameer



 

>     >     >>>> To view this discussion on the web visit
>     >     https://groups.google.com/d/
>     >     >>>> msgid/ceres-solver/546A2308.__9090104%40atlatec.de
>     <http://40atlatec.de>
>     >     <http://40atlatec.de>.
>     >     >>>> For more options, visit
>     https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>.
>     >     >>>>
>     >     >>>
>     >     >>
>     >     >> --
>     >     >> 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+unsubscribe@__googlegroups.com
>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>

>     >     >> To view this discussion on the web visit
>     https://groups.google.com/d/
>     >     >> msgid/ceres-solver/546A2F41.__1030407%40atlatec.de
>     <http://40atlatec.de>
>     >     <http://40atlatec.de>.
>     >     >> For more options, visit
>     https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>.
>     >     >>
>     >     >
>     >
>     >     --
>     >     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+unsubscribe@__googlegroups.com
>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>

>     >     To view this discussion on the web visit
>     >
>      https://groups.google.com/d/__msgid/ceres-solver/546A31B9.__3050706%40atlatec.de
>     <https://groups.google.com/d/msgid/ceres-solver/546A31B9.3050706%40atlatec.de>.
>     >     For more options, visit https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>.
>     >
>     >
>     > --
>     > 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+unsubscribe@__googlegroups.com
>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>

>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
>     > To view this discussion on the web visit
>     >
>     https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com
>     <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com>
>     >
>     <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer
>     <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>     > For more options, visit https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>.
>
>     --
>     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+unsubscribe@__googlegroups.com
>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
>     To view this discussion on the web visit
>     https://groups.google.com/d/__msgid/ceres-solver/54DD10E1.__708%40atlatec.de
>     <https://groups.google.com/d/msgid/ceres-solver/54DD10E1.708%40atlatec.de>.
>     For more options, visit https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>.
>
> --
> 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
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/54DDBEA2.2020207%40atlatec.de.

Julius Ziegler

unread,
Feb 13, 2015, 7:52:19 AM2/13/15
to ceres-...@googlegroups.com
On 02/13/2015 11:42 AM, Sameer Agarwal wrote:
> It is a different problem from what I reported earlier, probably more
> close to what the original post by Tobi was about. It is simpler (two
> paramteres, two residuals) and has no constraints.
>
> I cannot easily cut the code clear of my work stuff (which I cannot
> share), but it is maybe a good idea to create the profiles again,
> hang on...
>
>
> Thanks Julius. a 2x2 problem can probably solved much faster with a
> solver with much fewer layers of abstraction than ceres. That said, I am
> still curious what is the fraction of time being spent in various parts
> of ceres for problems of this size and what I can do to fix them.

So I got the profiles done, but I think that I will have to do the ceres
profile again. Ceres spends 39% of its runtime in the
internal::StringAppend method, which suggests that I accidentially have
some logging enabled. The logging clutters the profile a lot. I do not
see any console output, so I assume the logging is going to files.

It is not immediately clear to me how to reliably disable all logging.
Does

logging_type = SILENT;

suffice?

Julius

> Sameer
>
>
>
>
>
>
>
> > Could you share the benchmark code and numbers? I'd love to take a
> look
> > at it and see if there is anything I can do to speed things up.
> >
> > Sameer
> >
> > On Thu Feb 12 2015 at 12:46:29 PM Julius Ziegler
> <zie...@atlatec.de <mailto:zie...@atlatec.de>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>> wrote:
> >
> > Hi Keir,
> >
> > I have looked at
> >
> > > [1]
> >
> https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>
> >
> <https://developer.blender.__org/diffusion/LMV/browse/__master/src/libmv/numeric/__levenberg_marquardt.h
> > > <https://developer.blender.____org/diffusion/LMV/
> > <https://developer.blender.__org/diffusion/LMV/
> <https://developer.blender.org/diffusion/LMV/>>>, the vision library
> used
> > > in Blender, I implemented a truly minimal LM that inlines
> the cost
> > > function inside the core LM loop with templates [1]. It's
> inferior to
> > > Ceres in many ways, but for Blender, it is much much faster
> to use
> > this
> > > inferior LM that's "good enough" to solve for the per-pixel
> > inverse of a
> > > distortion model.
> > >
> > > [1]
> >
> https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>
> >
> <https://developer.blender.__org/diffusion/LMV/browse/__master/src/libmv/numeric/__levenberg_marquardt.h
> ceres-solver+unsubscribe@__goo__glegroups.com <http://googlegroups.com>
> > > <mailto:ceres-solver%____2Bun...@googlegroups.com
> <mailto:ceres-solver%25__2Bun...@googlegroups.com>
> > <mailto:ceres-solver%__252Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>.
> > > >>>> To view this discussion on the web visit
> > > https://groups.google.com/d/
> > > >>>>
> msgid/ceres-solver/546A2308.____9090104%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>.
> > > >>>> For more options, visit
> > https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> > > >>>>
> > > >>>
> > > >>
> > > >> --
> > > >> 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+unsubscribe@__goo__glegroups.com <http://googlegroups.com>
> > > <mailto:ceres-solver%____2Bun...@googlegroups.com
> <mailto:ceres-solver%25__2Bun...@googlegroups.com>
> > <mailto:ceres-solver%__252Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>.
> > > >> To view this discussion on the web visit
> > https://groups.google.com/d/
> > > >> msgid/ceres-solver/546A2F41.____1030407%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>.
> > > >> For more options, visit
> > https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> > > >>
> > > >
> > >
> > > --
> > > 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+unsubscribe@__goo__glegroups.com <http://googlegroups.com>
> > > <mailto:ceres-solver%____2Bun...@googlegroups.com
> <mailto:ceres-solver%25__2Bun...@googlegroups.com>
> > <mailto:ceres-solver%__252Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/____msgid/ceres-solver/546A31B9.____3050706%40atlatec.de
> <https://groups.google.com/d/__msgid/ceres-solver/546A31B9.__3050706%40atlatec.de>
> https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> > >
> > >
> > > --
> > > 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+unsubscribe@__goo__glegroups.com
> <http://googlegroups.com>
> > > <mailto:ceres-solver+_...@googlegroups.com
> <mailto:ceres-solver%2B__uns...@googlegroups.com>
> > <mailto:ceres-solver%__2Buns...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com>>
> > >
> >
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer>
> https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > 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+unsubscribe@__goo__glegroups.com
> <http://googlegroups.com>
> > <mailto:ceres-solver%__2Buns...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/____msgid/ceres-solver/54DD10E1.____708%40atlatec.de
> <https://groups.google.com/d/__msgid/ceres-solver/54DD10E1.__708%40atlatec.de>
> > For more options, visit https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver+...@googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com?utm_medium=email&__utm_source=footer
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
> > For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/__msgid/ceres-solver/54DDBEA2.__2020207%40atlatec.de
> <https://groups.google.com/d/msgid/ceres-solver/54DDBEA2.2020207%40atlatec.de>.
> For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CAK0oyEp1Z%3DPNoqB43xKTG8rVu9bWGa2to-189z27zBPwfsgr1Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEp1Z%3DPNoqB43xKTG8rVu9bWGa2to-189z27zBPwfsgr1Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Julius Ziegler

unread,
Feb 13, 2015, 8:54:27 AM2/13/15
to ceres-...@googlegroups.com
On 02/13/2015 11:42 AM, Sameer Agarwal wrote:
> It is a different problem from what I reported earlier, probably more
> close to what the original post by Tobi was about. It is simpler (two
> paramteres, two residuals) and has no constraints.
>
> I cannot easily cut the code clear of my work stuff (which I cannot
> share), but it is maybe a good idea to create the profiles again,
> hang on...
>
>
> Thanks Julius. a 2x2 problem can probably solved much faster with a
> solver with much fewer layers of abstraction than ceres. That said, I am
> still curious what is the fraction of time being spent in various parts
> of ceres for problems of this size and what I can do to fix them.

...so I did not manage to get rid of all logging (still 10% runtime or
so are burnt in vprintf, string constructors etc.), but here are the
profiles anyway.

I have highlighted the part that is made up from evaluating the error
function and its Jacobian. In the "lean" implementation, this accounts
for 75% of the runtime. In ceres, its only 10% of the runtime.

The ceres profile is very cluttered, but it is obvious that a lot of
memory gets allocated dynamically, while the lean solver does almost no
dynamic memory allocation.

Julius



> Sameer
>
>
>
>
>
>
>
> > Could you share the benchmark code and numbers? I'd love to take a
> look
> > at it and see if there is anything I can do to speed things up.
> >
> > Sameer
> >
> > On Thu Feb 12 2015 at 12:46:29 PM Julius Ziegler
> <zie...@atlatec.de <mailto:zie...@atlatec.de>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>> wrote:
> >
> > Hi Keir,
> >
> > I have looked at
> >
> > > [1]
> >
> > > <https://developer.blender.____org/diffusion/LMV/
> > <https://developer.blender.__org/diffusion/LMV/
> <https://developer.blender.org/diffusion/LMV/>>>, the vision library
> used
> > > in Blender, I implemented a truly minimal LM that inlines
> the cost
> > > function inside the core LM loop with templates [1]. It's
> inferior to
> > > Ceres in many ways, but for Blender, it is much much faster
> to use
> > this
> > > inferior LM that's "good enough" to solve for the per-pixel
> > inverse of a
> > > distortion model.
> > >
> > > [1]
> >
> ceres-solver+unsubscribe@__goo__glegroups.com <http://googlegroups.com>
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>.
> > > >>>> To view this discussion on the web visit
> > > https://groups.google.com/d/
> > > >>>>
> msgid/ceres-solver/546A2308.____9090104%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>.
> > > >>>> For more options, visit
> > https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> > > >>>>
> > > >>>
> > > >>
> > > >> --
> > > >> 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+unsubscribe@__goo__glegroups.com <http://googlegroups.com>
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>.
> > > >> To view this discussion on the web visit
> > https://groups.google.com/d/
> > > >> msgid/ceres-solver/546A2F41.____1030407%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>.
> > > >> For more options, visit
> > https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> > > >>
> > > >
> > >
> > > --
> > > 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+unsubscribe@__goo__glegroups.com <http://googlegroups.com>
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/____msgid/ceres-solver/546A31B9.____3050706%40atlatec.de
> <https://groups.google.com/d/__msgid/ceres-solver/546A31B9.__3050706%40atlatec.de>
> https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> > >
> > >
> > > --
> > > 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+unsubscribe@__goo__glegroups.com
> <http://googlegroups.com>
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com>>
> > >
> >
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer>
> https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > 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+unsubscribe@__goo__glegroups.com
> <http://googlegroups.com>
> > <mailto:ceres-solver%__2Buns...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/____msgid/ceres-solver/54DD10E1.____708%40atlatec.de
> <https://groups.google.com/d/__msgid/ceres-solver/54DD10E1.__708%40atlatec.de>
> > For more options, visit https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver+...@googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
> > For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/__msgid/ceres-solver/54DDBEA2.__2020207%40atlatec.de
> <https://groups.google.com/d/msgid/ceres-solver/54DDBEA2.2020207%40atlatec.de>.
> For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CAK0oyEp1Z%3DPNoqB43xKTG8rVu9bWGa2to-189z27zBPwfsgr1Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEp1Z%3DPNoqB43xKTG8rVu9bWGa2to-189z27zBPwfsgr1Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
ceres.png
lean_levmar.png

Julius Ziegler

unread,
Feb 13, 2015, 8:56:57 AM2/13/15
to ceres-...@googlegroups.com
...I should add that the comparision is not 100% accurate, because
apparently the termination criteria are interpreted differently by
ceres. Ceres alway does about 1 iteration more (of 3-5 in total), and
reaches a smaller residual error.

Sameer Agarwal

unread,
Feb 13, 2015, 8:58:28 AM2/13/15
to ceres-...@googlegroups.com
Thanks Julius. This makes sense. Yes there is a lot of dynamic memory allocations that happen inside ceres as the layers of abstractions pile up :/
Sameer




>     >     >     >>>> To view this discussion on the web visit
>     >     >     https://groups.google.com/d/
>     >     >     >>>>
>     msgid/ceres-solver/546A2308.____9090104%40atlatec.de
>     <http://40atlatec.de>
>     >     <http://40atlatec.de>
>     >     >     <http://40atlatec.de>.
>     >     >     >>>> For more options, visit
>     >     https://groups.google.com/d/____optout
>     <https://groups.google.com/d/__optout>
>     >     <https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>>.
>     >     >     >>>>
>     >     >     >>>
>     >     >     >>
>     >     >     >> --
>     >     >     >> 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+unsubscribe@__goo__glegroups.com <http://googlegroups.com>

>     >     >     >> To view this discussion on the web visit
>     >     https://groups.google.com/d/
>     >     >     >> msgid/ceres-solver/546A2F41.____1030407%40atlatec.de
>     <http://40atlatec.de>
>     >     <http://40atlatec.de>
>     >     >     <http://40atlatec.de>.
>     >     >     >> For more options, visit
>     >     https://groups.google.com/d/____optout
>     <https://groups.google.com/d/__optout>
>     >     <https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>>.
>     >     >     >>
>     >     >     >
>     >     >
>     >     >     --
>     >     >     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+unsubscribe@__goo__glegroups.com <http://googlegroups.com>

>     >     >     To view this discussion on the web visit
>     >     >
>     >
>     https://groups.google.com/d/____msgid/ceres-solver/546A31B9.____3050706%40atlatec.de
>     <https://groups.google.com/d/__msgid/ceres-solver/546A31B9.__3050706%40atlatec.de>
>     >
>      <https://groups.google.com/d/__msgid/ceres-solver/546A31B9.__3050706%40atlatec.de
>     <https://groups.google.com/d/msgid/ceres-solver/546A31B9.3050706%40atlatec.de>>.
>     >     >     For more options, visit
>     https://groups.google.com/d/____optout
>     <https://groups.google.com/d/__optout>
>     >     <https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>>.
>     >     >
>     >     >
>     >     > --
>     >     > 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+unsubscribe@__goo__glegroups.com
>     <http://googlegroups.com>

>     >     > To view this discussion on the web visit
>     >     >
>     >
>      https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com
>     <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com>
>     >
>      <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com
>     <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com>>
>     >     >
>     >
>      <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer
>     <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer>
>     >
>      <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer
>     <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>>.
>     >     > For more options, visit
>     https://groups.google.com/d/____optout
>     <https://groups.google.com/d/__optout>
>     >     <https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>>.
>     >
>     >     --
>     >     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+unsubscribe@__goo__glegroups.com
>     <http://googlegroups.com>

>     >     To view this discussion on the web visit
>     >
>      https://groups.google.com/d/____msgid/ceres-solver/54DD10E1.____708%40atlatec.de
>     <https://groups.google.com/d/__msgid/ceres-solver/54DD10E1.__708%40atlatec.de>
>     >
>      <https://groups.google.com/d/__msgid/ceres-solver/54DD10E1.__708%40atlatec.de
>     <https://groups.google.com/d/msgid/ceres-solver/54DD10E1.708%40atlatec.de>>.
>     >     For more options, visit https://groups.google.com/d/____optout
>     <https://groups.google.com/d/__optout>
>     >     <https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>>.
>     >
>     > --
>     > 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+unsubscribe@__googlegroups.com
>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>

>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
>     > To view this discussion on the web visit
>     >
>     https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com
>     <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com>
>     >
>     <https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com?utm_medium=email&__utm_source=footer
>     <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>     > For more options, visit https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>.
>
>     --
>     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+unsubscribe@__googlegroups.com
>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
>     To view this discussion on the web visit
>     https://groups.google.com/d/__msgid/ceres-solver/54DDBEA2.__2020207%40atlatec.de
>     <https://groups.google.com/d/msgid/ceres-solver/54DDBEA2.2020207%40atlatec.de>.
>     For more options, visit https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>.
>
> --
> 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
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/54DE01CE.6090706%40atlatec.de.

Julius Ziegler

unread,
Feb 13, 2015, 9:00:06 AM2/13/15
to ceres-...@googlegroups.com
On 02/13/2015 02:58 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> Thanks Julius. This makes sense. Yes there is a lot of dynamic memory
> allocations that happen inside ceres as the layers of abstractions pile
> up :/

Yes, its also what I expected. Can you hint me at getting rid of all the
string stuff (which I suspect is logging related)?

Julius

> Sameer
>
>
>
> On Fri Feb 13 2015 at 5:54:28 AM Julius Ziegler <zie...@atlatec.de
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>> wrote:
> > >
> > > Hi Keir,
> > >
> > > I have looked at
> > >
> > > > [1]
> > >
> >
> https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>
> >
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>
> > >
> >
> <https://developer.blender.____org/diffusion/LMV/browse/____master/src/libmv/numeric/____levenberg_marquardt.h
> > > > <https://developer.blender.______org/diffusion/LMV/
> > > <https://developer.blender.____org/diffusion/LMV/
> > <https://developer.blender.__org/diffusion/LMV/
> <https://developer.blender.org/diffusion/LMV/>>>>, the vision library
> > used
> > > > in Blender, I implemented a truly minimal LM that inlines
> > the cost
> > > > function inside the core LM loop with templates [1]. It's
> > inferior to
> > > > Ceres in many ways, but for Blender, it is much much
> faster
> > to use
> > > this
> > > > inferior LM that's "good enough" to solve for the
> per-pixel
> > > inverse of a
> > > > distortion model.
> > > >
> > > > [1]
> > >
> >
> https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>
> >
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>
> > >
> >
> <https://developer.blender.____org/diffusion/LMV/browse/____master/src/libmv/numeric/____levenberg_marquardt.h
> > ceres-solver+unsubscribe@__goo____glegroups.com
> <http://goo__glegroups.com> <http://googlegroups.com>
> <mailto:ceres-solver%______2Bu...@googlegroups.com
> <mailto:ceres-solver%25____2Bu...@googlegroups.com>
> > <mailto:ceres-solver%25____2Bu...@googlegroups.com
> <mailto:ceres-solver%2525__2Bu...@googlegroups.com>__>
> > > <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
> <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
> > <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%2525252Bu...@googlegroups.com>>>__>.
> > > > >>>> To view this discussion on the web visit
> > > > https://groups.google.com/d/
> > > > >>>>
> > msgid/ceres-solver/546A2308.______9090104%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>
> > > > <http://40atlatec.de>.
> > > > >>>> For more options, visit
> > > https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>
> > > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>>.
> > > > >>>>
> > > > >>>
> > > > >>
> > > > >> --
> > > > >> 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+unsubscribe@__goo____glegroups.com
> <http://goo__glegroups.com> <http://googlegroups.com>
> <mailto:ceres-solver%______2Bu...@googlegroups.com
> <mailto:ceres-solver%25____2Bu...@googlegroups.com>
> > <mailto:ceres-solver%25____2Bu...@googlegroups.com
> <mailto:ceres-solver%2525__2Bu...@googlegroups.com>__>
> > > <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
> <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
> > <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%2525252Bu...@googlegroups.com>>>__>.
> > > > >> To view this discussion on the web visit
> > > https://groups.google.com/d/
> > > > >>
> msgid/ceres-solver/546A2F41.______1030407%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>
> > > > <http://40atlatec.de>.
> > > > >> For more options, visit
> > > https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>
> > > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>>.
> > > > >>
> > > > >
> > > >
> > > > --
> > > > 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+unsubscribe@__goo____glegroups.com
> <http://goo__glegroups.com> <http://googlegroups.com>
> <mailto:ceres-solver%______2Bu...@googlegroups.com
> <mailto:ceres-solver%25____2Bu...@googlegroups.com>
> > <mailto:ceres-solver%25____2Bu...@googlegroups.com
> <mailto:ceres-solver%2525__2Bu...@googlegroups.com>__>
> > > <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
> <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
> > <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%2525252Bu...@googlegroups.com>>>__>.
> > > > To view this discussion on the web visit
> > > >
> > >
> >
> https://groups.google.com/d/______msgid/ceres-solver/546A31B9.______3050706%40atlatec.de
> <https://groups.google.com/d/____msgid/ceres-solver/546A31B9.____3050706%40atlatec.de>
> > https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>
> > > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>>.
> > > >
> > > >
> > > > --
> > > > 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+unsubscribe@__goo____glegroups.com
> <http://goo__glegroups.com>
> > <http://googlegroups.com>
> <mailto:ceres-solver+__...@googlegroups.com
> <mailto:ceres-solver%2B____un...@googlegroups.com>
> > <mailto:ceres-solver%2B____un...@googlegroups.com
> <mailto:ceres-solver%252B__un...@googlegroups.com>>
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>>.
> > > > To view this discussion on the web visit
> > > >
> > >
> >
> https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com>
> <https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com?utm_____medium=__email&utm_source=____footer
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer>
> > https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>
> > > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>>.
> > >
> > > --
> > > 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+unsubscribe@__goo____glegroups.com
> <http://goo__glegroups.com>
> > <http://googlegroups.com>
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/______msgid/ceres-solver/54DD10E1.______708%40atlatec.de
> <https://groups.google.com/d/____msgid/ceres-solver/54DD10E1.____708%40atlatec.de>
> https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>
> > > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>>.
> > >
> > > --
> > > 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+unsubscribe@__goo__glegroups.com
> <http://googlegroups.com>
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/____msgid/ceres-solver/____CAK0oyEqgf2QrSenpgJqeb5kZwpnwD____34SOJmu2sQPvSmhNF0TSw%__40mail.__gmail.com
> <https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com>>
> > >
> >
> <https://groups.google.com/d/____msgid/ceres-solver/____CAK0oyEqgf2QrSenpgJqeb5kZwpnwD____34SOJmu2sQPvSmhNF0TSw%__40mail.__gmail.com?utm_medium=__email&__utm_source=footer
> <https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com?utm_medium=email&__utm_source=footer>
> https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > 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+unsubscribe@__goo__glegroups.com
> <http://googlegroups.com>
> > <mailto:ceres-solver%__2Buns...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/____msgid/ceres-solver/54DDBEA2.____2020207%40atlatec.de
> <https://groups.google.com/d/__msgid/ceres-solver/54DDBEA2.__2020207%40atlatec.de>
> > For more options, visit https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver+...@googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/__msgid/ceres-solver/CAK0oyEp1Z%__3DPNoqB43xKTG8rVu9bWGa2to-__189z27zBPwfsgr1Q%40mail.gmail.__com
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEp1Z%3DPNoqB43xKTG8rVu9bWGa2to-189z27zBPwfsgr1Q%40mail.gmail.com>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/CAK0oyEp1Z%__3DPNoqB43xKTG8rVu9bWGa2to-__189z27zBPwfsgr1Q%40mail.gmail.__com?utm_medium=email&utm___source=footer
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEp1Z%3DPNoqB43xKTG8rVu9bWGa2to-189z27zBPwfsgr1Q%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
> > For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/__msgid/ceres-solver/54DE01CE.__6090706%40atlatec.de
> <https://groups.google.com/d/msgid/ceres-solver/54DE01CE.6090706%40atlatec.de>.
> For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CABqdRUCdBSCc94iz_qyyFXCkmjUroXmCsSRJfkw3w7AHHQQK6w%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CABqdRUCdBSCc94iz_qyyFXCkmjUroXmCsSRJfkw3w7AHHQQK6w%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Sameer Agarwal

unread,
Feb 13, 2015, 9:54:31 AM2/13/15
to ceres-...@googlegroups.com
are you using glog or miniglog?

>     >     >     <mailto:ceres-solver%____2Bunsu...@googlegroups.com
>     <mailto:ceres-solver%25__2Bunsu...@googlegroups.com>
>     >     <mailto:ceres-solver%__252Bunsubscribe@googlegroups.__com
>     <mailto:ceres-solver%25252Bunsubscribe@googlegroups.com>>__>
>     >     >     >

>     >     >     <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
>     <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
>     >     <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com
>     >     >     <mailto:ceres-solver%____2Bunsu...@googlegroups.com
>     <mailto:ceres-solver%25__2Bunsu...@googlegroups.com>
>     >     <mailto:ceres-solver%__252Bunsubscribe@googlegroups.__com
>     <mailto:ceres-solver%25252Bunsubscribe@googlegroups.com>>__>
>     >     >     >

>     >     >     <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
>     <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
>     >     <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com
>     >     >     <mailto:ceres-solver%____2Bunsu...@googlegroups.com
>     <mailto:ceres-solver%25__2Bunsu...@googlegroups.com>
>     >     <mailto:ceres-solver%__252Bunsubscribe@googlegroups.__com
>     <mailto:ceres-solver%25252Bunsubscribe@googlegroups.com>>__>
>     >     >     >

>     >     >     <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
>     <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
>     >     <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com
>     >     >     <mailto:ceres-solver%____2Bunsu...@googlegroups.com
>     <mailto:ceres-solver%25__2Bunsu...@googlegroups.com>
>     >     <mailto:ceres-solver%__252Bunsubscribe@googlegroups.__com
>     <mailto:ceres-solver%25252Bunsubscribe@googlegroups.com>>__>
>     >     >     >

>     >     >     <mailto:ceres-solver%____2Bunsu...@googlegroups.com
>     <mailto:ceres-solver%25__2Bunsu...@googlegroups.com>
>     >     <mailto:ceres-solver%__252Bunsubscribe@googlegroups.__com
>     >     >     <mailto:ceres-solver%____2Bunsu...@googlegroups.com
>     <mailto:ceres-solver%25__2Bunsu...@googlegroups.com>
>     >     <mailto:ceres-solver%__252Bunsubscribe@googlegroups.__com

>     >     > To view this discussion on the web visit
>     >     >
>     >
>      https://groups.google.com/d/____msgid/ceres-solver/____CAK0oyEqgf2QrSenpgJqeb5kZwpnwD____34SOJmu2sQPvSmhNF0TSw%__40mail.__gmail.com
>     <https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com>
>     >
>      <https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com
>     <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com>>
>     >     >
>     >
>      <https://groups.google.com/d/____msgid/ceres-solver/____CAK0oyEqgf2QrSenpgJqeb5kZwpnwD____34SOJmu2sQPvSmhNF0TSw%__40mail.__gmail.com?utm_medium=__email&__utm_source=footer
>     <https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com?utm_medium=email&__utm_source=footer>
>     >
>      <https://groups.google.com/d/__msgid/ceres-solver/__CAK0oyEqgf2QrSenpgJqeb5kZwpnwD__34SOJmu2sQPvSmhNF0TSw%40mail.__gmail.com?utm_medium=email&__utm_source=footer
>     <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEqgf2QrSenpgJqeb5kZwpnwD34SOJmu2sQPvSmhNF0TSw%40mail.gmail.com?utm_medium=email&utm_source=footer>>>.
>     >     > For more options, visit
>     https://groups.google.com/d/____optout
>     <https://groups.google.com/d/__optout>
>     >     <https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>>.
>     >
>     >     --
>     >     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+unsubscribe@__goo__glegroups.com
>     <http://googlegroups.com>

>     >     To view this discussion on the web visit
>     >
>      https://groups.google.com/d/____msgid/ceres-solver/54DDBEA2.____2020207%40atlatec.de
>     <https://groups.google.com/d/__msgid/ceres-solver/54DDBEA2.__2020207%40atlatec.de>
>     >
>      <https://groups.google.com/d/__msgid/ceres-solver/54DDBEA2.__2020207%40atlatec.de
>     <https://groups.google.com/d/msgid/ceres-solver/54DDBEA2.2020207%40atlatec.de>>.
>     >     For more options, visit https://groups.google.com/d/____optout
>     <https://groups.google.com/d/__optout>
>     >     <https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>>.
>     >
>     > --
>     > 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+unsubscribe@__googlegroups.com
>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>

>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
>     > To view this discussion on the web visit
>     >
>     https://groups.google.com/d/__msgid/ceres-solver/CAK0oyEp1Z%__3DPNoqB43xKTG8rVu9bWGa2to-__189z27zBPwfsgr1Q%40mail.gmail.__com
>     <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEp1Z%3DPNoqB43xKTG8rVu9bWGa2to-189z27zBPwfsgr1Q%40mail.gmail.com>
>     >
>     <https://groups.google.com/d/__msgid/ceres-solver/CAK0oyEp1Z%__3DPNoqB43xKTG8rVu9bWGa2to-__189z27zBPwfsgr1Q%40mail.gmail.__com?utm_medium=email&utm___source=footer
>     <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEp1Z%3DPNoqB43xKTG8rVu9bWGa2to-189z27zBPwfsgr1Q%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>     > For more options, visit https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>.
>
>     --
>     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+unsubscribe@__googlegroups.com
>     <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
>     To view this discussion on the web visit
>     https://groups.google.com/d/__msgid/ceres-solver/54DE01CE.__6090706%40atlatec.de
>     <https://groups.google.com/d/msgid/ceres-solver/54DE01CE.6090706%40atlatec.de>.
>     For more options, visit https://groups.google.com/d/__optout
>     <https://groups.google.com/d/optout>.
>
> --
> 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
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/54DE0325.702%40atlatec.de.

Julius Ziegler

unread,
Feb 13, 2015, 9:57:02 AM2/13/15
to ceres-...@googlegroups.com
On 02/13/2015 03:54 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> are you using glog or miniglog?

I found this in CMakeCache.txt

//Use a stripped down version of glog.
MINIGLOG:BOOL=OFF

so I assume glog?


> On Fri Feb 13 2015 at 6:00:07 AM Julius Ziegler <zie...@atlatec.de
> <mailto:zie...@atlatec.de>> wrote:
>
> On 02/13/2015 02:58 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> > Thanks Julius. This makes sense. Yes there is a lot of dynamic memory
> > allocations that happen inside ceres as the layers of abstractions
> pile
> > up :/
>
> Yes, its also what I expected. Can you hint me at getting rid of all the
> string stuff (which I suspect is logging related)?
>
> Julius
>
> > Sameer
> >
> >
> >
> > On Fri Feb 13 2015 at 5:54:28 AM Julius Ziegler
> <zie...@atlatec.de <mailto:zie...@atlatec.de>
> > > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>> wrote:
> > > >
> > > > Hi Keir,
> > > >
> > > > I have looked at
> > > >
> > > > > [1]
> > > >
> > >
> >
> https://developer.blender.org/________diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h
> <https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h>
> >
> <https://developer.blender.__org/____diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>>
> > >
> >
> <https://developer.blender.____org/__diffusion/LMV/browse/____master/__src/libmv/numeric/____levenberg___marquardt.h
> >
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>>
> > > >
> > >
> >
> <https://developer.blender.______org/diffusion/LMV/browse/______master/src/libmv/numeric/______levenberg_marquardt.h
> <https://developer.blender.________org/diffusion/LMV/
> > > > <https://developer.blender.______org/diffusion/LMV/
> > > <https://developer.blender.____org/diffusion/LMV/
> > <https://developer.blender.__org/diffusion/LMV/
> <https://developer.blender.org/diffusion/LMV/>>>>>, the vision library
> > > used
> > > > > in Blender, I implemented a truly minimal LM
> that inlines
> > > the cost
> > > > > function inside the core LM loop with templates
> [1]. It's
> > > inferior to
> > > > > Ceres in many ways, but for Blender, it is much much
> > faster
> > > to use
> > > > this
> > > > > inferior LM that's "good enough" to solve for the
> > per-pixel
> > > > inverse of a
> > > > > distortion model.
> > > > >
> > > > > [1]
> > > >
> > >
> >
> https://developer.blender.org/________diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h
> <https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h>
> >
> <https://developer.blender.__org/____diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>>
> > >
> >
> <https://developer.blender.____org/__diffusion/LMV/browse/____master/__src/libmv/numeric/____levenberg___marquardt.h
> >
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>>
> > > >
> > >
> >
> <https://developer.blender.______org/diffusion/LMV/browse/______master/src/libmv/numeric/______levenberg_marquardt.h
> > >
> >
> <https://developer.blender.____org/diffusion/LMV/browse/____master/src/libmv/numeric/____levenberg_marquardt.h
> >
> <https://developer.blender.__org/diffusion/LMV/browse/__master/src/libmv/numeric/__levenberg_marquardt.h
> <https://developer.blender.org/diffusion/LMV/browse/master/src/libmv/numeric/levenberg_marquardt.h>>>>
> > > > >
> > > > > On Mon, Nov 17, 2014 at 9:34 AM, Julius Ziegler
> > > > <zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>
> > > > > <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de> <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> > > > <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de> <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>>__>
> > > ceres-solver+unsubscribe@__goo______glegroups.com
> <http://goo____glegroups.com>
> > <http://goo__glegroups.com> <http://googlegroups.com>
> > > >
> <mailto:ceres-solver%2525__2Bu...@googlegroups.com>__>
> <mailto:ceres-solver%2525252Bu...@googlegroups.com>>>__>
> > > > >
> > <mailto:ceres-solver%________2B...@googlegroups.com
> <mailto:ceres-solver%25______2B...@googlegroups.com>
> > <mailto:ceres-solver%25______2B...@googlegroups.com
> <mailto:ceres-solver%2525____2B...@googlegroups.com>__>
> > >
> <mailto:ceres-solver%25______2B...@googlegroups.com
> <mailto:ceres-solver%2525____2B...@googlegroups.com>
> > <mailto:ceres-solver%2525____2B...@googlegroups.com
> <mailto:ceres-solver%252525__2B...@googlegroups.com>__>__>
> > > >
> <mailto:ceres-solver%______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%25____252Bunsubscribe@googlegroups>.
> > <mailto:ceres-solver%25____252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525__252Bunsubscribe@googlegroups>.>______com
> > > <mailto:ceres-solver%____25252Bunsubscribe@
> <mailto:ceres-solver%25__25252Bunsubscribe@>__googlegrou__ps.com
> <http://googlegroups.com>
> > <mailto:ceres-solver%__2525252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%252525252B...@googlegroups.com>>>>__>.
> > > > > >>>> To view this discussion on the web visit
> > > > > https://groups.google.com/d/
> > > > > >>>>
> > > msgid/ceres-solver/546A2308.________9090104%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>
> > > > <http://40atlatec.de>
> > > > > <http://40atlatec.de>.
> > > > > >>>> For more options, visit
> > > > https://groups.google.com/d/________optout
> <https://groups.google.com/d/______optout>
> > > ceres-solver+unsubscribe@__goo______glegroups.com
> <http://goo____glegroups.com>
> > <http://goo__glegroups.com> <http://googlegroups.com>
> > > >
> <mailto:ceres-solver%2525__2Bu...@googlegroups.com>__>
> <mailto:ceres-solver%2525252Bu...@googlegroups.com>>>__>
> > > > >
> > <mailto:ceres-solver%________2B...@googlegroups.com
> <mailto:ceres-solver%25______2B...@googlegroups.com>
> > <mailto:ceres-solver%25______2B...@googlegroups.com
> <mailto:ceres-solver%2525____2B...@googlegroups.com>__>
> > >
> <mailto:ceres-solver%25______2B...@googlegroups.com
> <mailto:ceres-solver%2525____2B...@googlegroups.com>
> > <mailto:ceres-solver%2525____2B...@googlegroups.com
> <mailto:ceres-solver%252525__2B...@googlegroups.com>__>__>
> > > >
> <mailto:ceres-solver%______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%25____252Bunsubscribe@googlegroups>.
> > <mailto:ceres-solver%25____252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525__252Bunsubscribe@googlegroups>.>______com
> > > <mailto:ceres-solver%____25252Bunsubscribe@
> <mailto:ceres-solver%25__25252Bunsubscribe@>__googlegrou__ps.com
> <http://googlegroups.com>
> > <mailto:ceres-solver%__2525252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%252525252B...@googlegroups.com>>>>__>.
> > > > > >> To view this discussion on the web visit
> > > > https://groups.google.com/d/
> > > > > >>
> > msgid/ceres-solver/546A2F41.________1030407%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>
> > > > <http://40atlatec.de>
> > > > > <http://40atlatec.de>.
> > > > > >> For more options, visit
> > > > https://groups.google.com/d/________optout
> <https://groups.google.com/d/______optout>
> > <https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>>
> > > <https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>>
> > > > <https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>
> > > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>>>.
> > > > > >>
> > > > > >
> > > > >
> > > > > --
> > > > > 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+unsubscribe@__goo______glegroups.com
> <http://goo____glegroups.com>
> > <http://goo__glegroups.com> <http://googlegroups.com>
> > > >
> <mailto:ceres-solver%2525__2Bu...@googlegroups.com>__>
> <mailto:ceres-solver%2525252Bu...@googlegroups.com>>>__>
> > > > >
> > <mailto:ceres-solver%________2B...@googlegroups.com
> <mailto:ceres-solver%25______2B...@googlegroups.com>
> > <mailto:ceres-solver%25______2B...@googlegroups.com
> <mailto:ceres-solver%2525____2B...@googlegroups.com>__>
> > >
> <mailto:ceres-solver%25______2B...@googlegroups.com
> <mailto:ceres-solver%2525____2B...@googlegroups.com>
> > <mailto:ceres-solver%2525____2B...@googlegroups.com
> <mailto:ceres-solver%252525__2B...@googlegroups.com>__>__>
> > > >
> <mailto:ceres-solver%______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%25____252Bunsubscribe@googlegroups>.
> > <mailto:ceres-solver%25____252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525__252Bunsubscribe@googlegroups>.>______com
> > > <mailto:ceres-solver%____25252Bunsubscribe@
> <mailto:ceres-solver%25__25252Bunsubscribe@>__googlegrou__ps.com
> <http://googlegroups.com>
> > <mailto:ceres-solver%__2525252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%252525252B...@googlegroups.com>>>>__>.
> > > > > To view this discussion on the web visit
> > > > >
> > > >
> > >
> >
> https://groups.google.com/d/________msgid/ceres-solver/__546A31B9.______3050706%__40atlatec.de
> <https://groups.google.com/d/______msgid/ceres-solver/546A31B9.______3050706%40atlatec.de>
> >
> <https://groups.google.com/d/______msgid/ceres-solver/__546A31B9.____3050706%__40atlatec.de
> <https://groups.google.com/d/____msgid/ceres-solver/546A31B9.____3050706%40atlatec.de>>
> > >
> >
> <https://groups.google.com/d/______msgid/ceres-solver/__546A31B9.____3050706%__40atlatec.de
> <https://groups.google.com/d/______msgid/ceres-solver/__546A31B9.____3050706%__40atlatec.de
> > > https://groups.google.com/d/________optout
> <https://groups.google.com/d/______optout>
> > <https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>>
> > > <https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>>
> > > > <https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>
> > > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>>>.
> > > > >
> > > > >
> > > > > --
> > > > > 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+unsubscribe@__goo______glegroups.com
> <http://goo____glegroups.com>
> > <http://goo__glegroups.com>
> > > <http://googlegroups.com>
> > > >
> <mailto:ceres-solver%2525__2Bu...@googlegroups.com>__>
> <mailto:ceres-solver%2525252Bu...@googlegroups.com>>>__>
> > > > >
> > <mailto:ceres-solver+___...@googlegroups.com
> <mailto:ceres-solver%2B______u...@googlegroups.com>
> > <mailto:ceres-solver%2B______u...@googlegroups.com
> <mailto:ceres-solver%252B____u...@googlegroups.com>>
> > >
> <mailto:ceres-solver%2B______u...@googlegroups.com
> <mailto:ceres-solver%252B____u...@googlegroups.com>
> > <mailto:ceres-solver%252B____u...@googlegroups.com
> <mailto:ceres-solver%25252B__u...@googlegroups.com>>>
> <mailto:ceres-solver%2525__2Bu...@googlegroups.com>__>
> <mailto:ceres-solver%2525252Bu...@googlegroups.com>>>__>>.
> > > > > To view this discussion on the web visit
> > > > >
> > > >
> > >
> >
> https://groups.google.com/d/________msgid/ceres-solver/________CADpYijFMswrXR%2BU55Vvg%________2BCpOYyft83FYQvMtrthzyPopki1aR________Q%40mail.gmail.com
> <https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com>
> >
> <https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com>>
> > >
> >
> <https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com>
> >
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com>>>
> > > >
> > >
> >
> <https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com>
> >
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com>>
> > >
> >
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com>>>>
> > > > >
> > > >
> > >
> >
> <https://groups.google.com/d/________msgid/ceres-solver/________CADpYijFMswrXR%2BU55Vvg%________2BCpOYyft83FYQvMtrthzyPopki1aR________Q%40mail.gmail.com?utm_______medium=__email&utm_source=______footer
> <https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com?utm_____medium=__email&utm_source=____footer>
> >
> <https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com?utm_____medium=__email&utm_source=____footer
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer>>
> > >
> >
> <https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com?utm_____medium=__email&utm_source=____footer
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer>
> >
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer>>>
> > > >
> > >
> >
> <https://groups.google.com/d/______msgid/ceres-solver/______CADpYijFMswrXR%2BU55Vvg%______2BCpOYyft83FYQvMtrthzyPopki1aR______Q%40mail.gmail.com?utm_____medium=__email&utm_source=____footer
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer>
> >
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer>>
> > >
> >
> <https://groups.google.com/d/____msgid/ceres-solver/____CADpYijFMswrXR%2BU55Vvg%____2BCpOYyft83FYQvMtrthzyPopki1aR____Q%40mail.gmail.com?utm___medium=__email&utm_source=__footer
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/__CADpYijFMswrXR%2BU55Vvg%__2BCpOYyft83FYQvMtrthzyPopki1aR__Q%40mail.gmail.com?utm_medium=__email&utm_source=footer
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>>>>.
> > > > > For more options, visit
> > > https://groups.google.com/d/________optout
> <https://groups.google.com/d/______optout>
> > ceres-solver+unsubscribe@__goo______glegroups.com
> <http://goo____glegroups.com>
> > <http://goo__glegroups.com>
> > > <http://googlegroups.com>
> > > >
> <mailto:ceres-solver%2525__2Bu...@googlegroups.com>__>
> <mailto:ceres-solver%2525252Bu...@googlegroups.com>>>__>.
> > > > To view this discussion on the web visit
> > > >
> > >
> >
> https://groups.google.com/d/________msgid/ceres-solver/__54DD10E1.______708%40atlatec.__de
> <https://groups.google.com/d/______msgid/ceres-solver/54DD10E1.______708%40atlatec.de>
> >
> <https://groups.google.com/d/______msgid/ceres-solver/__54DD10E1.____708%40atlatec.de
> <https://groups.google.com/d/____msgid/ceres-solver/54DD10E1.____708%40atlatec.de>>
> > >
> >
> <https://groups.google.com/d/______msgid/ceres-solver/__54DD10E1.____708%40atlatec.de
> <https://groups.google.com/d/______msgid/ceres-solver/__54DD10E1.____708%40atlatec.de
> > https://groups.google.com/d/________optout
> <https://groups.google.com/d/______optout>
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>>.
> > > > To view this discussion on the web visit
> > > >
> > >
> >
> https://groups.google.com/d/______msgid/ceres-solver/______CAK0oyEqgf2QrSenpgJqeb5kZwpnwD______34SOJmu2sQPvSmhNF0TSw%____40mail.__gmail.com
> <https://groups.google.com/d/____msgid/ceres-solver/____CAK0oyEqgf2QrSenpgJqeb5kZwpnwD____34SOJmu2sQPvSmhNF0TSw%__40mail.__gmail.com>
> <https://groups.google.com/d/______msgid/ceres-solver/______CAK0oyEqgf2QrSenpgJqeb5kZwpnwD______34SOJmu2sQPvSmhNF0TSw%____40mail.__gmail.com?utm_medium=____email&__utm_source=footer
> <https://groups.google.com/d/____msgid/ceres-solver/____CAK0oyEqgf2QrSenpgJqeb5kZwpnwD____34SOJmu2sQPvSmhNF0TSw%__40mail.__gmail.com?utm_medium=__email&__utm_source=footer>
> > https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>
> > > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>>.
> > >
> > > --
> > > 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+unsubscribe@__goo____glegroups.com
> <http://goo__glegroups.com>
> > <http://googlegroups.com>
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>__>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/______msgid/ceres-solver/54DDBEA2.______2020207%40atlatec.de
> <https://groups.google.com/d/____msgid/ceres-solver/54DDBEA2.____2020207%40atlatec.de>
> https://groups.google.com/d/______optout
> <https://groups.google.com/d/____optout>
> > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>>
> > > <https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>>.
> > >
> > > --
> > > 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+unsubscribe@__goo__glegroups.com
> <http://googlegroups.com>
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/____msgid/ceres-solver/CAK0oyEp1Z%____3DPNoqB43xKTG8rVu9bWGa2to-____189z27zBPwfsgr1Q%40mail.gmail.____com
> <https://groups.google.com/d/__msgid/ceres-solver/CAK0oyEp1Z%__3DPNoqB43xKTG8rVu9bWGa2to-__189z27zBPwfsgr1Q%40mail.gmail.__com>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/CAK0oyEp1Z%__3DPNoqB43xKTG8rVu9bWGa2to-__189z27zBPwfsgr1Q%40mail.gmail.__com
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEp1Z%3DPNoqB43xKTG8rVu9bWGa2to-189z27zBPwfsgr1Q%40mail.gmail.com>>
> > >
> >
> <https://groups.google.com/d/____msgid/ceres-solver/__CAK0oyEp1Z%____3DPNoqB43xKTG8rVu9bWGa2to-____189z27zBPwfsgr1Q%40mail.gmail.____com?utm_medium=email&utm_____source=footer
> <https://groups.google.com/d/__msgid/ceres-solver/CAK0oyEp1Z%__3DPNoqB43xKTG8rVu9bWGa2to-__189z27zBPwfsgr1Q%40mail.gmail.__com?utm_medium=email&utm___source=footer>
> https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > 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+unsubscribe@__goo__glegroups.com
> <http://googlegroups.com>
> > <mailto:ceres-solver%__2Buns...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>__>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/____msgid/ceres-solver/54DE01CE.____6090706%40atlatec.de
> <https://groups.google.com/d/__msgid/ceres-solver/54DE01CE.__6090706%40atlatec.de>
> > For more options, visit https://groups.google.com/d/____optout
> <https://groups.google.com/d/__optout>
> > <https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver+...@googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/__msgid/ceres-solver/__CABqdRUCdBSCc94iz___qyyFXCkmjUroXmCsSRJfkw3w7AHHQQ__K6w%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CABqdRUCdBSCc94iz_qyyFXCkmjUroXmCsSRJfkw3w7AHHQQK6w%40mail.gmail.com>
> >
> <https://groups.google.com/d/__msgid/ceres-solver/__CABqdRUCdBSCc94iz___qyyFXCkmjUroXmCsSRJfkw3w7AHHQQ__K6w%40mail.gmail.com?utm___medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/ceres-solver/CABqdRUCdBSCc94iz_qyyFXCkmjUroXmCsSRJfkw3w7AHHQQK6w%40mail.gmail.com?utm_medium=email&utm_source=footer>__>.
> > For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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+unsubscribe@__googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/__msgid/ceres-solver/54DE0325.__702%40atlatec.de
> <https://groups.google.com/d/msgid/ceres-solver/54DE0325.702%40atlatec.de>.
> For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CABqdRUCsKb80gagZXu2GRc4m6Ruzyz4%3DZ%2B3d69rGZUKW_pmJPg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CABqdRUCsKb80gagZXu2GRc4m6Ruzyz4%3DZ%2B3d69rGZUKW_pmJPg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Sameer Agarwal

unread,
Feb 13, 2015, 11:55:35 AM2/13/15
to ceres-...@googlegroups.com
if you are not observing stderr, much of the logging is off already.
I will look to see if it can be turned off further.



>     >     >     <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
>     <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
>     >     <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com

>     >     >     <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
>     <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
>     >     <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com

>     >     >     <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
>     <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
>     >     <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com

>     >     >     <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
>     <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
>     >     <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com

>     >     >     >
>      <mailto:ceres-solver%______2Bunsu...@googlegroups.com
>     <mailto:ceres-solver%25____2Bunsu...@googlegroups.com>
>     >     <mailto:ceres-solver%25____2Bunsu...@googlegroups.com

>     >     >     <mailto:ceres-solver%____252Bunsubscribe@googlegroups.
>     <mailto:ceres-solver%25__252Bunsubscribe@googlegroups.>____com
>     >     <mailto:ceres-solver%__25252Bunsubscribe@__googlegroups.com
>     <mailto:ceres-solver%2525252Bunsubscribe@googlegroups.com>>>__>>.
>     > 

Julius Ziegler

unread,
Feb 13, 2015, 12:00:49 PM2/13/15
to ceres-...@googlegroups.com
I have another suspicion where this string related overhead is coming
from: Does assembly of the "Summary" struct involve a lot of string
operations? Since the tiny 2x2 problem is solved millions of time, the
Summary is created really often.

Julius



On 02/13/2015 05:55 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> if you are not observing stderr, much of the logging is off already.
> I will look to see if it can be turned off further.
>
>
> On Fri Feb 13 2015 at 6:57:03 AM Julius Ziegler <zie...@atlatec.de
> <mailto:zie...@atlatec.de>> wrote:
>
> On 02/13/2015 03:54 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> > are you using glog or miniglog?
>
> I found this in CMakeCache.txt
>
> //Use a stripped down version of glog.
> MINIGLOG:BOOL=OFF
>
> so I assume glog?
>
>
> > On Fri Feb 13 2015 at 6:00:07 AM Julius Ziegler
> <zie...@atlatec.de <mailto:zie...@atlatec.de>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>> wrote:
> >
> > On 02/13/2015 02:58 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> > > Thanks Julius. This makes sense. Yes there is a lot of
> dynamic memory
> > > allocations that happen inside ceres as the layers of
> abstractions
> > pile
> > > up :/
> >
> > Yes, its also what I expected. Can you hint me at getting rid
> of all the
> > string stuff (which I suspect is logging related)?
> >
> > Julius
> >
> > > Sameer
> > >
> > >
> > >
> > > On Fri Feb 13 2015 at 5:54:28 AM Julius Ziegler
> > <zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > > > > <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de> <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>>__> wrote:
> > > > >
> > > > > Hi Keir,
> > > > >
> > > > > I have looked at
> > > > >
> > > > > > [1]
> > > > >
> > > >
> > >
> >
> https://developer.blender.org/__________diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h
> <https://developer.blender.org/________diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h>
> >
> <https://developer.blender.__org/______diffusion/LMV/__browse/__master/____src/libmv/__numeric/__levenberg_______marquardt.h
> <https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h>>
> > >
> >
> <https://developer.blender.____org/____diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h
> >
> <https://developer.blender.__org/____diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>>>
> > > >
> > >
> >
> <https://developer.blender.______org/__diffusion/LMV/browse/______master/__src/libmv/numeric/______levenberg___marquardt.h
> > >
> >
> <https://developer.blender.____org/__diffusion/LMV/browse/____master/__src/libmv/numeric/____levenberg___marquardt.h
> >
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>>>
> > > > >
> > > >
> > >
> >
> <https://developer.blender.________org/diffusion/LMV/browse/________master/src/libmv/numeric/________levenberg_marquardt.h
> > <https://developer.blender.__________org/diffusion/LMV/
> > > > >
> <https://developer.blender.________org/diffusion/LMV/
> > > > <https://developer.blender.______org/diffusion/LMV/
> > > <https://developer.blender.____org/diffusion/LMV/
> > <https://developer.blender.__org/diffusion/LMV/
> <https://developer.blender.org/diffusion/LMV/>>>>>>, the vision library
> > > > used
> > > > > > in Blender, I implemented a truly minimal LM
> > that inlines
> > > > the cost
> > > > > > function inside the core LM loop with
> templates
> > [1]. It's
> > > > inferior to
> > > > > > Ceres in many ways, but for Blender, it is
> much much
> > > faster
> > > > to use
> > > > > this
> > > > > > inferior LM that's "good enough" to solve
> for the
> > > per-pixel
> > > > > inverse of a
> > > > > > distortion model.
> > > > > >
> > > > > > [1]
> > > > >
> > > >
> > >
> >
> https://developer.blender.org/__________diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h
> <https://developer.blender.org/________diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h>
> >
> <https://developer.blender.__org/______diffusion/LMV/__browse/__master/____src/libmv/__numeric/__levenberg_______marquardt.h
> <https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h>>
> > >
> >
> <https://developer.blender.____org/____diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h
> >
> <https://developer.blender.__org/____diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>>>
> > > >
> > >
> >
> <https://developer.blender.______org/__diffusion/LMV/browse/______master/__src/libmv/numeric/______levenberg___marquardt.h
> > >
> >
> <https://developer.blender.____org/__diffusion/LMV/browse/____master/__src/libmv/numeric/____levenberg___marquardt.h
> >
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>>>
> > > > >
> > > >
> > >
> >
> <https://developer.blender.________org/diffusion/LMV/browse/________master/src/libmv/numeric/________levenberg_marquardt.h
> > > > > <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>
> > > > <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de> <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>>__>__>
> ceres-solver+unsubscribe@__goo________glegroups.com
> <http://goo______glegroups.com>
> <mailto:ceres-solver%252525__2B...@googlegroups.com>__>__>
> <mailto:ceres-solver%252525252B...@googlegroups.com>>>>__>
> > > > > >
> > >
> <mailto:ceres-solver%__________2...@googlegroups.com
> <mailto:ceres-solver%25________2...@googlegroups.com>
> > <mailto:ceres-solver%25________2...@googlegroups.com
> <mailto:ceres-solver%2525______2...@googlegroups.com>__>
> > >
> <mailto:ceres-solver%25________2...@googlegroups.com
> <mailto:ceres-solver%2525______2...@googlegroups.com>
> > <mailto:ceres-solver%2525______2...@googlegroups.com
> <mailto:ceres-solver%252525____2...@googlegroups.com>__>__>
> > > >
> > <mailto:ceres-solver%25________2...@googlegroups.com
> <mailto:ceres-solver%2525______2...@googlegroups.com>
> > <mailto:ceres-solver%2525______2...@googlegroups.com
> <mailto:ceres-solver%252525____2...@googlegroups.com>__>
> > >
> <mailto:ceres-solver%2525______2...@googlegroups.com
> <mailto:ceres-solver%252525____2...@googlegroups.com>
> > <mailto:ceres-solver%252525____2...@googlegroups.com
> <mailto:ceres-solver%25252525__2...@googlegroups.com>__>__>__>
> > > > >
> > <mailto:ceres-solver%________252Bunsubscribe@googlegroups
> <mailto:ceres-solver%25______252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%25______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525____252Bunsubscribe@googlegroups>>.
> > >
> <mailto:ceres-solver%25______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525____252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%2525____252Bunsubscribe@googlegroups
> <mailto:ceres-solver%252525__252Bunsubscribe@googlegroups>>.__>______com
> > > > <mailto:ceres-solver%______25252Bunsubscribe@
> <mailto:ceres-solver%25____25252Bunsubscribe@>
> > <mailto:ceres-solver%25____25252Bunsubscribe@
> <mailto:ceres-solver%2525__25252Bunsubscribe@>>__googlegro__u__ps.com <http://googlegrou__ps.com>
> > <http://googlegroups.com>
> > > <mailto:ceres-solver%____2525252Bunsubscribe@
> <mailto:ceres-solver%25__2525252Bunsubscribe@>__googlegr__oups.com
> <http://googlegroups.com>
> >
> <mailto:ceres-solver%__252525252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%25252525252...@googlegroups.com>>>>>__>.
> > > > > > >>>> To view this discussion on the
> web visit
> > > > > > https://groups.google.com/d/
> > > > > > >>>>
> > > >
> msgid/ceres-solver/546A2308.__________9090104%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>
> > > > <http://40atlatec.de>
> > > > > <http://40atlatec.de>
> > > > > > <http://40atlatec.de>.
> > > > > > >>>> For more options, visit
> > > > > https://groups.google.com/d/__________optout
> <https://groups.google.com/d/________optout>
> ceres-solver+unsubscribe@__goo________glegroups.com
> <http://goo______glegroups.com>
> <mailto:ceres-solver%252525__2B...@googlegroups.com>__>__>
> <mailto:ceres-solver%252525252B...@googlegroups.com>>>>__>
> > > > > >
> > >
> <mailto:ceres-solver%__________2...@googlegroups.com
> <mailto:ceres-solver%25________2...@googlegroups.com>
> > <mailto:ceres-solver%25________2...@googlegroups.com
> <mailto:ceres-solver%2525______2...@googlegroups.com>__>
> > >
> <mailto:ceres-solver%25________2...@googlegroups.com
> <mailto:ceres-solver%2525______2...@googlegroups.com>
> > <mailto:ceres-solver%2525______2...@googlegroups.com
> <mailto:ceres-solver%252525____2...@googlegroups.com>__>__>
> > > >
> > <mailto:ceres-solver%25________2...@googlegroups.com
> <mailto:ceres-solver%2525______2...@googlegroups.com>
> > <mailto:ceres-solver%2525______2...@googlegroups.com
> <mailto:ceres-solver%252525____2...@googlegroups.com>__>
> > >
> <mailto:ceres-solver%2525______2...@googlegroups.com
> <mailto:ceres-solver%252525____2...@googlegroups.com>
> > <mailto:ceres-solver%252525____2...@googlegroups.com
> <mailto:ceres-solver%25252525__2...@googlegroups.com>__>__>__>
> > > > >
> > <mailto:ceres-solver%________252Bunsubscribe@googlegroups
> <mailto:ceres-solver%25______252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%25______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525____252Bunsubscribe@googlegroups>>.
> > >
> <mailto:ceres-solver%25______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525____252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%2525____252Bunsubscribe@googlegroups
> <mailto:ceres-solver%252525__252Bunsubscribe@googlegroups>>.__>______com
> > > > <mailto:ceres-solver%______25252Bunsubscribe@
> <mailto:ceres-solver%25____25252Bunsubscribe@>
> > <mailto:ceres-solver%25____25252Bunsubscribe@
> <mailto:ceres-solver%2525__25252Bunsubscribe@>>__googlegro__u__ps.com <http://googlegrou__ps.com>
> > <http://googlegroups.com>
> > > <mailto:ceres-solver%____2525252Bunsubscribe@
> <mailto:ceres-solver%25__2525252Bunsubscribe@>__googlegr__oups.com
> <http://googlegroups.com>
> >
> <mailto:ceres-solver%__252525252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%25252525252...@googlegroups.com>>>>>__>.
> > > > > > >> To view this discussion on the web
> visit
> > > > > https://groups.google.com/d/
> > > > > > >>
> > >
> msgid/ceres-solver/546A2F41.__________1030407%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>
> > > > <http://40atlatec.de>
> > > > > <http://40atlatec.de>
> > > > > > <http://40atlatec.de>.
> > > > > > >> For more options, visit
> > > > > https://groups.google.com/d/__________optout
> <https://groups.google.com/d/________optout>
> ceres-solver+unsubscribe@__goo________glegroups.com
> <http://goo______glegroups.com>
> <mailto:ceres-solver%252525__2B...@googlegroups.com>__>__>
> <mailto:ceres-solver%252525252B...@googlegroups.com>>>>__>
> > > > > >
> > >
> <mailto:ceres-solver%__________2...@googlegroups.com
> <mailto:ceres-solver%25________2...@googlegroups.com>
> > <mailto:ceres-solver%25________2...@googlegroups.com
> <mailto:ceres-solver%2525______2...@googlegroups.com>__>
> > >
> <mailto:ceres-solver%25________2...@googlegroups.com
> <mailto:ceres-solver%2525______2...@googlegroups.com>
> > <mailto:ceres-solver%2525______2...@googlegroups.com
> <mailto:ceres-solver%252525____2...@googlegroups.com>__>__>
> > > >
> > <mailto:ceres-solver%25________2...@googlegroups.com
> <mailto:ceres-solver%2525______2...@googlegroups.com>
> > <mailto:ceres-solver%2525______2...@googlegroups.com
> <mailto:ceres-solver%252525____2...@googlegroups.com>__>
> > >
> <mailto:ceres-solver%2525______2...@googlegroups.com
> <mailto:ceres-solver%252525____2...@googlegroups.com>
> > <mailto:ceres-solver%252525____2...@googlegroups.com
> <mailto:ceres-solver%25252525__2...@googlegroups.com>__>__>__>
> > > > >
> > <mailto:ceres-solver%________252Bunsubscribe@googlegroups
> <mailto:ceres-solver%25______252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%25______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525____252Bunsubscribe@googlegroups>>.
> > >
> <mailto:ceres-solver%25______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525____252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%2525____252Bunsubscribe@googlegroups
> <mailto:ceres-solver%252525__252Bunsubscribe@googlegroups>>.__>______com
> > > > <mailto:ceres-solver%______25252Bunsubscribe@
> <mailto:ceres-solver%25____25252Bunsubscribe@>
> > <mailto:ceres-solver%25____25252Bunsubscribe@
> <mailto:ceres-solver%2525__25252Bunsubscribe@>>__googlegro__u__ps.com <http://googlegrou__ps.com>
> > <http://googlegroups.com>
> > > <mailto:ceres-solver%____2525252Bunsubscribe@
> <mailto:ceres-solver%25__2525252Bunsubscribe@>__googlegr__oups.com
> <http://googlegroups.com>
> >
> <mailto:ceres-solver%__252525252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%25252525252...@googlegroups.com>>>>>__>.
> > > > > > To view this discussion on the web visit
> > > > > >
> > > > >
> > > >
> > >
> >
> https://groups.google.com/d/__________msgid/ceres-solver/____546A31B9.______3050706%____40atlatec.de
> <https://groups.google.com/d/________msgid/ceres-solver/__546A31B9.______3050706%__40atlatec.de>
> >
> <https://groups.google.com/d/________msgid/ceres-solver/__546A31B9.______3050706%__40atlatec.de
> <https://groups.google.com/d/______msgid/ceres-solver/546A31B9.______3050706%40atlatec.de>>
> > >
> >
> <https://groups.google.com/d/________msgid/ceres-solver/____546A31B9.____3050706%____40atlatec.de
> <https://groups.google.com/d/______msgid/ceres-solver/__546A31B9.____3050706%__40atlatec.de>
> >
> <https://groups.google.com/d/______msgid/ceres-solver/__546A31B9.____3050706%__40atlatec.de
> <https://groups.google.com/d/____msgid/ceres-solver/546A31B9.____3050706%40atlatec.de>>>
> > > >
> > >
> >
> <https://groups.google.com/d/________msgid/ceres-solver/____546A31B9.____3050706%____40atlatec.de
> <https://groups.google.com/d/______msgid/ceres-solver/__546A31B9.____3050706%__40atlatec.de>
> <https://groups.google.com/d/________msgid/ceres-solver/____546A31B9.____3050706%____40atlatec.de
> <https://groups.google.com/d/______msgid/ceres-solver/__546A31B9.____3050706%__40atlatec.de>
> > > > https://groups.google.com/d/__________optout
> <https://groups.google.com/d/________optout>
> > > ceres-solver+unsubscribe@__goo________glegroups.com
> <http://goo______glegroups.com>
> <mailto:ceres-solver%252525__2B...@googlegroups.com>__>__>
> <mailto:ceres-solver%252525252B...@googlegroups.com>>>>__>
> > > > > >
> > >
> <mailto:ceres-solver+____...@googlegroups.com
> <mailto:ceres-solver%2B________...@googlegroups.com>
> > <mailto:ceres-solver%2B________...@googlegroups.com
> <mailto:ceres-solver%252B______...@googlegroups.com>>
> > >
> <mailto:ceres-solver%2B________...@googlegroups.com
> <mailto:ceres-solver%252B______...@googlegroups.com>
> > <mailto:ceres-solver%252B______...@googlegroups.com
> <mailto:ceres-solver%25252B____...@googlegroups.com>>>
> > > >
> > <mailto:ceres-solver%2B________...@googlegroups.com
> <mailto:ceres-solver%252B______...@googlegroups.com>
> > <mailto:ceres-solver%252B______...@googlegroups.com
> <mailto:ceres-solver%25252B____...@googlegroups.com>>
> > >
> <mailto:ceres-solver%252B______...@googlegroups.com
> <mailto:ceres-solver%25252B____...@googlegroups.com>
> > <mailto:ceres-solver%25252B____...@googlegroups.com
> <mailto:ceres-solver%2525252B__...@googlegroups.com>>>__>
> <mailto:ceres-solver%252525__2B...@googlegroups.com>__>__>
> <mailto:ceres-solver%252525252B...@googlegroups.com>>>>__>>.
> > >
>
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CABqdRUBFsJ3La_iRT4u_vo0Gixa8ZcHAfkSg%3DuHaU-YmuYzqow%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CABqdRUBFsJ3La_iRT4u_vo0Gixa8ZcHAfkSg%3DuHaU-YmuYzqow%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Sameer Agarwal

unread,
Feb 13, 2015, 12:03:08 PM2/13/15
to ceres-...@googlegroups.com
so there is usually a summary::message string which is created to describe termination.
other than that there should be no printing/string creation happening.

You can try making our internal implementation of StringPrintf a no-op to see what happens.

Sameer


Julius Ziegler

unread,
Feb 16, 2015, 7:48:52 AM2/16/15
to ceres-...@googlegroups.com
On 02/13/2015 06:03 PM, Sameer Agarwal wrote:
> so there is usually a summary::message string which is created to
> describe termination.
> other than that there should be no printing/string creation happening.
>
> You can try making our internal implementation of StringPrintf a no-op
> to see what happens.

...so here is the version with (most of) string stuff hacked out. It is
a bit clearer, but no really new relevations.

The only thing I noticed is that both Ceres and Keir's basic solver use
Eigen to solve the linear problems arising at the core. Keir uses
"partial_lu_impl" and Ceres uses "housholder_qr_impl". The former one
seems to be considerably faster, using only 1.5G cycles instead of 6.5G
cycles, for the same set of problems.

Julius




> Sameer
>
>
> On Fri Feb 13 2015 at 9:01:19 AM Julius Ziegler <zie...@atlatec.de
> <mailto:zie...@atlatec.de>> wrote:
>
> I have another suspicion where this string related overhead is coming
> from: Does assembly of the "Summary" struct involve a lot of string
> operations? Since the tiny 2x2 problem is solved millions of time, the
> Summary is created really often.
>
> Julius
>
>
>
> On 02/13/2015 05:55 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> > if you are not observing stderr, much of the logging is off already.
> > I will look to see if it can be turned off further.
> >
> >
> > On Fri Feb 13 2015 at 6:57:03 AM Julius Ziegler
> <zie...@atlatec.de <mailto:zie...@atlatec.de>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>> wrote:
> >
> > On 02/13/2015 03:54 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> > > are you using glog or miniglog?
> >
> > I found this in CMakeCache.txt
> >
> > //Use a stripped down version of glog.
> > MINIGLOG:BOOL=OFF
> >
> > so I assume glog?
> >
> >
> > > On Fri Feb 13 2015 at 6:00:07 AM Julius Ziegler
> > <zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>> wrote:
> > >
> > > On 02/13/2015 02:58 PM, 'Sameer Agarwal' via Ceres
> Solver wrote:
> > > > Thanks Julius. This makes sense. Yes there is a lot of
> > dynamic memory
> > > > allocations that happen inside ceres as the layers of
> > abstractions
> > > pile
> > > > up :/
> > >
> > > Yes, its also what I expected. Can you hint me at
> getting rid
> > of all the
> > > string stuff (which I suspect is logging related)?
> > >
> > > Julius
> > >
> > > > Sameer
> > > >
> > > >
> > > >
> > > > On Fri Feb 13 2015 at 5:54:28 AM Julius Ziegler
> > > <zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > > > > > <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>
> > > > <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de> <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>>__>__> wrote:
> > > > > >
> > > > > > Hi Keir,
> > > > > >
> > > > > > I have looked at
> > > > > >
> > > > > > > [1]
> > > > > >
> > > > >
> > > >
> > >
> >
> https://developer.blender.org/____________diffusion/LMV/__browse/______master/____src/__libmv/__numeric/____levenberg_________marquardt.h
> <https://developer.blender.org/__________diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h>
> >
> <https://developer.blender.__org/________diffusion/LMV/__browse/____master/____src/__libmv/numeric/____levenberg_______marquardt.h
> <https://developer.blender.org/________diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h>>
> > >
> >
> <https://developer.blender.____org/______diffusion/LMV/____browse/__master/____src/libmv/____numeric/__levenberg_________marquardt.h
> >
> <https://developer.blender.__org/______diffusion/LMV/__browse/__master/____src/libmv/__numeric/__levenberg_______marquardt.h
> <https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h>>>
> > > >
> > >
> >
> <https://developer.blender.______org/____diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h
> > >
> >
> <https://developer.blender.____org/____diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h
> >
> <https://developer.blender.__org/____diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>>>>
> > > > >
> > > >
> > >
> >
> <https://developer.blender.________org/__diffusion/LMV/browse/________master/__src/libmv/__numeric/______levenberg_____marquardt.h
> > > >
> > >
> >
> <https://developer.blender.______org/__diffusion/LMV/browse/______master/__src/libmv/numeric/______levenberg___marquardt.h
> > >
> >
> <https://developer.blender.____org/__diffusion/LMV/browse/____master/__src/libmv/numeric/____levenberg___marquardt.h
> >
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>>>>
> > > > > >
> > > > >
> > > >
> > >
> >
> <https://developer.blender.__________org/diffusion/LMV/browse/__________master/src/libmv/__numeric/________levenberg___marquardt.h
> > > <https://developer.blender.____________org/diffusion/LMV/
> https://developer.blender.org/____________diffusion/LMV/__browse/______master/____src/__libmv/__numeric/____levenberg_________marquardt.h
> <https://developer.blender.org/__________diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h>
> >
> <https://developer.blender.__org/________diffusion/LMV/__browse/____master/____src/__libmv/numeric/____levenberg_______marquardt.h
> <https://developer.blender.org/________diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h>>
> > >
> >
> <https://developer.blender.____org/______diffusion/LMV/____browse/__master/____src/libmv/____numeric/__levenberg_________marquardt.h
> >
> <https://developer.blender.__org/______diffusion/LMV/__browse/__master/____src/libmv/__numeric/__levenberg_______marquardt.h
> <https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h>>>
> > > >
> > >
> >
> <https://developer.blender.______org/____diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h
> > >
> >
> <https://developer.blender.____org/____diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h
> >
> <https://developer.blender.__org/____diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>>>>
> > > > >
> > > >
> > >
> >
> <https://developer.blender.________org/__diffusion/LMV/browse/________master/__src/libmv/__numeric/______levenberg_____marquardt.h
> > > >
> > >
> >
> <https://developer.blender.______org/__diffusion/LMV/browse/______master/__src/libmv/numeric/______levenberg___marquardt.h
> > >
> >
> <https://developer.blender.____org/__diffusion/LMV/browse/____master/__src/libmv/numeric/____levenberg___marquardt.h
> >
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>>>>
> > > > > >
> > > > >
> > > >
> > >
> >
> <https://developer.blender.__________org/diffusion/LMV/browse/__________master/src/libmv/__numeric/________levenberg___marquardt.h
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>>__>__>__>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>>__>__>__>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>>__>__>__>
> > ceres-solver+unsubscribe@__goo__________glegroups.com
> <http://goo________glegroups.com>
> > <http://goo______glegroups.com__>
> <mailto:ceres-solver%25252525__2...@googlegroups.com>__>__>__>
> <mailto:ceres-solver%25252525252...@googlegroups.com>>>>>__>
> > > > > > >
> > > >
> >
> <mailto:ceres-solver%____________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%25__________...@googlegroups.com>
> >
> <mailto:ceres-solver%25__________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%2525________...@googlegroups.com>>
> > >
> <mailto:ceres-solver%25__________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%2525________...@googlegroups.com>
> >
> <mailto:ceres-solver%2525________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%252525______...@googlegroups.com>>__>
> > > >
> >
> <mailto:ceres-solver%25__________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%2525________...@googlegroups.com>
> >
> <mailto:ceres-solver%2525________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%252525______...@googlegroups.com>>
> > >
> <mailto:ceres-solver%2525________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%252525______...@googlegroups.com>
> >
> <mailto:ceres-solver%252525______2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%25252525____...@googlegroups.com>>__>__>
> > > > >
> > >
> <mailto:ceres-solver%25__________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%2525________...@googlegroups.com>
> >
> <mailto:ceres-solver%2525________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%252525______...@googlegroups.com>>
> > >
> <mailto:ceres-solver%2525________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%252525______...@googlegroups.com>
> >
> <mailto:ceres-solver%252525______2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%25252525____...@googlegroups.com>>__>
> > > >
> >
> <mailto:ceres-solver%2525________2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%252525______...@googlegroups.com>
> >
> <mailto:ceres-solver%252525______2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%25252525____...@googlegroups.com>>
> > >
> <mailto:ceres-solver%252525______2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%25252525____...@googlegroups.com>
> >
> <mailto:ceres-solver%25252525____2Bunsubscribe@googlegroups.__com
> <mailto:ceres-solver%2525252525__...@googlegroups.com>>__>__>__>
> > > > > >
> > >
> <mailto:ceres-solver%__________252Bunsubscribe@googlegroups
> <mailto:ceres-solver%25________252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%25________252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525______252Bunsubscribe@googlegroups>>
> > >
> <mailto:ceres-solver%25________252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525______252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%2525______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%252525____252Bunsubscribe@googlegroups>>>__.
> > > >
> > <mailto:ceres-solver%25________252Bunsubscribe@googlegroups
> <mailto:ceres-solver%2525______252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%2525______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%252525____252Bunsubscribe@googlegroups>>
> > >
> <mailto:ceres-solver%2525______252Bunsubscribe@googlegroups
> <mailto:ceres-solver%252525____252Bunsubscribe@googlegroups>
> > <mailto:ceres-solver%252525____252Bunsubscribe@googlegroups
> <mailto:ceres-solver%25252525__252Bunsubscribe@googlegroups>>>__.__>______com
> > > > >
> <mailto:ceres-solver%________25252Bunsubscribe@
> <mailto:ceres-solver%25______25252Bunsubscribe@>
> > <mailto:ceres-solver%25______25252Bunsubscribe@
> <mailto:ceres-solver%2525____25252Bunsubscribe@>>
> > > <mailto:ceres-solver%25______25252Bunsubscribe@
> <mailto:ceres-solver%2525____25252Bunsubscribe@>
> > <mailto:ceres-solver%2525____25252Bunsubscribe@
> <mailto:ceres-solver%252525__25252Bunsubscribe@>>>__googlegr__o__u__ps.com
> <http://googlegro__u__ps.com> <http://googlegrou__ps.com>
> > > <http://googlegroups.com>
> > > > <mailto:ceres-solver%______2525252Bunsubscribe@
> <mailto:ceres-solver%25____2525252Bunsubscribe@>
> > <mailto:ceres-solver%25____2525252Bunsubscribe@
> <mailto:ceres-solver%2525__2525252Bunsubscribe@>>__googleg__r__oups.com
> <http://googlegr__oups.com>
> > <http://googlegroups.com>
> > >
> > <mailto:ceres-solver%____252525252Bunsubscribe@
> <mailto:ceres-solver%25__252525252Bunsubscribe@>__google__groups.com
> <http://googlegroups.com>
> >
> <mailto:ceres-solver%__25252525252Bunsubscribe@__googlegroups.com
> <mailto:ceres-solver%252525252525...@googlegroups.com>>>>>>__>.
> > > > > > > >>>> To view this discussion on the
> > web visit
> > > > > > > https://groups.google.com/d/
> > > > > > > >>>>
> > > > >
> > msgid/ceres-solver/546A2308.____________9090104%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>
> > > > <http://40atlatec.de>
> > > > > <http://40atlatec.de>
> > > > > > <http://40atlatec.de>
> > > > > > > <http://40atlatec.de>.
> > > > > > > >>>> For more options, visit
> > > > > >
> https://groups.google.com/d/____________optout
> <https://groups.google.com/d/__________optout>
> > <<https://groups.google.com/d/__optout>
>
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CAK0oyEoDc-5B2ae_94Hi7jgCv77QczHa56fCZi3-qq10tctQEg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CAK0oyEoDc-5B2ae_94Hi7jgCv77QczHa56fCZi3-qq10tctQEg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

ceres_no_strings.png

Julius Ziegler

unread,
Feb 16, 2015, 8:09:35 AM2/16/15
to ceres-...@googlegroups.com
On 02/16/2015 01:47 PM, Julius Ziegler wrote:
> On 02/13/2015 06:03 PM, Sameer Agarwal wrote:
>> so there is usually a summary::message string which is created to
>> describe termination.
>> other than that there should be no printing/string creation happening.
>>
>> You can try making our internal implementation of StringPrintf a no-op
>> to see what happens.
>
> ...so here is the version with (most of) string stuff hacked out. It is
> a bit clearer, but no really new relevations.
>
> The only thing I noticed is that both Ceres and Keir's basic solver use
> Eigen to solve the linear problems arising at the core. Keir uses
> "partial_lu_impl" and Ceres uses "housholder_qr_impl". The former one
> seems to be considerably faster, using only 1.5G cycles instead of 6.5G
> cycles, for the same set of problems.

...which is probably a useless observation, since the problem is so
small. Could look completely different for larger problems.

Sameer Agarwal

unread,
Feb 18, 2015, 6:03:40 AM2/18/15
to ceres-...@googlegroups.com
hmm all I see are all sorts of memory allocations and deallocations which for a problem of your size seem entirely catastrophic. 
Sameer

Julius Ziegler

unread,
Feb 18, 2015, 7:14:40 AM2/18/15
to ceres-...@googlegroups.com
On 02/18/2015 12:03 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> hmm all I see are all sorts of memory allocations and deallocations
> which for a problem of your size seem entirely catastrophic.

Agree, but note that some of the mallocs are _within_ the inner
minimization loop (on the screenshot, you can make them out e.g. in
ProgramEvaluator::Evaluate and in internal::SolveUsingEigen). I would
expect these to show up equally in a large scale problem. Their impact
is not so huge, but it looks like it accounts for about 40% of the
runtime (of these two functions).

Julius

> Sameer
>
> On Mon Feb 16 2015 at 5:09:35 AM Julius Ziegler <zie...@atlatec.de
> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>> wrote:
> >>
> >> I have another suspicion where this string related overhead
> is coming
> >> from: Does assembly of the "Summary" struct involve a lot of
> string
> >> operations? Since the tiny 2x2 problem is solved millions of
> time, the
> >> Summary is created really often.
> >>
> >> Julius
> >>
> >>
> >>
> >> On 02/13/2015 05:55 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> >> > if you are not observing stderr, much of the logging is off
> already.
> >> > I will look to see if it can be turned off further.
> >> >
> >> >
> >> > On Fri Feb 13 2015 at 6:57:03 AM Julius Ziegler
> >> <zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> >> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>> wrote:
> >> >
> >> > On 02/13/2015 03:54 PM, 'Sameer Agarwal' via Ceres
> Solver wrote:
> >> > > are you using glog or miniglog?
> >> >
> >> > I found this in CMakeCache.txt
> >> >
> >> > //Use a stripped down version of glog.
> >> > MINIGLOG:BOOL=OFF
> >> >
> >> > so I assume glog?
> >> >
> >> >
> >> > > On Fri Feb 13 2015 at 6:00:07 AM Julius Ziegler
> >> > <zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> >> > > > <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de> <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de>>
> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> >> > <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> https://developer.blender.org/______________diffusion/LMV/____browse/______master/____src/____libmv/__numeric/____levenberg___________marquardt.h
> <https://developer.blender.org/____________diffusion/LMV/__browse/______master/____src/__libmv/__numeric/____levenberg_________marquardt.h>
> >>
> <https://developer.blender.__org/__________diffusion/LMV/__browse/______master/____src/__libmv/__numeric/____levenberg_________marquardt.h
> <https://developer.blender.org/__________diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h>>
> >> >
> >>
> <https://developer.blender.____org/________diffusion/LMV/____browse/____master/____src/____libmv/numeric/____levenberg_________marquardt.h
> >>
> <https://developer.blender.__org/________diffusion/LMV/__browse/____master/____src/__libmv/numeric/____levenberg_______marquardt.h
> <https://developer.blender.org/________diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h>>>
> >> > >
> >> >
> >>
> <https://developer.blender.______org/______diffusion/LMV/______browse/__master/____src/libmv/______numeric/__levenberg___________marquardt.h
> >> >
> >>
> <https://developer.blender.____org/______diffusion/LMV/____browse/__master/____src/libmv/____numeric/__levenberg_________marquardt.h
> >>
> <https://developer.blender.__org/______diffusion/LMV/__browse/__master/____src/libmv/__numeric/__levenberg_______marquardt.h
> <https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h>>>>
> >> > > >
> >> > >
> >> >
> >>
> <https://developer.blender.________org/____diffusion/LMV/__browse/______master/____src/__libmv/__numeric/____levenberg_________marquardt.h
> >> > >
> >> >
> >>
> <https://developer.blender.______org/____diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h
> >> >
> >>
> <https://developer.blender.____org/____diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h
> >>
> <https://developer.blender.__org/____diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>>>>>
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> <https://developer.blender.__________org/__diffusion/LMV/__browse/________master/__src/__libmv/__numeric/________levenberg_____marquardt.h
> >> > > >
> >> > >
> >> >
> >>
> <https://developer.blender.________org/__diffusion/LMV/browse/________master/__src/libmv/__numeric/______levenberg_____marquardt.h
> >> > >
> >> >
> >>
> <https://developer.blender.______org/__diffusion/LMV/browse/______master/__src/libmv/numeric/______levenberg___marquardt.h
> >> >
> >>
> <https://developer.blender.____org/__diffusion/LMV/browse/____master/__src/libmv/numeric/____levenberg___marquardt.h
> >>
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>>>>>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> <https://developer.blender.____________org/diffusion/LMV/__browse/__________master/src/__libmv/__numeric/__________levenberg___marquardt.h
> <https://developer.blender.______________org/diffusion/LMV/
> https://developer.blender.org/______________diffusion/LMV/____browse/______master/____src/____libmv/__numeric/____levenberg___________marquardt.h
> <https://developer.blender.org/____________diffusion/LMV/__browse/______master/____src/__libmv/__numeric/____levenberg_________marquardt.h>
> >>
> <https://developer.blender.__org/__________diffusion/LMV/__browse/______master/____src/__libmv/__numeric/____levenberg_________marquardt.h
> <https://developer.blender.org/__________diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h>>
> >> >
> >>
> <https://developer.blender.____org/________diffusion/LMV/____browse/____master/____src/____libmv/numeric/____levenberg_________marquardt.h
> >>
> <https://developer.blender.__org/________diffusion/LMV/__browse/____master/____src/__libmv/numeric/____levenberg_______marquardt.h
> <https://developer.blender.org/________diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h>>>
> >> > >
> >> >
> >>
> <https://developer.blender.______org/______diffusion/LMV/______browse/__master/____src/libmv/______numeric/__levenberg___________marquardt.h
> >> >
> >>
> <https://developer.blender.____org/______diffusion/LMV/____browse/__master/____src/libmv/____numeric/__levenberg_________marquardt.h
> >>
> <https://developer.blender.__org/______diffusion/LMV/__browse/__master/____src/libmv/__numeric/__levenberg_______marquardt.h
> <https://developer.blender.org/______diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h>>>>
> >> > > >
> >> > >
> >> >
> >>
> <https://developer.blender.________org/____diffusion/LMV/__browse/______master/____src/__libmv/__numeric/____levenberg_________marquardt.h
> >> > >
> >> >
> >>
> <https://developer.blender.______org/____diffusion/LMV/browse/______master/____src/libmv/__numeric/____levenberg_______marquardt.h
> >> >
> >>
> <https://developer.blender.____org/____diffusion/LMV/browse/____master/____src/libmv/numeric/____levenberg_____marquardt.h
> >>
> <https://developer.blender.__org/____diffusion/LMV/browse/__master/____src/libmv/numeric/__levenberg_____marquardt.h
> <https://developer.blender.org/____diffusion/LMV/browse/master/____src/libmv/numeric/levenberg_____marquardt.h>>>>>
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> <https://developer.blender.__________org/__diffusion/LMV/__browse/________master/__src/__libmv/__numeric/________levenberg_____marquardt.h
> >> > > >
> >> > >
> >> >
> >>
> <https://developer.blender.________org/__diffusion/LMV/browse/________master/__src/libmv/__numeric/______levenberg_____marquardt.h
> >> > >
> >> >
> >>
> <https://developer.blender.______org/__diffusion/LMV/browse/______master/__src/libmv/numeric/______levenberg___marquardt.h
> >> >
> >>
> <https://developer.blender.____org/__diffusion/LMV/browse/____master/__src/libmv/numeric/____levenberg___marquardt.h
> >>
> <https://developer.blender.__org/__diffusion/LMV/browse/__master/__src/libmv/numeric/__levenberg___marquardt.h
> <https://developer.blender.org/__diffusion/LMV/browse/master/__src/libmv/numeric/levenberg___marquardt.h>>>>>>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> <https://developer.blender.____________org/diffusion/LMV/__browse/__________master/src/__libmv/__numeric/__________levenberg___marquardt.h
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>>__>__>__>__>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>>__>__>__>__>
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CABqdRUCc-s2XpoAN5SXqL9BfYo5efEaEjGbkZVaPAnFriWL2xg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CABqdRUCc-s2XpoAN5SXqL9BfYo5efEaEjGbkZVaPAnFriWL2xg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Julius Ziegler

unread,
Feb 18, 2015, 7:25:07 AM2/18/15
to ceres-...@googlegroups.com
On 02/18/2015 01:13 PM, Julius Ziegler wrote:
> On 02/18/2015 12:03 PM, 'Sameer Agarwal' via Ceres Solver wrote:
>> hmm all I see are all sorts of memory allocations and deallocations
>> which for a problem of your size seem entirely catastrophic.
>
> Agree, but note that some of the mallocs are _within_ the inner
> minimization loop (on the screenshot, you can make them out e.g. in
> ProgramEvaluator::Evaluate and in internal::SolveUsingEigen). I would
> expect these to show up equally in a large scale problem. Their impact
> is not so huge, but it looks like it accounts for about 40% of the
> runtime (of these two functions).

...I currently have a relatively traditional, relatively large scale BA
problem here and will try to profile that. The program runs very slow in
the profiler, so this might turn out infeasible.

Sameer Agarwal

unread,
Feb 18, 2015, 8:51:02 AM2/18/15
to ceres-...@googlegroups.com
Actually when solving the large scale problem, just looking at the Summary::FullReport or running the solver at -v=3 verbosity reveals quite useful timing information.
Sameer


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/54E4845C.8080906%40atlatec.de.

Henrique Mendonça

unread,
Feb 18, 2015, 7:18:55 PM2/18/15
to ceres-solver
Hi guys,

I also run a 12x12 problem within a RANSAC loop, so I have hundreds to thousands of problems being repeatedly solved in parallel. I have often noticed that the very last run takes at least 10x longer to complete, which doesn't make sense at all as we don't have a garbage collector or anything like that hehe but I just wanted to ask if have also seen something like that...

About Julius/Keirs simple solver, would it be possible to have it as an alternative solver implementation within ceres? i.e. ceres::SimpleSolver or something like that?
It'd definitely increase a bit the amount of code to maintain, but it'd also be an awesome feature to be able to to switch from flexibility to performance by just changing a couple of lines of code... Don't you agree?

Thank you guys for sharing this and for the awesome work here!

Best,
Henrique

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/54DD10E1.708%40atlatec.de.

Sameer Agarwal

unread,
Feb 18, 2015, 9:40:05 PM2/18/15
to ceres-solver
Henrique,
Are you using threads, maybe there is some sort of thread synchronization thing happening that is causing the slow down.

I am not terribly positive about the idea of doing an entirely parallel solver inside ceres. I know it sounds very simple (and attractive) but it very quickly leads down the path of a forked API and a doubling of the testing work. 

What I would like to figure out is a way to expose the static structure of the problem to the existing code and make it faster. One idea would be to simplify the solver path when the user is using a single cost function and the DENSE_QR/DENSE_NORMAL_CHOLESKY as the linear solver.

Sameer




Keir Mierle

unread,
Feb 19, 2015, 1:48:40 AM2/19/15
to ceres-...@googlegroups.com
Hi Julius,

Sorry for the delay; I just saw this thread now. I would love to see your adaption! I'm not sure we're ready to accept such a solver in mainline this minute, but if you would be willing we might run with your current code and see how it looks from an API and maintenance perspective. Don't worry about making a formal patch; just attach some code and I'll take a look.

It's fascinating that the tiny LM loop is so much faster. It is worth considering that the tiny LM loop is considerably stripped down, not just in allocations, but also in numeric stability. The core Ceres LM loop (and also line search) is battle hardened on a wide variety of ill-conditioned problems. This may not matter in your application, but does make a difference sometimes.

I believe I can strip the tiny LM loop down even further to have zero allocations, where you make an LM object up front for certain dimensions.

In your problem, do you have a fixed size residuals? Can you go into more detail of exactly what the residuals are in your case?

Thanks,
Keir

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/54DD10E1.708%40atlatec.de.

Julius Ziegler

unread,
Feb 19, 2015, 4:28:00 AM2/19/15
to ceres-...@googlegroups.com
Hi Keir,

On 02/19/2015 07:48 AM, Keir Mierle wrote:
> Hi Julius,
>
> Sorry for the delay; I just saw this thread now. I would love to see
> your adaption! I'm not sure we're ready to accept such a solver in
> mainline this minute, but if you would be willing we might run with your
> current code and see how it looks from an API and maintenance
> perspective. Don't worry about making a formal patch; just attach some
> code and I'll take a look.

please find some code with a demo program attached.

On my box, it compiles with

g++ demo.cpp -I/usr/include/eigen3 -lglog -lgflags -std=c++11 -o demo

The only "true" addition is at the beginning of the "Update" function.
However, I ripped the code a bit appart (mainly in retracing the many
type indirections in it). I renamed most of the member types, and I also
made the following simplifications: You can no longer provide a custom
linear solver as a template argument (it is always PartialPivLU), and
you can no longer provide a custom Jacobian functor (it is always auto
diff now).

These simplifications were not really necessary and could be easily
undone. I made them only to be able to see clearer through the code.

> It's fascinating that the tiny LM loop is so much faster. It is worth
> considering that the tiny LM loop is considerably stripped down, not
> just in allocations, but also in numeric stability. The core Ceres LM
> loop (and also line search) is battle hardened on a wide variety of
> ill-conditioned problems. This may not matter in your application, but
> does make a difference sometimes.
>
> I believe I can strip the tiny LM loop down even further to have zero
> allocations, where you make an LM object up front for certain dimensions.

In principle, it is like that, isn't it? The problem size is fed in via
template arguments. Some temporary Eigen data structures are created
though, and these could probably be moved out of the loop.

> In your problem, do you have a fixed size residuals? Can you go into
> more detail of exactly what the residuals are in your case?

Yes, I have fixed size residuals (2x2). But the solver will accept
functors with dynamic residual size (parameter size must be known at
compile time, though).

The problem I benchmarked ist that of inverting a custom lense
distortion model. I. e. I have an (analytic) function that "distorts" a
point in the image plane:

u_distorted, v_distorted = distort( u_undistorted, v_undistorted )

I now want to find out the undistorted position, given the distorted
position.

Best
Julius
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>>.
> > >>>> To view this discussion on the web visit
> > https://groups.google.com/d/
> > >>>> msgid/ceres-solver/546A2308.9090104%40atlatec.de <http://40atlatec.de>
> > <http://40atlatec.de>.
> > >>>> For more options, visit https://groups.google.com/d/optout.
> > >>>>
> > >>>
> > >>
> > >> --
> > >> 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>>.
> > >> To view this discussion on the web visit https://groups.google.com/d/
> > >> msgid/ceres-solver/546A2F41.1030407%40atlatec.de
> <http://40atlatec.de>
> > <http://40atlatec.de>.
> > >> For more options, visit https://groups.google.com/d/optout.
> > >>
> > >
> >
> > --
> > 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>>.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/ceres-solver/546A31B9.3050706%40atlatec.de.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver...@googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com
> >
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CADpYijEbBqgWGJcCDF0Y940h_OmXMaaoBXtmXGOYk0mGxHX8Jw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijEbBqgWGJcCDF0Y940h_OmXMaaoBXtmXGOYk0mGxHX8Jw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
fast_dense_solver.tar

Keir Mierle

unread,
Feb 19, 2015, 4:50:32 AM2/19/15
to ceres-...@googlegroups.com
Hi Julius,

On Thu, Feb 19, 2015 at 1:26 AM, Julius Ziegler <zie...@atlatec.de> wrote:
Hi Keir,

On 02/19/2015 07:48 AM, Keir Mierle wrote:
> Hi Julius,
>
> Sorry for the delay; I just saw this thread now. I would love to see
> your adaption! I'm not sure we're ready to accept such a solver in
> mainline this minute, but if you would be willing we might run with your
> current code and see how it looks from an API and maintenance
> perspective. Don't worry about making a formal patch; just attach some
> code and I'll take a look.

please find some code with a demo program attached.

Very nice!
 
On my box, it compiles with

g++ demo.cpp -I/usr/include/eigen3 -lglog -lgflags -std=c++11 -o demo

The only "true" addition is at the beginning of the "Update" function.
However, I ripped the code a bit appart (mainly in retracing the many
type indirections in it). I renamed most of the member types, and I also
made the following simplifications: You can no longer provide a custom
linear solver as a template argument (it is always PartialPivLU), and
you can no longer provide a custom Jacobian functor (it is always auto
diff now).

These simplifications were not really necessary and could be easily
undone. I made them only to be able to see clearer through the code.

Both of these are reasonable. I've started my own refactoring of the tiny LM loop which reworks the templating to make it simpler. 

> It's fascinating that the tiny LM loop is so much faster. It is worth
> considering that the tiny LM loop is considerably stripped down, not
> just in allocations, but also in numeric stability. The core Ceres LM
> loop (and also line search) is battle hardened on a wide variety of
> ill-conditioned problems. This may not matter in your application, but
> does make a difference sometimes.
>
> I believe I can strip the tiny LM loop down even further to have zero
> allocations, where you make an LM object up front for certain dimensions.

In principle, it is like that, isn't it? The problem size is fed in via
template arguments. Some temporary Eigen data structures are created
though, and these could probably be moved out of the loop.

In my new version, I've moved all allocations of Eigen objects into the SmallSolver (previously LeverbergMarquardt). This way you can allocate a single SmallSolver<MyFunction> object, and reuse it for many different problem instances, without triggering any additional allocations. For the distortion problem this is ideal, since without this you would be doing many needless allocations for each pixel.
 
> In your problem, do you have a fixed size residuals? Can you go into
> more detail of exactly what the residuals are in your case?

Yes, I have fixed size residuals (2x2). But the solver will accept
functors with dynamic residual size (parameter size must be known at
compile time, though).

The problem I benchmarked ist that of inverting a custom lense
distortion model. I. e. I have an (analytic) function that "distorts" a
point in the image plane:

u_distorted, v_distorted = distort( u_undistorted, v_undistorted )

I now want to find out the undistorted position, given the distorted
position.

This is exactly what we use the tiny LM loop for in Blender as part of libmv as well :)

When I have my cleaned up SmallSolver ready I'll post a patch to the list.

Thanks,
Keir
 
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/54E5AC57.9020401%40atlatec.de.

Julius Ziegler

unread,
Feb 19, 2015, 8:58:58 AM2/19/15
to ceres-...@googlegroups.com
So, it looks like I have taken the unpopular role of playing the devil's
advocate in pointing out performance issues with Ceres. Please do not
let this discourage you, it is all meant as constructive criticism :-)

First, the good news, in a large scale problem there is not the least
visible of any mallocs/frees (see attachment).

The bad news is that I think I made out a performance problem in Ceres
that is tricky to address, I think.

First some info on the problem that I profiled:

Original Reduced
Parameter blocks 118803 118790
Parameters 356998 356964
Residual blocks 1735878 1735878
Residual 3471756 3471756

Perhaps a bit extreme (but not atypical for some BA problems) is that I
observe very many landmarks per camera (in this problem, there are only
600 cameras, so there is thousands of observations per camera).

The way that you have to break down a BA problem for Ceres bears, imho,
the following inefficiency by design:

When computing all residuals observed from one pose, I do a lot of
redundant computation that is related to the camera coordinates. If I
write down sequentially what happens during an evaluation of the cost
function, it will look like this (pseudo code):

pt0_cam0_coords = transform_point_to_cam_coords( pt0, cam0 )

... // project pt0, compute residual

pt1_cam0_coords = transform_point_to_cam_coords( pt1, cam0 )

... // project pt1, compute residual

pt2_cam0_coords = transform_point_to_cam_coords( pt2, cam0 )

... // project pt2, compute residual


The "transform..." function will do a lot of redundant computation
(namely evaluate sines and cosines of mostly the same angles).

In the profile, I see the runtime almost dominated by
"AngleAxisRotatePoint" and sin and cos (I painted red frames around them
- the only reason why the runtime is not completely dominated by these
is that I use a relatively complicated distortion model (yellow)).

Someone who does not use Ceres problem representation would probably
code the cost function differently. He would probably compute a rotation
matrix once for every camera, and then use that to do the coordinate
transformation (so the sines and cosines are computed only once per
camera). However, having that kind of a common precomputation for
multiple residual blocks is not possible to express, in Ceres.

Maybe I overestimate the cost of computing transcendent functions like
sin and cos, and they are not much more expensive than that matrix
multiplication.

Hm, maybe I will write a test program to profile exactly that.

Julius


On 02/18/2015 02:51 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> Actually when solving the large scale problem, just looking at the
> Summary::FullReport or running the solver at -v=3 verbosity reveals
> quite useful timing information.
> Sameer
>
>
> On Wed, Feb 18, 2015 at 4:23 AM, Julius Ziegler <zie...@atlatec.de
> <mailto:zie...@atlatec.de>> wrote:
>
> On 02/18/2015 01:13 PM, Julius Ziegler wrote:
> > On 02/18/2015 12:03 PM, 'Sameer Agarwal' via Ceres Solver wrote:
> >> hmm all I see are all sorts of memory allocations and deallocations
> >> which for a problem of your size seem entirely catastrophic.
> >
> > Agree, but note that some of the mallocs are _within_ the inner
> > minimization loop (on the screenshot, you can make them out e.g. in
> > ProgramEvaluator::Evaluate and in internal::SolveUsingEigen). I would
> > expect these to show up equally in a large scale problem. Their impact
> > is not so huge, but it looks like it accounts for about 40% of the
> > runtime (of these two functions).
>
> ...I currently have a relatively traditional, relatively large scale BA
> problem here and will try to profile that. The program runs very slow in
> the profiler, so this might turn out infeasible.
>
> > Julius
> >
> >> Sameer
> >>
> >> On Mon Feb 16 2015 at 5:09:35 AM Julius Ziegler
> <zie...@atlatec.de <mailto:zie...@atlatec.de>
> >> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>> wrote:
> >> >>
> >> >> I have another suspicion where this string related
> overhead
> >> is coming
> >> >> from: Does assembly of the "Summary" struct involve a
> lot of
> >> string
> >> >> operations? Since the tiny 2x2 problem is solved
> millions of
> >> time, the
> >> >> Summary is created really often.
> >> >>
> >> >> Julius
> >> >>
> >> >>
> >> >>
> >> >> On 02/13/2015 05:55 PM, 'Sameer Agarwal' via Ceres
> Solver wrote:
> >> >> > if you are not observing stderr, much of the logging
> is off
> >> already.
> >> >> > I will look to see if it can be turned off further.
> >> >> >
> >> >> >
> >> >> > On Fri Feb 13 2015 at 6:57:03 AM Julius Ziegler
> >> >> <zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> >> >> > <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de> <mailto:zie...@atlatec.de
> <mailto:zie...@atlatec.de>>
> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>> wrote:
> >> >> >
> >> >> > On 02/13/2015 03:54 PM, 'Sameer Agarwal' via Ceres
> >> Solver wrote:
> >> >> > > are you using glog or miniglog?
> >> >> >
> >> >> > I found this in CMakeCache.txt
> >> >> >
> >> >> > //Use a stripped down version of glog.
> >> >> > MINIGLOG:BOOL=OFF
> >> >> >
> >> >> > so I assume glog?
> >> >> >
> >> >> >
> >> >> > > On Fri Feb 13 2015 at 6:00:07 AM Julius Ziegler
> >> >> > <zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>
> >> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>
> >> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>
> <mailto:zie...@atlatec.de <mailto:zie...@atlatec.de>>>>
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> >> <mailto:ceres-solver...@googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
> >> To view this discussion on the web visit
> >>
> https://groups.google.com/d/msgid/ceres-solver/CABqdRUCc-s2XpoAN5SXqL9BfYo5efEaEjGbkZVaPAnFriWL2xg%40mail.gmail.com
> >>
> <https://groups.google.com/d/msgid/ceres-solver/CABqdRUCc-s2XpoAN5SXqL9BfYo5efEaEjGbkZVaPAnFriWL2xg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> >> For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CABqdRUCY3dkRJpzsY2tqNRG%2BxYzAzwJFo29fY7FO27JR9kkznw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CABqdRUCY3dkRJpzsY2tqNRG%2BxYzAzwJFo29fY7FO27JR9kkznw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
BA_profile.png

Sameer Agarwal

unread,
Feb 19, 2015, 12:52:22 PM2/19/15
to ceres-...@googlegroups.com
Hi Julius,

We are aware of this issue and you are right there is no easy fix for this. That said, in a typical solve, the autodiffed cost function evaluation only accounts for about 20% or so of the total time. So there isn't that much to be gained here.

Sameer

Julius Ziegler

unread,
Feb 20, 2015, 4:02:57 AM2/20/15
to ceres-...@googlegroups.com
Just a warning about the code I mailed - I just found out that it does
NOT currently work for non-compile-time determined residual sizes (i.e.,
ResidualVector typedef'ed to Eigen::VectorXd). I think it is an easy
fix, but unless someone requests ist, I suggest to wait for Keirs
SmallSolver.

Julius


On 02/19/2015 10:50 AM, Keir Mierle wrote:
> Hi Julius,
>
> On Thu, Feb 19, 2015 at 1:26 AM, Julius Ziegler <zie...@atlatec.de
> > > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>
> > <mailto:ceres-solver%252Buns...@googlegroups.com
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>>.
> > > >>>> To view this discussion on the web visit
> > > https://groups.google.com/d/
> > > >>>> msgid/ceres-solver/546A2308.9090104%40atlatec.de <http://40atlatec.de> <http://40atlatec.de>
> > > <http://40atlatec.de>.
> > > >>>> For more options, visit https://groups.google.com/d/optout.
> > > >>>>
> > > >>>
> > > >>
> > > >> --
> > > >> 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>>
> > > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>
> > <mailto:ceres-solver%252Buns...@googlegroups.com
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>>.
> > > >> To view this discussion on the web visit https://groups.google.com/d/
> > > >> msgid/ceres-solver/546A2F41.1030407%40atlatec.de <http://40atlatec.de>
> > <http://40atlatec.de>
> > > <http://40atlatec.de>.
> > > >> For more options, visit https://groups.google.com/d/optout.
> > > >>
> > > >
> > >
> > > --
> > > 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>>
> > > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>
> > <mailto:ceres-solver%252Buns...@googlegroups.com
> <mailto:ceres-solver%25252Bun...@googlegroups.com>>>.
> > > To view this discussion on the web visit
> > > https://groups.google.com/d/msgid/ceres-solver/546A31B9.3050706%40atlatec.de.
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> > >
> > > --
> > > 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>>
> > > <mailto:ceres-solver...@googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>>>.
> > > To view this discussion on the web visit
> > >
> > https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com
> > >
> > <https://groups.google.com/d/msgid/ceres-solver/CADpYijFMswrXR%2BU55Vvg%2BCpOYyft83FYQvMtrthzyPopki1aRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> > > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver%2Bunsu...@googlegroups.com
> <mailto:ceres-solver%252Buns...@googlegroups.com>>.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/ceres-solver/54DD10E1.708%40atlatec.de.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>
> > <mailto:ceres-solver...@googlegroups.com
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ceres-solver/CADpYijEbBqgWGJcCDF0Y940h_OmXMaaoBXtmXGOYk0mGxHX8Jw%40mail.gmail.com
> >
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijEbBqgWGJcCDF0Y940h_OmXMaaoBXtmXGOYk0mGxHX8Jw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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
> <mailto:ceres-solver%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> --
> 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
> <mailto:ceres-solver...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ceres-solver/CADpYijHjUNE26THyqW%3Df%3DMWBLm38k1YaK%3DDDVwW7kFtf--d%2BEA%40mail.gmail.com
> <https://groups.google.com/d/msgid/ceres-solver/CADpYijHjUNE26THyqW%3Df%3DMWBLm38k1YaK%3DDDVwW7kFtf--d%2BEA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Keir Mierle

unread,
Mar 9, 2015, 10:33:30 PM3/9/15
to ceres-...@googlegroups.com
I prepared a simple version of the small solver, without integrated autodiff:


This is not slated for merge though since there are real concerns around maintainability of two separate solver loops.

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/54E6F7F7.1060405%40atlatec.de.
Reply all
Reply to author
Forward
0 new messages