kbrodt commited on
Commit
510bcce
1 Parent(s): 004c9d7

Upload smplx.diff

Browse files
Files changed (1) hide show
  1. patches/smplx.diff +49 -0
patches/smplx.diff ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ +++ venv/lib/python3.10/site-packages/smplx/body_models.py
2
+ @@ -366,7 +366,7 @@
3
+ num_repeats = int(batch_size / betas.shape[0])
4
+ betas = betas.expand(num_repeats, -1)
5
+
6
+ - vertices, joints = lbs(betas, full_pose, self.v_template,
7
+ + vertices, joints, _ = lbs(betas, full_pose, self.v_template,
8
+ self.shapedirs, self.posedirs,
9
+ self.J_regressor, self.parents,
10
+ self.lbs_weights, pose2rot=pose2rot)
11
+ @@ -1228,7 +1228,7 @@
12
+
13
+ shapedirs = torch.cat([self.shapedirs, self.expr_dirs], dim=-1)
14
+
15
+ - vertices, joints = lbs(shape_components, full_pose, self.v_template,
16
+ + vertices, joints, A = lbs(shape_components, full_pose, self.v_template,
17
+ shapedirs, self.posedirs,
18
+ self.J_regressor, self.parents,
19
+ self.lbs_weights, pose2rot=pose2rot,
20
+ @@ -1283,7 +1283,9 @@
21
+ right_hand_pose=right_hand_pose,
22
+ jaw_pose=jaw_pose,
23
+ v_shaped=v_shaped,
24
+ - full_pose=full_pose if return_full_pose else None)
25
+ + full_pose=full_pose if return_full_pose else None,
26
+ + A=A,
27
+ + )
28
+ return output
29
+
30
+
31
+ +++ venv/lib/python3.10/site-packages/smplx/lbs.py
32
+ @@ -245,7 +245,7 @@
33
+
34
+ verts = v_homo[:, :, :3, 0]
35
+
36
+ - return verts, J_transformed
37
+ + return verts, J_transformed, (A, J)
38
+
39
+
40
+ def vertices2joints(J_regressor: Tensor, vertices: Tensor) -> Tensor:
41
+ +++ venv/lib/python3.10/site-packages/smplx/utils.py
42
+ @@ -71,6 +71,7 @@
43
+ class SMPLXOutput(SMPLHOutput):
44
+ expression: Optional[Tensor] = None
45
+ jaw_pose: Optional[Tensor] = None
46
+ + A: Optional[Tensor] = None
47
+
48
+
49
+ @dataclass