callable-lipsync 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- callable_lipsync/__init__.py +93 -0
- callable_lipsync/__main__.py +32 -0
- callable_lipsync/arkit.py +115 -0
- callable_lipsync/data/arkit/arkit.bin +0 -0
- callable_lipsync/data/arkit/arkit.json +388 -0
- callable_lipsync/data/nano/fe.onnx +0 -0
- callable_lipsync/data/nano/meta.json +167 -0
- callable_lipsync/data/nano/out.onnx +0 -0
- callable_lipsync/data/nano/s0.onnx +0 -0
- callable_lipsync/data/nano/s1.onnx +0 -0
- callable_lipsync/data/nano/t0.onnx +0 -0
- callable_lipsync/data/nano/t1.onnx +0 -0
- callable_lipsync/data/nano/t2.onnx +0 -0
- callable_lipsync/data/nano/t3.onnx +0 -0
- callable_lipsync/data/nano/t4.onnx +0 -0
- callable_lipsync/data/tiny/aud.onnx +0 -0
- callable_lipsync/data/tiny/ctx.onnx +0 -0
- callable_lipsync/data/tiny/digit.onnx +0 -0
- callable_lipsync/data/tiny/face.onnx +0 -0
- callable_lipsync/data/tiny/fe.onnx +0 -0
- callable_lipsync/data/tiny/gru.onnx +0 -0
- callable_lipsync/data/tiny/head.onnx +0 -0
- callable_lipsync/data/tiny/meta.json +242 -0
- callable_lipsync/data/tiny/open.onnx +0 -0
- callable_lipsync/data/tiny/s0.onnx +0 -0
- callable_lipsync/data/tiny/s1.onnx +0 -0
- callable_lipsync/data/tiny/t0.onnx +0 -0
- callable_lipsync/data/tiny/t1.onnx +0 -0
- callable_lipsync/data/tiny/t2.onnx +0 -0
- callable_lipsync/data/tiny/t3.onnx +0 -0
- callable_lipsync/data/tiny/t4.onnx +0 -0
- callable_lipsync/data/tiny/t5.onnx +0 -0
- callable_lipsync/data/tiny/tables.bin +0 -0
- callable_lipsync/data/tiny/vqdec.onnx +0 -0
- callable_lipsync/engine.py +281 -0
- callable_lipsync-0.1.0.dist-info/METADATA +311 -0
- callable_lipsync-0.1.0.dist-info/RECORD +41 -0
- callable_lipsync-0.1.0.dist-info/WHEEL +4 -0
- callable_lipsync-0.1.0.dist-info/entry_points.txt +2 -0
- callable_lipsync-0.1.0.dist-info/licenses/LICENSE +202 -0
- callable_lipsync-0.1.0.dist-info/licenses/NOTICE +4 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"""callable-lipsync: a tiny speech-to-face model. 16 kHz speech in, FLAME 2023 Open frames out at 25 fps.
|
|
2
|
+
|
|
3
|
+
from callable_lipsync import LipSync
|
|
4
|
+
model = LipSync("tiny") # or "nano"
|
|
5
|
+
for chunk in stream: # float32, 16 kHz mono, any chunk size
|
|
6
|
+
frames = model(chunk) # (n, 118): the frames this audio settled
|
|
7
|
+
|
|
8
|
+
A frame is 118 numbers: see LAYOUT. Rotations are axis-angle, in radians.
|
|
9
|
+
For a rig with ARKit blendshapes: Arkit("tiny")(frames) gives the 51 weights.
|
|
10
|
+
"""
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
import numpy as np
|
|
14
|
+
|
|
15
|
+
from .arkit import Arkit
|
|
16
|
+
from .engine import FRAME, Engine
|
|
17
|
+
|
|
18
|
+
__version__ = "0.1.0"
|
|
19
|
+
__all__ = ["LipSync", "animate", "Arkit", "Engine", "LAYOUT", "MODELS", "AHEAD", "SAMPLE_RATE", "FPS"]
|
|
20
|
+
|
|
21
|
+
SAMPLE_RATE, FPS = 16000, 25
|
|
22
|
+
MODELS = ("tiny", "nano")
|
|
23
|
+
#: what the 118 numbers of a frame are
|
|
24
|
+
LAYOUT = {"expression": slice(0, 100), "chest": slice(100, 103), "jaw": slice(103, 106), "neck": slice(106, 109),
|
|
25
|
+
"left_eye": slice(109, 112), "right_eye": slice(112, 115), "travel": slice(115, 118)}
|
|
26
|
+
#: seconds of audio ahead of a frame -> the engine's settings, and how many frames after a frame's own start it is ready
|
|
27
|
+
AHEAD = {0.64: dict(known=12, wait=4, ready=16), 0.48: dict(known=8, wait=4, ready=12), 0.32: dict(known=4, wait=4, ready=8),
|
|
28
|
+
0.16: dict(known=0, wait=4, ready=5), 0.08: dict(known=-2, wait=2, ready=3), 0.0: dict(known=-4, wait=0, ready=1)}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def model_path(model="tiny"):
|
|
32
|
+
"""The folder with a model's files: inside the installed package, or the repository's models/ folder."""
|
|
33
|
+
here = Path(__file__).resolve().parent
|
|
34
|
+
for p in (here / "data" / model, here.parent.parent / "models" / model):
|
|
35
|
+
if (p / "meta.json").exists():
|
|
36
|
+
return p
|
|
37
|
+
raise FileNotFoundError(f"callable-lipsync model {model!r} not found")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class LipSync:
|
|
41
|
+
"""A model on a stream of speech.
|
|
42
|
+
|
|
43
|
+
model "tiny" (lips, jaw, face, blinks, gaze, head, neck, upper body) or "nano" (lips, jaw, face, head)
|
|
44
|
+
ahead seconds of audio the model may hear before a frame is due: 0.64, 0.48, 0.32, 0.16, 0.08 or 0.
|
|
45
|
+
More gives head motion that lands on the speech; the lips want 0.16. nano always uses 0.16.
|
|
46
|
+
seed tiny draws head, eye and blink motion: the same seed and audio give the same motion (None: a new one each reset)
|
|
47
|
+
expressiveness 1 to 3: how strongly head and eyes react to the speech (tiny)
|
|
48
|
+
threads CPU threads for onnxruntime
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
def __init__(self, model="tiny", ahead=0.64, seed=None, expressiveness=2.0, threads=1, path=None):
|
|
52
|
+
if path is None and model not in MODELS:
|
|
53
|
+
raise ValueError(f"model must be one of {MODELS}")
|
|
54
|
+
self.engine = Engine(path or model_path(model), threads=threads)
|
|
55
|
+
self.nano = self.engine.nano
|
|
56
|
+
self.reset(ahead=ahead, seed=seed, expressiveness=expressiveness)
|
|
57
|
+
|
|
58
|
+
def reset(self, ahead=None, seed=None, expressiveness=None):
|
|
59
|
+
"""Start a new stream (a new utterance or a new speaker). Settings not given stay as they were."""
|
|
60
|
+
if ahead is not None:
|
|
61
|
+
ahead = 0.16 if self.nano else float(ahead)
|
|
62
|
+
if ahead not in AHEAD:
|
|
63
|
+
raise ValueError(f"ahead must be one of {sorted(AHEAD)}")
|
|
64
|
+
self.ahead = ahead
|
|
65
|
+
if expressiveness is not None:
|
|
66
|
+
self.expressiveness = float(expressiveness)
|
|
67
|
+
mode = AHEAD[self.ahead]
|
|
68
|
+
#: a frame is ready this many frames (of 40 ms) after its own start
|
|
69
|
+
self.delay_frames = mode["ready"]
|
|
70
|
+
self.seed = int(np.random.SeedSequence().generate_state(1)[0] >> 1) if seed is None else int(seed)
|
|
71
|
+
self.engine.reset(known=mode["known"], wait=mode["wait"], guide=self.expressiveness, seed=self.seed)
|
|
72
|
+
self.samples = 0
|
|
73
|
+
|
|
74
|
+
def __call__(self, audio):
|
|
75
|
+
"""Feed 16 kHz mono float audio (any length); returns the frames it settled, (n, 118), n may be 0."""
|
|
76
|
+
audio = np.asarray(audio, np.float32).reshape(-1)
|
|
77
|
+
self.samples += len(audio)
|
|
78
|
+
self.engine.push(audio)
|
|
79
|
+
return self.engine.step()
|
|
80
|
+
|
|
81
|
+
def flush(self):
|
|
82
|
+
"""The frames still owed for the audio fed so far (the model waits for audio ahead; this feeds it silence)."""
|
|
83
|
+
want = self.samples // FRAME - self.engine.out
|
|
84
|
+
got = self(np.zeros((self.delay_frames + 12) * FRAME, np.float32)) if want > 0 else np.zeros((0, 118), np.float32)
|
|
85
|
+
return got[:max(want, 0)]
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def animate(audio, model="tiny", ahead=0.64, seed=0, expressiveness=2.0, threads=1):
|
|
89
|
+
"""A whole clip at once: 16 kHz mono float audio -> frames (len(audio) // 640, 118) at 25 fps."""
|
|
90
|
+
m = LipSync(model, ahead=ahead, seed=seed, expressiveness=expressiveness, threads=threads)
|
|
91
|
+
audio = np.asarray(audio, np.float32).reshape(-1)
|
|
92
|
+
parts = [m(audio[i:i + 16000]) for i in range(0, len(audio), 16000)]
|
|
93
|
+
return np.concatenate(parts + [m.flush()])
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""callable-lipsync speech.wav frames.npy [--model tiny|nano] [--ahead 0.64] [--seed 0]
|
|
2
|
+
|
|
3
|
+
A 16 kHz mono 16-bit wav -> a .npy of frames (n, 118) at 25 fps."""
|
|
4
|
+
import argparse
|
|
5
|
+
import wave
|
|
6
|
+
|
|
7
|
+
import numpy as np
|
|
8
|
+
|
|
9
|
+
from . import AHEAD, MODELS, animate
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def read_wav(path):
|
|
13
|
+
with wave.open(str(path)) as w:
|
|
14
|
+
if (w.getframerate(), w.getnchannels(), w.getsampwidth()) != (16000, 1, 2):
|
|
15
|
+
raise SystemExit(f"{path}: need 16 kHz mono 16-bit PCM (got {w.getframerate()} Hz, {w.getnchannels()} ch, {8 * w.getsampwidth()} bit)")
|
|
16
|
+
return np.frombuffer(w.readframes(w.getnframes()), np.int16).astype(np.float32) / 32768
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def main():
|
|
20
|
+
p = argparse.ArgumentParser(prog="callable-lipsync", description="Speech to face animation frames.")
|
|
21
|
+
p.add_argument("wav"); p.add_argument("out")
|
|
22
|
+
p.add_argument("--model", default="tiny", choices=MODELS)
|
|
23
|
+
p.add_argument("--ahead", type=float, default=0.64, choices=sorted(AHEAD))
|
|
24
|
+
p.add_argument("--seed", type=int, default=0)
|
|
25
|
+
a = p.parse_args()
|
|
26
|
+
frames = animate(read_wav(a.wav), model=a.model, ahead=a.ahead, seed=a.seed)
|
|
27
|
+
np.save(a.out, frames)
|
|
28
|
+
print(f"{len(frames)} frames ({len(frames) / 25:.1f} s) -> {a.out}")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if __name__ == "__main__":
|
|
32
|
+
main()
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"""Frames as ARKit blendshape weights.
|
|
2
|
+
|
|
3
|
+
from callable_lipsync import LipSync, Arkit
|
|
4
|
+
model, arkit = LipSync("tiny"), Arkit("tiny")
|
|
5
|
+
weights = arkit(model(chunk)) # (n, 51), each 0..1, in the order of arkit.names
|
|
6
|
+
|
|
7
|
+
The 51 ARKit shapes are displacements of the FLAME head's vertices, so a frame's weights are the mix of them closest
|
|
8
|
+
to how far the frame's face is from the model's resting face. jawOpen comes straight from the jaw's rotation and the
|
|
9
|
+
eight eyeLook weights from the eyes'; the rest are solved from the face's shape. The head, neck and chest rotations
|
|
10
|
+
and the travel are not blendshapes: apply those to your rig's bones from the frame itself.
|
|
11
|
+
"""
|
|
12
|
+
import json
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
import numpy as np
|
|
16
|
+
|
|
17
|
+
LOOK = ("eyeLookDownLeft", "eyeLookDownRight", "eyeLookInLeft", "eyeLookInRight", "eyeLookOutLeft", "eyeLookOutRight", "eyeLookUpLeft", "eyeLookUpRight")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _data_path():
|
|
21
|
+
here = Path(__file__).resolve().parent
|
|
22
|
+
for p in (here / "data" / "arkit", here.parent.parent / "models" / "arkit"):
|
|
23
|
+
if (p / "arkit.json").exists():
|
|
24
|
+
return p
|
|
25
|
+
raise FileNotFoundError("callable-lipsync: the ARKit converter's data was not found")
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _rotations(r): # axis-angle (n, 3) -> matrices (n, 3, 3)
|
|
29
|
+
r = np.asarray(r, np.float64); t = np.linalg.norm(r, axis=1); small = t < 1e-9; k = r / np.where(small, 1, t)[:, None]
|
|
30
|
+
c, s = np.cos(t), np.sin(t); v = 1 - c; x, y, z = k.T; R = np.empty((len(r), 3, 3))
|
|
31
|
+
R[:, 0, 0] = c + x * x * v; R[:, 0, 1] = x * y * v - z * s; R[:, 0, 2] = x * z * v + y * s
|
|
32
|
+
R[:, 1, 0] = y * x * v + z * s; R[:, 1, 1] = c + y * y * v; R[:, 1, 2] = y * z * v - x * s
|
|
33
|
+
R[:, 2, 0] = z * x * v - y * s; R[:, 2, 1] = z * y * v + x * s; R[:, 2, 2] = c + z * z * v
|
|
34
|
+
if small.any():
|
|
35
|
+
a = r[small]; o = np.ones(len(a)); R[small] = np.stack([o, -a[:, 2], a[:, 1], a[:, 2], o, -a[:, 0], -a[:, 1], a[:, 0], o], 1).reshape(-1, 3, 3)
|
|
36
|
+
return R
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class Arkit:
|
|
40
|
+
"""The converter for one model's frames.
|
|
41
|
+
|
|
42
|
+
model "tiny" or "nano": whose resting face the weights are measured from (or `rest`: your own frame of 118)
|
|
43
|
+
jaw the jaw rotation, in radians past rest, that counts as jawOpen = 1
|
|
44
|
+
look_range the eye rotation, in radians, that counts as an eyeLook weight of 1
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__(self, model="tiny", rest=None, jaw=0.35, look_range=0.5, ridge=0.01):
|
|
48
|
+
p = _data_path(); meta = json.loads((p / "arkit.json").read_text()); buf = (p / "arkit.bin").read_bytes()
|
|
49
|
+
for k, a in meta["arrays"].items():
|
|
50
|
+
setattr(self, "_" + k, np.frombuffer(buf, a["dtype"], int(np.prod(a["shape"])), a["offset"]).reshape(a["shape"]).astype(np.int64 if a["dtype"] == "uint32" else np.float64))
|
|
51
|
+
#: the 51 ARKit blendshape names, in the order of the weights
|
|
52
|
+
self.names = list(meta["names"])
|
|
53
|
+
self.index = {n: i for i, n in enumerate(self.names)}
|
|
54
|
+
self.rest = np.asarray(meta["rest"][model] if rest is None else rest, np.float64)
|
|
55
|
+
self.jaw, self.look_range = jaw, look_range
|
|
56
|
+
K = len(self.names); jo = self.index["jawOpen"]
|
|
57
|
+
self._rest_points = self._points(self.rest[None])[0]
|
|
58
|
+
A = self._shapes.copy()
|
|
59
|
+
step = self.rest.copy(); step[103] += 0.05 # jawOpen is the jaw's own rotation: the direction it starts in, from rest
|
|
60
|
+
A[jo] = (self._points(step[None])[0] - self._rest_points) * jaw / 0.05
|
|
61
|
+
self._A = A; self._G = A @ A.T; self._lam = ridge * np.trace(self._G) / K
|
|
62
|
+
self._free = np.flatnonzero([n not in LOOK and n != "jawOpen" for n in self.names])
|
|
63
|
+
self._H = self._G[np.ix_(self._free, self._free)] + self._lam * np.eye(len(self._free))
|
|
64
|
+
self._active = None # which weights sat at 0 or 1 in the last frame solved: where the next solve starts (the answer does not depend on it)
|
|
65
|
+
|
|
66
|
+
def _points(self, f): # frames (n, 118) -> the compared points in the head's frame, flat (n, 3 * (skin + points))
|
|
67
|
+
e = f[:, :100]; R = _rotations(f[:, 103:106]); feat = (R - np.eye(3)).reshape(-1, 9)
|
|
68
|
+
v = self._template[None] + np.einsum("fi,iuc->fuc", e, self._expr) + np.einsum("fp,puc->fuc", feat, self._jaw_dirs)
|
|
69
|
+
J = (self._jaw_joint + e @ self._jaw_joint_expr)[:, None]
|
|
70
|
+
v = v + self._jaw_weight[None, :, None] * (np.einsum("fcd,fud->fuc", R, v - J) + J - v)
|
|
71
|
+
pts = (v[:, self._corners] * self._bary[None, :, :, None]).sum(2) * self._point_weight[None, :, None]
|
|
72
|
+
return np.concatenate([v[:, self._skin].reshape(len(f), -1), pts.reshape(len(f), -1)], 1)
|
|
73
|
+
|
|
74
|
+
def __call__(self, frames):
|
|
75
|
+
"""Frames (n, 118), or one frame (118,) -> weights (n, 51) or (51,), float32."""
|
|
76
|
+
f = np.asarray(frames, np.float64); one = f.ndim == 1; f = f.reshape(-1, 118); out = np.zeros((len(f), len(self.names)), np.float32)
|
|
77
|
+
for i in range(0, len(f), 512):
|
|
78
|
+
out[i:i + 512] = self._solve(f[i:i + 512])
|
|
79
|
+
return out[0] if one else out
|
|
80
|
+
|
|
81
|
+
def _box(self, b, tol=1e-9):
|
|
82
|
+
"""The weights in 0..1 that minimise w.H.w / 2 - b.w, exactly (an active-set solve: the problem has one answer)."""
|
|
83
|
+
H = self._H; n = len(b); w = np.zeros(n); lo = np.ones(n, bool); hi = np.zeros(n, bool)
|
|
84
|
+
if self._active is not None:
|
|
85
|
+
lo, hi = self._active[0].copy(), self._active[1].copy(); w[hi] = 1
|
|
86
|
+
for _ in range(20 * n):
|
|
87
|
+
fr = ~(lo | hi)
|
|
88
|
+
while fr.any(): # the best weights with the bound ones held; walk towards them until none leaves 0..1
|
|
89
|
+
z = w.copy(); z[fr] = np.linalg.solve(H[np.ix_(fr, fr)], b[fr] - H[np.ix_(fr, ~fr)] @ w[~fr])
|
|
90
|
+
out = fr & ((z < -tol) | (z > 1 + tol))
|
|
91
|
+
if not out.any():
|
|
92
|
+
w = z; break
|
|
93
|
+
step = np.where(z[out] < 0, w[out] / np.maximum(w[out] - z[out], 1e-300), (1 - w[out]) / np.maximum(z[out] - w[out], 1e-300)); a = max(0.0, float(step.min()))
|
|
94
|
+
w = w + a * (z - w); hit = np.flatnonzero(out)[step <= a + 1e-12]
|
|
95
|
+
lo[hit[z[hit] < 0]] = True; hi[hit[z[hit] > 1]] = True; w[lo] = 0; w[hi] = 1; fr = ~(lo | hi)
|
|
96
|
+
g = H @ w - b; bad = np.where(lo, -g, np.where(hi, g, 0.0)) # a bound weight that would rather move inward
|
|
97
|
+
k = int(bad.argmax())
|
|
98
|
+
if bad[k] <= 1e-10:
|
|
99
|
+
break
|
|
100
|
+
lo[k] = hi[k] = False
|
|
101
|
+
self._active = (lo, hi)
|
|
102
|
+
return np.clip(w, 0, 1)
|
|
103
|
+
|
|
104
|
+
def _solve(self, f):
|
|
105
|
+
K = len(self.names); jo = self.index["jawOpen"]
|
|
106
|
+
d = self._points(f) - self._rest_points
|
|
107
|
+
wj = np.clip((f[:, 103] - self.rest[103]) / self.jaw, 0, 1); d -= wj[:, None] * self._A[jo] # the jaw's turn is known; the other shapes explain what is left
|
|
108
|
+
b = d @ self._A[self._free].T; w = np.zeros((len(f), K))
|
|
109
|
+
for i in range(len(f)):
|
|
110
|
+
w[i, self._free] = self._box(b[i])
|
|
111
|
+
w[:, jo] = wj
|
|
112
|
+
look = lambda name, x: w.__setitem__((slice(None), self.index[name]), np.clip(x / self.look_range, 0, 1)) # +x is the face's left; turning about +x looks down, about +y towards the face's left
|
|
113
|
+
look("eyeLookDownLeft", f[:, 109]); look("eyeLookUpLeft", -f[:, 109]); look("eyeLookOutLeft", f[:, 110]); look("eyeLookInLeft", -f[:, 110])
|
|
114
|
+
look("eyeLookDownRight", f[:, 112]); look("eyeLookUpRight", -f[:, 112]); look("eyeLookInRight", f[:, 113]); look("eyeLookOutRight", -f[:, 113])
|
|
115
|
+
return w
|
|
Binary file
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
{
|
|
2
|
+
"names": [
|
|
3
|
+
"browDownLeft",
|
|
4
|
+
"browDownRight",
|
|
5
|
+
"browInnerUp",
|
|
6
|
+
"browOuterUpLeft",
|
|
7
|
+
"browOuterUpRight",
|
|
8
|
+
"cheekPuff",
|
|
9
|
+
"cheekSquintLeft",
|
|
10
|
+
"cheekSquintRight",
|
|
11
|
+
"eyeBlinkLeft",
|
|
12
|
+
"eyeBlinkRight",
|
|
13
|
+
"eyeLookDownLeft",
|
|
14
|
+
"eyeLookDownRight",
|
|
15
|
+
"eyeLookInLeft",
|
|
16
|
+
"eyeLookInRight",
|
|
17
|
+
"eyeLookOutLeft",
|
|
18
|
+
"eyeLookOutRight",
|
|
19
|
+
"eyeLookUpLeft",
|
|
20
|
+
"eyeLookUpRight",
|
|
21
|
+
"eyeSquintLeft",
|
|
22
|
+
"eyeSquintRight",
|
|
23
|
+
"eyeWideLeft",
|
|
24
|
+
"eyeWideRight",
|
|
25
|
+
"jawForward",
|
|
26
|
+
"jawLeft",
|
|
27
|
+
"jawOpen",
|
|
28
|
+
"jawRight",
|
|
29
|
+
"mouthClose",
|
|
30
|
+
"mouthDimpleLeft",
|
|
31
|
+
"mouthDimpleRight",
|
|
32
|
+
"mouthFrownLeft",
|
|
33
|
+
"mouthFrownRight",
|
|
34
|
+
"mouthFunnel",
|
|
35
|
+
"mouthLeft",
|
|
36
|
+
"mouthLowerDownLeft",
|
|
37
|
+
"mouthLowerDownRight",
|
|
38
|
+
"mouthPressLeft",
|
|
39
|
+
"mouthPressRight",
|
|
40
|
+
"mouthPucker",
|
|
41
|
+
"mouthRight",
|
|
42
|
+
"mouthRollLower",
|
|
43
|
+
"mouthRollUpper",
|
|
44
|
+
"mouthShrugLower",
|
|
45
|
+
"mouthShrugUpper",
|
|
46
|
+
"mouthSmileLeft",
|
|
47
|
+
"mouthSmileRight",
|
|
48
|
+
"mouthStretchLeft",
|
|
49
|
+
"mouthStretchRight",
|
|
50
|
+
"mouthUpperUpLeft",
|
|
51
|
+
"mouthUpperUpRight",
|
|
52
|
+
"noseSneerLeft",
|
|
53
|
+
"noseSneerRight"
|
|
54
|
+
],
|
|
55
|
+
"arrays": {
|
|
56
|
+
"template": {
|
|
57
|
+
"offset": 0,
|
|
58
|
+
"shape": [
|
|
59
|
+
668,
|
|
60
|
+
3
|
|
61
|
+
],
|
|
62
|
+
"dtype": "float32"
|
|
63
|
+
},
|
|
64
|
+
"expr": {
|
|
65
|
+
"offset": 8016,
|
|
66
|
+
"shape": [
|
|
67
|
+
100,
|
|
68
|
+
668,
|
|
69
|
+
3
|
|
70
|
+
],
|
|
71
|
+
"dtype": "float32"
|
|
72
|
+
},
|
|
73
|
+
"jaw_dirs": {
|
|
74
|
+
"offset": 809616,
|
|
75
|
+
"shape": [
|
|
76
|
+
9,
|
|
77
|
+
668,
|
|
78
|
+
3
|
|
79
|
+
],
|
|
80
|
+
"dtype": "float32"
|
|
81
|
+
},
|
|
82
|
+
"jaw_weight": {
|
|
83
|
+
"offset": 881760,
|
|
84
|
+
"shape": [
|
|
85
|
+
668
|
|
86
|
+
],
|
|
87
|
+
"dtype": "float32"
|
|
88
|
+
},
|
|
89
|
+
"jaw_joint": {
|
|
90
|
+
"offset": 884432,
|
|
91
|
+
"shape": [
|
|
92
|
+
3
|
|
93
|
+
],
|
|
94
|
+
"dtype": "float32"
|
|
95
|
+
},
|
|
96
|
+
"jaw_joint_expr": {
|
|
97
|
+
"offset": 884444,
|
|
98
|
+
"shape": [
|
|
99
|
+
100,
|
|
100
|
+
3
|
|
101
|
+
],
|
|
102
|
+
"dtype": "float32"
|
|
103
|
+
},
|
|
104
|
+
"skin": {
|
|
105
|
+
"offset": 885644,
|
|
106
|
+
"shape": [
|
|
107
|
+
448
|
|
108
|
+
],
|
|
109
|
+
"dtype": "uint32"
|
|
110
|
+
},
|
|
111
|
+
"corners": {
|
|
112
|
+
"offset": 887436,
|
|
113
|
+
"shape": [
|
|
114
|
+
118,
|
|
115
|
+
3
|
|
116
|
+
],
|
|
117
|
+
"dtype": "uint32"
|
|
118
|
+
},
|
|
119
|
+
"bary": {
|
|
120
|
+
"offset": 888852,
|
|
121
|
+
"shape": [
|
|
122
|
+
118,
|
|
123
|
+
3
|
|
124
|
+
],
|
|
125
|
+
"dtype": "float32"
|
|
126
|
+
},
|
|
127
|
+
"point_weight": {
|
|
128
|
+
"offset": 890268,
|
|
129
|
+
"shape": [
|
|
130
|
+
118
|
|
131
|
+
],
|
|
132
|
+
"dtype": "float32"
|
|
133
|
+
},
|
|
134
|
+
"shapes": {
|
|
135
|
+
"offset": 890740,
|
|
136
|
+
"shape": [
|
|
137
|
+
51,
|
|
138
|
+
1698
|
|
139
|
+
],
|
|
140
|
+
"dtype": "float32"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"rest": {
|
|
144
|
+
"tiny": [
|
|
145
|
+
0.45259,
|
|
146
|
+
-0.02098,
|
|
147
|
+
-0.22742,
|
|
148
|
+
0.17248,
|
|
149
|
+
0.3608,
|
|
150
|
+
-0.51408,
|
|
151
|
+
0.0217,
|
|
152
|
+
-0.03521,
|
|
153
|
+
-0.11072,
|
|
154
|
+
0.87567,
|
|
155
|
+
-1.28384,
|
|
156
|
+
0.61675,
|
|
157
|
+
-0.3471,
|
|
158
|
+
1.02806,
|
|
159
|
+
-0.40646,
|
|
160
|
+
0.69855,
|
|
161
|
+
0.64896,
|
|
162
|
+
0.21786,
|
|
163
|
+
0.04919,
|
|
164
|
+
-0.00741,
|
|
165
|
+
-0.67008,
|
|
166
|
+
0.11497,
|
|
167
|
+
0.52011,
|
|
168
|
+
0.45941,
|
|
169
|
+
0.12752,
|
|
170
|
+
0.85936,
|
|
171
|
+
1.24025,
|
|
172
|
+
-0.38405,
|
|
173
|
+
-0.64078,
|
|
174
|
+
-0.02412,
|
|
175
|
+
-0.76362,
|
|
176
|
+
-0.37403,
|
|
177
|
+
-1.123,
|
|
178
|
+
0.61108,
|
|
179
|
+
-0.24201,
|
|
180
|
+
0.04504,
|
|
181
|
+
1.44962,
|
|
182
|
+
-1.60558,
|
|
183
|
+
0.67763,
|
|
184
|
+
0.42354,
|
|
185
|
+
0.34896,
|
|
186
|
+
1.13903,
|
|
187
|
+
-1.22589,
|
|
188
|
+
0.03255,
|
|
189
|
+
-0.19868,
|
|
190
|
+
-0.37672,
|
|
191
|
+
-0.0279,
|
|
192
|
+
0.02104,
|
|
193
|
+
-0.18995,
|
|
194
|
+
-0.1928,
|
|
195
|
+
0.23231,
|
|
196
|
+
-0.23752,
|
|
197
|
+
0.37834,
|
|
198
|
+
-1.20781,
|
|
199
|
+
0.09335,
|
|
200
|
+
-0.24226,
|
|
201
|
+
-0.39575,
|
|
202
|
+
0.43179,
|
|
203
|
+
0.73569,
|
|
204
|
+
0.4771,
|
|
205
|
+
-0.46013,
|
|
206
|
+
0.01389,
|
|
207
|
+
0.05798,
|
|
208
|
+
0.37155,
|
|
209
|
+
0.82573,
|
|
210
|
+
1.06948,
|
|
211
|
+
-0.4711,
|
|
212
|
+
0.64633,
|
|
213
|
+
-0.04792,
|
|
214
|
+
-0.71998,
|
|
215
|
+
-0.04792,
|
|
216
|
+
1.04927,
|
|
217
|
+
0.21395,
|
|
218
|
+
0.35322,
|
|
219
|
+
0.52033,
|
|
220
|
+
-1.18408,
|
|
221
|
+
-0.5438,
|
|
222
|
+
0.9952,
|
|
223
|
+
-0.74792,
|
|
224
|
+
-0.61674,
|
|
225
|
+
0.18897,
|
|
226
|
+
0.91177,
|
|
227
|
+
-0.97492,
|
|
228
|
+
-0.03709,
|
|
229
|
+
0.92264,
|
|
230
|
+
0.19107,
|
|
231
|
+
0.30349,
|
|
232
|
+
-0.31456,
|
|
233
|
+
0.19284,
|
|
234
|
+
-0.3921,
|
|
235
|
+
0.64609,
|
|
236
|
+
-0.9285,
|
|
237
|
+
0.29556,
|
|
238
|
+
0.35421,
|
|
239
|
+
-0.47069,
|
|
240
|
+
-0.1196,
|
|
241
|
+
0.54817,
|
|
242
|
+
-0.41524,
|
|
243
|
+
0.48111,
|
|
244
|
+
-1.13253,
|
|
245
|
+
0.0,
|
|
246
|
+
0.0,
|
|
247
|
+
0.0,
|
|
248
|
+
0.01222,
|
|
249
|
+
0.00464,
|
|
250
|
+
-0.00072,
|
|
251
|
+
0.0,
|
|
252
|
+
0.0,
|
|
253
|
+
0.0,
|
|
254
|
+
0.0,
|
|
255
|
+
0.0,
|
|
256
|
+
0.0,
|
|
257
|
+
0.0,
|
|
258
|
+
0.0,
|
|
259
|
+
0.0,
|
|
260
|
+
0.0,
|
|
261
|
+
0.0,
|
|
262
|
+
0.0
|
|
263
|
+
],
|
|
264
|
+
"nano": [
|
|
265
|
+
0.4138,
|
|
266
|
+
0.33489,
|
|
267
|
+
-0.3368,
|
|
268
|
+
0.09675,
|
|
269
|
+
0.00607,
|
|
270
|
+
-0.55695,
|
|
271
|
+
-0.37703,
|
|
272
|
+
0.01843,
|
|
273
|
+
-0.02044,
|
|
274
|
+
0.86619,
|
|
275
|
+
-0.97922,
|
|
276
|
+
0.45282,
|
|
277
|
+
-0.68631,
|
|
278
|
+
1.28287,
|
|
279
|
+
-0.13649,
|
|
280
|
+
0.45017,
|
|
281
|
+
0.94643,
|
|
282
|
+
0.64615,
|
|
283
|
+
0.45883,
|
|
284
|
+
-0.33155,
|
|
285
|
+
-0.61549,
|
|
286
|
+
-0.33136,
|
|
287
|
+
1.35277,
|
|
288
|
+
1.36587,
|
|
289
|
+
-0.10786,
|
|
290
|
+
0.46177,
|
|
291
|
+
1.25608,
|
|
292
|
+
-0.88247,
|
|
293
|
+
-0.86653,
|
|
294
|
+
0.45006,
|
|
295
|
+
-0.33583,
|
|
296
|
+
0.01077,
|
|
297
|
+
-0.80284,
|
|
298
|
+
0.45997,
|
|
299
|
+
0.21943,
|
|
300
|
+
-0.07291,
|
|
301
|
+
1.24197,
|
|
302
|
+
-0.96254,
|
|
303
|
+
0.63517,
|
|
304
|
+
0.70392,
|
|
305
|
+
0.13618,
|
|
306
|
+
0.93516,
|
|
307
|
+
-0.89464,
|
|
308
|
+
0.11208,
|
|
309
|
+
0.02111,
|
|
310
|
+
0.01218,
|
|
311
|
+
-0.1093,
|
|
312
|
+
-0.26935,
|
|
313
|
+
-0.08945,
|
|
314
|
+
-0.21824,
|
|
315
|
+
-0.02019,
|
|
316
|
+
-0.70579,
|
|
317
|
+
1.35447,
|
|
318
|
+
-0.26872,
|
|
319
|
+
-0.02716,
|
|
320
|
+
-0.10547,
|
|
321
|
+
0.18593,
|
|
322
|
+
-0.59771,
|
|
323
|
+
0.91076,
|
|
324
|
+
0.60052,
|
|
325
|
+
-0.2243,
|
|
326
|
+
0.56634,
|
|
327
|
+
-0.53009,
|
|
328
|
+
0.58586,
|
|
329
|
+
0.67672,
|
|
330
|
+
1.48208,
|
|
331
|
+
-0.96631,
|
|
332
|
+
1.3783,
|
|
333
|
+
-0.37744,
|
|
334
|
+
-1.2175,
|
|
335
|
+
0.28821,
|
|
336
|
+
2.25358,
|
|
337
|
+
0.52892,
|
|
338
|
+
0.32943,
|
|
339
|
+
0.38256,
|
|
340
|
+
-0.33527,
|
|
341
|
+
-1.20599,
|
|
342
|
+
0.76937,
|
|
343
|
+
-1.01569,
|
|
344
|
+
-0.73589,
|
|
345
|
+
-0.85044,
|
|
346
|
+
0.37135,
|
|
347
|
+
-1.96905,
|
|
348
|
+
0.92213,
|
|
349
|
+
0.74648,
|
|
350
|
+
0.35459,
|
|
351
|
+
-0.24638,
|
|
352
|
+
-0.78414,
|
|
353
|
+
0.66994,
|
|
354
|
+
-1.06629,
|
|
355
|
+
1.11468,
|
|
356
|
+
-0.76202,
|
|
357
|
+
-0.1096,
|
|
358
|
+
0.77591,
|
|
359
|
+
-0.9625,
|
|
360
|
+
0.36305,
|
|
361
|
+
0.68262,
|
|
362
|
+
-0.56101,
|
|
363
|
+
0.9727,
|
|
364
|
+
-1.04824,
|
|
365
|
+
0.0,
|
|
366
|
+
0.0,
|
|
367
|
+
0.0,
|
|
368
|
+
0.01061,
|
|
369
|
+
0.01184,
|
|
370
|
+
-0.01487,
|
|
371
|
+
0.0,
|
|
372
|
+
0.0,
|
|
373
|
+
0.0,
|
|
374
|
+
0.0,
|
|
375
|
+
0.0,
|
|
376
|
+
0.0,
|
|
377
|
+
0.0,
|
|
378
|
+
0.0,
|
|
379
|
+
0.0,
|
|
380
|
+
0.0,
|
|
381
|
+
0.0,
|
|
382
|
+
0.0
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
"vertices": 668,
|
|
386
|
+
"skin": 448,
|
|
387
|
+
"points": 118
|
|
388
|
+
}
|
|
Binary file
|