Spaces:
Running
on
Zero
Running
on
Zero
Update src/pixel3dmm/tracking/flame/FLAME.py
Browse files
src/pixel3dmm/tracking/flame/FLAME.py
CHANGED
@@ -17,6 +17,7 @@
|
|
17 |
import os
|
18 |
import pickle
|
19 |
from huggingface_hub import hf_hub_download
|
|
|
20 |
|
21 |
import numpy as np
|
22 |
# Modified from smplx code for FLAME
|
@@ -68,13 +69,7 @@ class FLAME(nn.Module):
|
|
68 |
def __init__(self, config):
|
69 |
super(FLAME, self).__init__()
|
70 |
|
71 |
-
|
72 |
-
repo_id="alexnasa/pixel3dmm",
|
73 |
-
filename="FLAME/generic_model.pkl",
|
74 |
-
repo_type="model",
|
75 |
-
)
|
76 |
-
|
77 |
-
with open(local_path, 'rb') as f:
|
78 |
ss = pickle.load(f, encoding='latin1')
|
79 |
flame_model = Struct(**ss)
|
80 |
|
|
|
17 |
import os
|
18 |
import pickle
|
19 |
from huggingface_hub import hf_hub_download
|
20 |
+
from pixel3dmm import env_paths
|
21 |
|
22 |
import numpy as np
|
23 |
# Modified from smplx code for FLAME
|
|
|
69 |
def __init__(self, config):
|
70 |
super(FLAME, self).__init__()
|
71 |
|
72 |
+
with open(f'{env_paths.FLAME_ASSETS}', 'rb') as f:
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
ss = pickle.load(f, encoding='latin1')
|
74 |
flame_model = Struct(**ss)
|
75 |
|