diddone commited on
Commit
ff2143a
·
verified ·
1 Parent(s): e4564c0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +6 -3
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
- ```bash
44
- # Download model_final.pth from Hugging Face Hub
45
- # Place it in the repository root
 
 
 
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
  ```