add example for loading the models
#4
by Lexiyutou - opened
README.md
CHANGED
|
@@ -18,11 +18,26 @@ Please see **paper link** for details.
|
|
| 18 |
|
| 19 |
```python
|
| 20 |
from pathlib import Path
|
| 21 |
-
from
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.
|