Lexiyutou commited on
Commit
19121a2
·
verified ·
1 Parent(s): bbffbb3

add example for loading the models

Browse files
Files changed (1) hide show
  1. README.md +20 -5
README.md CHANGED
@@ -18,11 +18,26 @@ Please see **paper link** for details.
18
 
19
  ```python
20
  from pathlib import Path
21
- from dlclibrary import download_huggingface_model
22
- # Creates a folder and downloads the model to it
23
- model_dir = Path("./prima_animal_model_pytorch")
24
- model_dir.mkdir()
25
- download_huggingface_model("prima_animal_model_pytorch", model_dir)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  ```
27
  ## Intended Use
28
  • Intended to be used for shape and pose estimation of quadruped images taken from a single view.
 
18
 
19
  ```python
20
  from pathlib import Path
21
+ from huggingface_hub import hf_hub_download
22
+
23
+ repo_id = "MLAdaptiveIntelligence/PRIMA"
24
+
25
+ model_dir = Path("./prima_model")
26
+ model_dir.mkdir(parents=True, exist_ok=True)
27
+
28
+ # download stage-1 checkpoint
29
+ s1_path = hf_hub_download(
30
+ repo_id=repo_id,
31
+ filename="s1ckpt.ckpt",
32
+ local_dir=model_dir
33
+ )
34
+
35
+ # donwload stage-3 checkpoint
36
+ s3_path = hf_hub_download(
37
+ repo_id=repo_id,
38
+ filename="s3ckpt.ckpt",
39
+ local_dir=model_dir
40
+ )
41
  ```
42
  ## Intended Use
43
  • Intended to be used for shape and pose estimation of quadruped images taken from a single view.