pub trait SmplModel<B: Backend>:
Send
+ Sync
+ 'static
+ Any
+ DynClone {
Show 25 methods
// Required methods
fn smpl_type(&self) -> SmplType;
fn gender(&self) -> Gender;
fn device(&self) -> B::Device;
fn forward(
&self,
options: &SmplOptions,
betas: &BetasG<B>,
pose_raw: &PoseG<B>,
expression: Option<&ExpressionG<B>>,
) -> SmplOutputG<B>;
fn create_body_with_uv(
&self,
smpl_output: &SmplOutputG<B>,
) -> SmplOutputG<B>;
fn get_face_model(&self) -> &dyn FaceModel<B>;
fn betas2verts(&self, betas: &BetasG<B>) -> Tensor<B, 2, Float>;
fn verts2joints(
&self,
verts_t_pose: Tensor<B, 2, Float>,
) -> Tensor<B, 2, Float>;
fn compute_pose_correctives(&self, pose: &PoseG<B>) -> Tensor<B, 2, Float>;
fn compute_pose_feature(&self, pose: &PoseG<B>) -> Tensor<B, 1, Float>;
fn apply_pose(
&self,
verts_t_pose: &Tensor<B, 2, Float>,
joints: &Tensor<B, 2, Float>,
lbs_weights: &Tensor<B, 2, Float>,
pose: &PoseG<B>,
) -> (Tensor<B, 2, Float>, Tensor<B, 2, Float>);
fn faces(&self) -> &Tensor<B, 2, Int>;
fn faces_uv(&self) -> &Tensor<B, 2, Int>;
fn uv(&self) -> &Tensor<B, 2, Float>;
fn lbs_weights(&self) -> Tensor<B, 2, Float>;
fn lbs_weights_split(&self) -> Tensor<B, 2, Float>;
fn idx_split_2_merged(&self) -> Tensor<B, 1, Int>;
fn idx_split_2_merged_vec(&self) -> &Vec<usize>;
fn set_pose_dirs(&mut self, posedirs: Tensor<B, 2, Float>);
fn get_pose_dirs(&self) -> Tensor<B, 2, Float>;
fn get_expression_dirs(&self) -> Option<Tensor<B, 2, Float>>;
fn vertex_face_csr(&self) -> Option<VertexFaceCSRBurn<B>>;
fn vertex_face_uv_csr(&self) -> Option<VertexFaceCSRBurn<B>>;
fn clone_dyn(&self) -> Box<dyn SmplModel<B>>;
fn as_any(&self) -> &dyn Any;
}Expand description
Trait for a Smpl based model. Smpl-rs expects all Smpl models to implement this.