Datasets:
Download load_example.py from lipeize/graspnet-infinite-objects: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/datasets/lipeize/graspnet-infinite-objects/resolve/main/load_example.py
- Command line
-
hf download hf://datasets/lipeize/graspnet-infinite-objects/load_example.py
-
curl -L -o load_example.py https://huggingface.co/datasets/lipeize/graspnet-infinite-objects/resolve/main/load_example.py
474 Bytes
| """Load a few objects, scale them to metres and print their extents. Run after unzipping objects/*.zip into this folder.""" | |
| import csv, itertools, trimesh | |
| for rec in itertools.islice(csv.DictReader(open("manifest.csv")), 5): | |
| m = trimesh.load(rec["file"], force="mesh") | |
| m.apply_scale(float(rec["scale_to_metres"])) | |
| print(rec["lvis_category"], rec["uid"], "extent m:", [round(float(e), 3) for e in m.extents], "faces", len(m.faces), "watertight", m.is_watertight) | |