Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -40,7 +40,10 @@ DenseMarks predicts per-pixel positions in canonical space (cube [0, 1]³) from
|
|
| 40 |
```
|
| 41 |
|
| 42 |
5. **Download model weights from Hugging Face:**
|
| 43 |
-
```
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
| 46 |
```
|
|
|
|
| 40 |
```
|
| 41 |
|
| 42 |
5. **Download model weights from Hugging Face:**
|
| 43 |
+
```python3
|
| 44 |
+
from dense_marks_model import DenseMarksModel, read_image
|
| 45 |
+
from huggingface_hub import hf_hub_download
|
| 46 |
+
model = DenseMarksModel(hf_hub_download("diddone/densemarks", "model.safetensors"))
|
| 47 |
+
images = read_image("assets/00000.png") # rgb, 512x512
|
| 48 |
+
uvw = model(images) # Predict UVW coordinates
|
| 49 |
```
|