|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
#include <fully_differentiable_projection_error_function.h>
Public Member Functions | |
| FullyDifferentiableProjectionErrorFunctionT (const momentum::Skeleton &skel, const momentum::ParameterTransform &pt, T nearClip=T(1)) | |
| std::vector< std::string > | inputs () const override |
| Eigen::Index | getInputSize (const std::string &name) const override |
| void | getInputImp (const std::string &name, Eigen::Ref< Eigen::VectorX< T > > result) const override |
| void | setInputImp (const std::string &name, Eigen::Ref< const Eigen::VectorX< T > > value) override |
| const char * | name () const override |
| Eigen::VectorX< T > | d_gradient_d_input_dot (const std::string &inputName, const momentum::ModelParametersT< T > &modelParams, const momentum::SkeletonStateT< T > &state, Eigen::Ref< const Eigen::VectorX< T > > inputVec) override |
| Public Member Functions inherited from momentum::ProjectionErrorFunctionT< T > | |
| ProjectionErrorFunctionT (const momentum::Skeleton &skel, const momentum::ParameterTransform &pt, T nearClip=T(1)) | |
| double | getError (const momentum::ModelParametersT< T > ¶ms, const momentum::SkeletonStateT< T > &state, const momentum::MeshStateT< T > &meshState) final |
| double | getGradient (const momentum::ModelParametersT< T > ¶ms, const momentum::SkeletonStateT< T > &state, const momentum::MeshStateT< T > &meshState, Eigen::Ref< Eigen::VectorX< T > > gradient) final |
| double | getJacobian (const momentum::ModelParametersT< T > ¶ms, const momentum::SkeletonStateT< T > &state, const momentum::MeshStateT< T > &meshState, Eigen::Ref< Eigen::MatrixX< T > > jacobian, Eigen::Ref< Eigen::VectorX< T > > residual, int &usedRows) final |
| size_t | getJacobianSize () const final |
| void | addConstraint (const ProjectionConstraintDataT< T > &data) |
| void | clearConstraints () |
| bool | empty () const |
| size_t | getNumConstraints () const |
| void | setConstraints (std::vector< ProjectionConstraintDataT< T > > constraints) |
| const std::vector< ProjectionConstraintDataT< T > > & | getConstraints () const |
| ProjectionConstraintDataT< T > & | getConstraint (size_t index) |
| Returns a mutable reference to the constraint at the given index, for in-place target/weight updates. | |
| Public Member Functions inherited from momentum::SkeletonErrorFunctionT< T > | |
| SkeletonErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt) | |
| virtual | ~SkeletonErrorFunctionT ()=default |
| const Skeleton & | getSkeleton () const |
| const ParameterTransform & | getParameterTransform () const |
| virtual const Character * | getCharacter () const |
| For mesh-based error functions, get access to the underlying character. | |
| void | setWeight (T w) |
| T | getWeight () const |
| void | setActiveJoints (const VectorX< bool > &aj) |
| void | setEnabledParameters (const ParameterSet &ps) |
| virtual void | getHessian (const ModelParametersT< T > &, const SkeletonStateT< T > &, const MeshStateT< T > &, Eigen::Ref< Eigen::MatrixX< T > >) |
| virtual double | getSolverDerivatives (const ModelParametersT< T > ¶meters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, const size_t actualParameters, Eigen::MatrixX< T > &hess, Eigen::VectorX< T > &grad) |
| virtual bool | needsMesh () const |
| Public Member Functions inherited from momentum::FullyDifferentiableSkeletonErrorFunctionT< T > | |
| virtual | ~FullyDifferentiableSkeletonErrorFunctionT ()=default |
| Eigen::VectorX< T > | getInput (const std::string &name) const |
| void | getInput (const std::string &name, Eigen::Ref< Eigen::VectorX< T > > value) const |
| void | setInput (const std::string &name, Eigen::Ref< const Eigen::VectorX< T > > value) |
Static Public Attributes | |
| static constexpr const char * | kParents = "parents" |
| static constexpr const char * | kOffsets = "offsets" |
| static constexpr const char * | kWeights = "weights" |
| static constexpr const char * | kTargets = "targets" |
| static constexpr const char * | kProjections = "projections" |
| Static Public Attributes inherited from momentum::ProjectionErrorFunctionT< T > | |
| static constexpr T | kLegacyWeight = 1e-4 |
| Default constant weight in MarkerErrorFunction. | |
Protected Member Functions | |
| template<typename JetType> | |
| JetType | constraintGradient_dot (const momentum::ModelParametersT< T > &modelParams, const momentum::SkeletonStateT< T > &skelState, int parentJointIndex_cons, const Eigen::Vector3< JetType > &offset_cons, const JetType &weight_cons, const Eigen::Matrix< JetType, 3, 4 > &projection_cons, const Eigen::Vector2< JetType > &target_cons, Eigen::Ref< const Eigen::VectorX< T > > inputVec) const |
Additional Inherited Members | |
| Protected Attributes inherited from momentum::ProjectionErrorFunctionT< T > | |
| std::vector< ProjectionConstraintDataT< T > > | constraints_ |
| T | _nearClip = 1.0f |
| Protected Attributes inherited from momentum::SkeletonErrorFunctionT< T > | |
| const Skeleton & | skeleton_ |
| const ParameterTransform & | parameterTransform_ |
| T | weight_ |
| VectorX< bool > | activeJointParams_ |
| ParameterSet | enabledParameters_ |
| bool | useHessian_ {false} |
| Static Protected Attributes inherited from momentum::ProjectionErrorFunctionT< T > | |
| static constexpr T | kProjectionWeight = 1.0 |
Definition at line 20 of file fully_differentiable_projection_error_function.h.
| momentum::FullyDifferentiableProjectionErrorFunctionT< T >::FullyDifferentiableProjectionErrorFunctionT | ( | const momentum::Skeleton & | skel, |
| const momentum::ParameterTransform & | pt, | ||
| T | nearClip = T(1) ) |
Definition at line 21 of file fully_differentiable_projection_error_function.cpp.
References momentum::ProjectionErrorFunctionT< T >::ProjectionErrorFunctionT().
|
nodiscardprotected |
Definition at line 29 of file fully_differentiable_projection_error_function.cpp.
References momentum::ProjectionErrorFunctionT< T >::_nearClip, momentum::SkeletonErrorFunctionT< T >::activeJointParams_, momentum::cast(), momentum::getRotationDerivative(), momentum::getScaleDerivative(), momentum::SkeletonStateT< T >::jointState, momentum::kInvalidIndex, momentum::ProjectionErrorFunctionT< T >::kProjectionWeight, momentum::SkeletonErrorFunctionT< T >::parameterTransform_, momentum::SkeletonErrorFunctionT< T >::skeleton_, momentum::times_parameterTransform_times_v(), and momentum::SkeletonErrorFunctionT< T >::weight_.
Referenced by d_gradient_d_input_dot().
|
overridevirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 119 of file fully_differentiable_projection_error_function.cpp.
References momentum::buildJetMat(), momentum::buildJetVec(), momentum::cast(), constraintGradient_dot(), momentum::ProjectionErrorFunctionT< T >::constraints_, kOffsets, kProjections, kTargets, and kWeights.
|
overridevirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 222 of file fully_differentiable_projection_error_function.cpp.
References momentum::ProjectionErrorFunctionT< T >::constraints_, kOffsets, kProjections, kTargets, kWeights, and name().
|
nodiscardoverridevirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 206 of file fully_differentiable_projection_error_function.cpp.
References momentum::ProjectionErrorFunctionT< T >::constraints_, kOffsets, kProjections, kTargets, kWeights, and name().
|
nodiscardoverridevirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 199 of file fully_differentiable_projection_error_function.cpp.
References kOffsets, kProjections, kTargets, and kWeights.
|
inlinenodiscardoverridevirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 39 of file fully_differentiable_projection_error_function.h.
Referenced by getInputImp(), getInputSize(), and setInputImp().
|
overridevirtual |
Implements momentum::FullyDifferentiableSkeletonErrorFunctionT< T >.
Definition at line 254 of file fully_differentiable_projection_error_function.cpp.
References momentum::ProjectionErrorFunctionT< T >::constraints_, kOffsets, kProjections, kTargets, kWeights, and name().
|
staticconstexpr |
Definition at line 25 of file fully_differentiable_projection_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), inputs(), and setInputImp().
|
staticconstexpr |
Definition at line 24 of file fully_differentiable_projection_error_function.h.
|
staticconstexpr |
Definition at line 28 of file fully_differentiable_projection_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), inputs(), and setInputImp().
|
staticconstexpr |
Definition at line 27 of file fully_differentiable_projection_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), inputs(), and setInputImp().
|
staticconstexpr |
Definition at line 26 of file fully_differentiable_projection_error_function.h.
Referenced by d_gradient_d_input_dot(), getInputImp(), getInputSize(), inputs(), and setInputImp().