Upload folder using huggingface_hub
Browse files- README.md +8 -5
- affordance/config.json +3 -1
README.md
CHANGED
|
@@ -40,10 +40,13 @@ Input format — see `examples/reconstruction.py` in the repo.
|
|
| 40 |
## Affordance grounding
|
| 41 |
|
| 42 |
```python
|
| 43 |
-
from affostruction
|
| 44 |
|
| 45 |
-
pipeline =
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
#
|
|
|
|
| 49 |
```
|
|
|
|
|
|
|
|
|
| 40 |
## Affordance grounding
|
| 41 |
|
| 42 |
```python
|
| 43 |
+
from affostruction import AffostructionPipeline
|
| 44 |
|
| 45 |
+
pipeline = AffostructionPipeline.from_pretrained("chrockey/Affostruction").cuda()
|
| 46 |
+
outputs = pipeline.run(input_dict, queries=["grasp"])
|
| 47 |
+
mesh = outputs["mesh"][0]
|
| 48 |
+
coords = outputs["coords"] # (N, 4) sparse voxel coords
|
| 49 |
+
probs = outputs["affordance"][0]["probs"] # (N,) per-voxel heatmap
|
| 50 |
```
|
| 51 |
+
|
| 52 |
+
See ``examples/affordance.py`` in the repo for an end-to-end smoke test.
|
affordance/config.json
CHANGED
|
@@ -20,5 +20,7 @@
|
|
| 20 |
"use_fp16": true
|
| 21 |
}
|
| 22 |
},
|
| 23 |
-
"text_cond_model": "openai/clip-vit-large-patch14"
|
|
|
|
|
|
|
| 24 |
}
|
|
|
|
| 20 |
"use_fp16": true
|
| 21 |
}
|
| 22 |
},
|
| 23 |
+
"text_cond_model": "openai/clip-vit-large-patch14",
|
| 24 |
+
"sigma_min": 1e-05,
|
| 25 |
+
"noise_scale": 5.0
|
| 26 |
}
|