chrockey commited on
Commit
ded836d
·
verified ·
1 Parent(s): 7b2438b

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +8 -5
  2. 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.pipeline import AffordancePipeline
44
 
45
- pipeline = AffordancePipeline.from_pretrained("chrockey/Affostruction")
46
- # NOTE: pipeline.run() is not yet wired in the release package.
47
- # Downloads + parses the checkpoint; full inference requires ElasticSLatFlowModel
48
- # to be registered in affostruction/models/.
 
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
  }