lipeize's picture
Upload README.md with huggingface_hub
dd6b229 verified
|
Raw History Blame Contribute Delete
3.49 kB
---
tags:
- graspnet
- dexnet
- grasp-detection
- private-transfer-artifact
- not-for-redistribution
license: other
license_name: graspnet-1billion-research
---
# GraspNet `dex_models` — rebuilt for the vendored toolkit
**Do not redistribute.** This repository is a private machine-to-machine transfer
artifact. Its contents are **derived from GraspNet-1Billion** (object meshes +
SDFs), which is licensed for research use. The repository is private and must
stay private.
## Why this exists
The `dex_models/*.pkl` shipped in the upstream GraspNet distribution were pickled
by the pip **`graspnetAPI`** package against an **older trimesh**. Loading them in
an environment with `trimesh==4.4.9` — the version this project's
`requirements.txt` pins — fails:
```
File graspformer/data/graspnet_api/graspnet_eval.py:88, in get_scene_models_dict
dexmodel = pickle.load(f)
AttributeError: 'DataStore' object has no attribute 'fast_hash'
```
`trimesh.caching.DataStore` no longer has `fast_hash` (only `__hash__`), so the
unpickle dies mid-reconstruction. Because `get_scene_models_dict` is called by the
validation harness, this kills a **training run at its first validation** rather
than at startup — with `val_check_interval: 1600` batches and
`accumulate_grad_batches: 16`, that is exactly optimizer step 99.
These caches are re-pickled in a current environment so they load cleanly.
## How they were produced
For each object id, the toolkit's own no-cache path was used and the result
re-pickled — i.e. exactly the object `graspnet_eval.py` would have built had the
cache been absent:
```python
from graspformer.data.graspnet_api.utils.eval_utils import load_dexnet_model
m = load_dexnet_model(f"{GRASPNET_ROOT}/models/{obj_id:03d}/textured")
pickle.dump(m, open(f"dex_models/{obj_id:03d}.pkl", "wb"))
```
**No project code was modified.** The consuming code path
(`if os.path.exists(dex_cache_path): pickle.load(...) else: load_dexnet_model(...)`)
is untouched; only the cache content changed.
Equivalence was verified on a round-trip: `sdf.data` and `mesh.vertices` are
`np.array_equal` to the freshly-built object. File sizes differ from upstream by
~1 KB (pickle metadata), not content — e.g. `000.pkl` is 190,866,344 bytes here
vs 190,867,452 upstream.
## Build environment
| | |
|---|---|
| python | 3.11.15 |
| trimesh | 4.4.9 |
| numpy | 1.26.4 |
| autolab-core | 1.1.1 |
| open3d | 0.19.0 |
| built on | `sruk-wsc-2513` (RTX PRO 6000 Blackwell) |
Rebuild cost is ~4 s per object (88 objects, 6 workers); a rebuilt cache reloads
in ~0.07 s, versus ~4 s for the uncached `load_dexnet_model` path.
## Contents
| File | Contents |
|---|---|
| `dex_models.tar.zst` | the `dex_models/` directory — 88 `NNN.pkl` (`GraspableObject3D`), members stored as `dex_models/NNN.pkl` |
| `manifest.json` | per-file byte size + sha256, plus the archive's own sha256 |
## Usage
```bash
hf download lipeize/graspnet-dex-models-rebuilt dex_models.tar.zst --local-dir /tmp/dex
tar -I zstd -xf /tmp/dex/dex_models.tar.zst -C "$GRASPNET_ROOT" # -> $GRASPNET_ROOT/dex_models/
```
The validation harness picks them up automatically — `graspnet_eval.py` looks for
`$GRASPNET_ROOT/dex_models/%03d.pkl`.
> **Note.** If a box has *no* `dex_models/` directory at all, the toolkit silently
> falls back to `load_dexnet_model` and works correctly, just ~4 s per object
> instead of ~0.07 s. The upstream caches are only a problem when present *and*
> unreadable.