alexnasa commited on
Commit
1cf0c44
·
verified ·
1 Parent(s): df06c55

Update src/pixel3dmm/tracking/flame/FLAME.py

Browse files
src/pixel3dmm/tracking/flame/FLAME.py CHANGED
@@ -66,7 +66,14 @@ class FLAME(nn.Module):
66
 
67
  def __init__(self, config):
68
  super(FLAME, self).__init__()
69
- with open(f'{env_paths.FLAME_ASSETS}/FLAME2020/generic_model.pkl', 'rb') as f:
 
 
 
 
 
 
 
70
  ss = pickle.load(f, encoding='latin1')
71
  flame_model = Struct(**ss)
72
 
 
66
 
67
  def __init__(self, config):
68
  super(FLAME, self).__init__()
69
+
70
+ local_path = hf_hub_download(
71
+ repo_id="alexnasa/pixel3dmm",
72
+ filename="FLAME/generic_model.pkl",
73
+ repo_type="model",
74
+ )
75
+
76
+ with open(local_path, 'rb') as f:
77
  ss = pickle.load(f, encoding='latin1')
78
  flame_model = Struct(**ss)
79