alexnasa commited on
Commit
b718883
·
verified ·
1 Parent(s): 88f70d7

Update src/pixel3dmm/env_paths.py

Browse files
Files changed (1) hide show
  1. src/pixel3dmm/env_paths.py +24 -1
src/pixel3dmm/env_paths.py CHANGED
@@ -1,7 +1,7 @@
1
  import json
2
  from pathlib import Path
3
  from environs import Env
4
-
5
 
6
  env = Env(expand_vars=True)
7
  env_file_path = Path(f"{Path.home()}/.config/pixel3dmm/.env")
@@ -14,6 +14,29 @@ with env.prefixed("PIXEL3DMM_"):
14
  PREPROCESSED_DATA = env("PREPROCESSED_DATA")
15
  TRACKING_OUTPUT = env("TRACKING_OUTPUT")
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  head_template = f'{CODE_BASE}/assets/head_template.obj'
19
  head_template_color = f'{CODE_BASE}/assets/head_template_color.obj'
 
1
  import json
2
  from pathlib import Path
3
  from environs import Env
4
+ from huggingface_hub import hf_hub_download
5
 
6
  env = Env(expand_vars=True)
7
  env_file_path = Path(f"{Path.home()}/.config/pixel3dmm/.env")
 
14
  PREPROCESSED_DATA = env("PREPROCESSED_DATA")
15
  TRACKING_OUTPUT = env("TRACKING_OUTPUT")
16
 
17
+ flame_local_path = hf_hub_download(
18
+ repo_id="alexnasa/pixel3dmm",
19
+ filename="FLAME/generic_model.pkl",
20
+ repo_type="model",
21
+ )
22
+
23
+ pipnet_local_path = hf_hub_download(
24
+ repo_id="alexnasa/pixel3dmm",
25
+ filename="PIPNet/epoch59.pth",
26
+ repo_type="model",
27
+ )
28
+
29
+ normals_model_local_path = hf_hub_download(
30
+ repo_id="alexnasa/pixel3dmm",
31
+ filename="FLAME/normals.ckpt",
32
+ repo_type="pretrained_weights",
33
+ )
34
+
35
+ uv_map_local_path = hf_hub_download(
36
+ repo_id="alexnasa/pixel3dmm",
37
+ filename="FLAME/uv.ckpt",
38
+ repo_type="pretrained_weights",
39
+ )
40
 
41
  head_template = f'{CODE_BASE}/assets/head_template.obj'
42
  head_template_color = f'{CODE_BASE}/assets/head_template_color.obj'