Instructions to use XXXpilar/Fastfill-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use XXXpilar/Fastfill-test with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Download code/fastfill/adapters/internscenes_mp3d.py from XXXpilar/Fastfill-test: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/XXXpilar/Fastfill-test/resolve/main/code/fastfill/adapters/internscenes_mp3d.py
- Command line
-
hf download hf://XXXpilar/Fastfill-test/code/fastfill/adapters/internscenes_mp3d.py
-
curl -L -o internscenes_mp3d.py https://huggingface.co/XXXpilar/Fastfill-test/resolve/main/code/fastfill/adapters/internscenes_mp3d.py
1.25 kB
| """InternScenes Real2Sim re-layout of Matterport3D regions (conventions: see internscenes.py). | |
| One record = one Matterport region (a room-level unit). Group = mp3d:<house hash>. | |
| InternScenes ships 96 regions twice within a house (e.g. 1LXtFkjw3qL region2 == region29: identical boundary, | |
| same object ids/categories, boxes within 1 cm); only the first copy is emitted (1696 -> 1600 records).""" | |
| import numpy as np | |
| from fastfill.adapters.internscenes import load_real | |
| SOURCE = "InternScenes_mp3d" | |
| def load(root): | |
| seen = {} | |
| for ir in load_real(root, "matterport3d_exported.json", SOURCE, | |
| lambda s: "mp3d:" + s["source_layout"].split("/")[2], | |
| lambda s: {"region": s["source_scene_name"]}): | |
| key = (ir["group"], tuple((o["id"].rsplit(":", 1)[1], o["category"]) for o in ir["objects"])) | |
| arr = np.array([o["size"] + o["pos"] for o in ir["objects"]], dtype=float) | |
| bnd = np.array(ir["boundary"], dtype=float) | |
| if any(b.shape == bnd.shape and a.shape == arr.shape and np.allclose(b, bnd, atol=0.01) | |
| and np.allclose(a, arr, atol=0.01) for a, b in seen.get(key, [])): | |
| continue | |
| seen.setdefault(key, []).append((arr, bnd)) | |
| yield ir | |