features.rst 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. .. default-domain:: cpp
  2. .. cpp:namespace:: ceres
  3. ====
  4. Why?
  5. ====
  6. .. _chapter-features:
  7. * **Code Quality** - Ceres Solver has been used in production at
  8. Google since 2011. It is clean, extensively tested and well
  9. documented code that is actively developed and supported.
  10. * **Modeling API** - It is rarely the case that one starts with the
  11. exact and complete formulation of the problem that one is trying to
  12. solve. Ceres's modeling API has been designed so that the user can
  13. easily build and modify the objective function, one term at a
  14. time. And to do so without worrying about how the solver is going to
  15. deal with the resulting changes in the sparsity/structure of the
  16. underlying problem.
  17. - **Derivatives** Supplying derivatives is perhaps the most tedious
  18. and error prone part of using an optimization library. Ceres
  19. ships with `automatic`_ and `numeric`_ differentiation. So you
  20. never have to compute derivatives by hand (unless you really want
  21. to). Not only this, Ceres allows you to mix automatic, numeric and
  22. analytical derivatives in any combination that you want.
  23. - **Robust Loss Functions** Most non-linear least squares problems
  24. involve data. If there is data, there will be outliers. Ceres
  25. allows the user to *shape* their residuals using a
  26. :class:`LossFunction` to reduce the influence of outliers.
  27. - **Manifolds** In many cases, some parameters lie on a manifold
  28. other than Euclidean space, e.g., rotation matrices. In such
  29. cases, the user can specify the geometry of the local tangent
  30. space by specifying a :class:`Manifold` object.
  31. * **Solver Choice** Depending on the size, sparsity structure, time &
  32. memory budgets, and solution quality requirements, different
  33. optimization algorithms will suit different needs. To this end,
  34. Ceres Solver comes with a variety of optimization algorithms:
  35. - **Trust Region Solvers** - Ceres supports Levenberg-Marquardt,
  36. Powell's Dogleg, and Subspace dogleg methods. The key
  37. computational cost in all of these methods is the solution of a
  38. linear system. To this end Ceres ships with a variety of linear
  39. solvers - dense QR and dense Cholesky factorization (using
  40. `Eigen`_, `LAPACK`_ or `CUDA`_) for dense problems, sparse
  41. Cholesky factorization (`SuiteSparse`_, `Apple's Accelerate`_,
  42. `Eigen`_) for large sparse problems, custom Schur complement based
  43. dense, sparse, and iterative linear solvers for `bundle
  44. adjustment`_ problems.
  45. - **Line Search Solvers** - When the problem size is so large that
  46. storing and factoring the Jacobian is not feasible or a low
  47. accuracy solution is required cheaply, Ceres offers a number of
  48. line search based algorithms. This includes a number of variants
  49. of Non-linear Conjugate Gradients, BFGS and LBFGS.
  50. * **Speed** - Ceres Solver has been extensively optimized, with C++
  51. templating, hand written linear algebra routines and modern C++
  52. threads based multithreading of the Jacobian evaluation and the
  53. linear solvers.
  54. * **GPU Acceleration** If your system supports `CUDA`_ then Ceres
  55. Solver can use the Nvidia GPU on your system to speed up the solver.
  56. * **Solution Quality** Ceres is the `best performing`_ solver on the
  57. NIST problem set used by Mondragon and Borchers for benchmarking
  58. non-linear least squares solvers.
  59. * **Covariance estimation** - Evaluate the sensitivity/uncertainty of
  60. the solution by evaluating all or part of the covariance
  61. matrix. Ceres is one of the few solvers that allows you to do this
  62. analysis at scale.
  63. * **Community** Since its release as an open source software, Ceres
  64. has developed an active developer community that contributes new
  65. features, bug fixes and support.
  66. * **Portability** - Runs on *Linux*, *Windows*, *Mac OS X*, *Android*
  67. *and iOS*.
  68. * **BSD Licensed** The BSD license offers the flexibility to ship your
  69. application
  70. .. _best performing: https://groups.google.com/forum/#!topic/ceres-solver/UcicgMPgbXw
  71. .. _bundle adjustment: http://en.wikipedia.org/wiki/Bundle_adjustment
  72. .. _SuiteSparse: http://www.cise.ufl.edu/research/sparse/SuiteSparse/
  73. .. _Eigen: http://eigen.tuxfamily.org/
  74. .. _LAPACK: http://www.netlib.org/lapack/
  75. .. _automatic: http://en.wikipedia.org/wiki/Automatic_differentiation
  76. .. _numeric: http://en.wikipedia.org/wiki/Numerical_differentiation
  77. .. _CUDA : https://developer.nvidia.com/cuda-toolkit
  78. .. _Apple's Accelerate: https://developer.apple.com/documentation/accelerate/sparse_solvers