cfahlgren1 HF Staff commited on
Commit
206b126
·
verified ·
1 Parent(s): b509836

[dataset viewer]: decode the draco glbs so the models subset renders

Browse files

Hi! 204 of the 235 GLBs in `models` use Draco mesh compression, which the Dataset Viewer can't decode, so the default subset currently shows "The dataset viewer is not available for this split". This stores those GLBs with their geometry decoded, keeping every other extension, column and row, and updates the README where it promises byte-for-byte originals, since `sha256` and `size_bytes` still describe NASA's file. Up to you whether you want it!

Preview: https://huggingface.co/datasets/cfahlgren1/nasa-3d-resources

| Before | After |
|---|---|
| ![](https://huggingface.co/proxy/cdn-uploads.huggingface.co/production/uploads/648a374f00f7a3374ee64b99/zSi6jlkYnOiP9RlbFdnXu.png) | ![](https://huggingface.co/proxy/cdn-uploads.huggingface.co/production/uploads/648a374f00f7a3374ee64b99/68IIs28nHbnUZlFvraEL4.png) |

Files changed (2) hide show
  1. README.md +6 -4
  2. models/train-00000-of-00001.parquet +2 -2
README.md CHANGED
@@ -64,7 +64,8 @@ and planetary texture maps produced across NASA centers.
64
  > Every excluded file is listed with its reason in [`meta/excluded.jsonl`](./meta/excluded.jsonl).
65
 
66
  Apart from the exclusions above, this mirror changes only the packaging. Files are grouped into
67
- typed Parquet shards and **every original file is preserved byte-for-byte**: GLB and STL files use the native
 
68
  `datasets` `Mesh()` feature, previews and texture maps use `Image()`, and every other
69
  original file (Blender, 3DS, LightWave, FBX, zip and 7z archives, print guides) is kept
70
  verbatim in the `source_files` config.
@@ -87,7 +88,7 @@ from datasets import load_dataset
87
  ds = load_dataset("suvadityamuk/nasa-3d-resources", split="train") # models
88
  row = ds[0]
89
  row["title"], row["contributors"]
90
- scene = row["mesh"] # trimesh.Scene (pip install trimesh DracoPy)
91
  row["preview"] # PIL.Image
92
 
93
  stl = load_dataset("suvadityamuk/nasa-3d-resources", "printables", split="train", streaming=True)
@@ -96,8 +97,9 @@ stl = load_dataset("suvadityamuk/nasa-3d-resources", "printables", split="train"
96
  For the raw file bytes use `ds.cast_column("mesh", Mesh(decode=False))`, which yields
97
  `{"bytes": <original file bytes>, "path": <file name>}`.
98
 
99
- Some GLBs use Draco mesh compression (`draco_compressed = true`). Install `DracoPy` alongside `trimesh`
100
- (`pip install trimesh DracoPy`); without it trimesh decodes Draco geometry as placeholder zeros.
 
101
 
102
  ## Provenance and joins
103
 
 
64
  > Every excluded file is listed with its reason in [`meta/excluded.jsonl`](./meta/excluded.jsonl).
65
 
66
  Apart from the exclusions above, this mirror changes only the packaging. Files are grouped into
67
+ typed Parquet shards and **every original file is preserved byte-for-byte**, except that Draco-compressed GLBs are
68
+ stored decoded (see below): GLB and STL files use the native
69
  `datasets` `Mesh()` feature, previews and texture maps use `Image()`, and every other
70
  original file (Blender, 3DS, LightWave, FBX, zip and 7z archives, print guides) is kept
71
  verbatim in the `source_files` config.
 
88
  ds = load_dataset("suvadityamuk/nasa-3d-resources", split="train") # models
89
  row = ds[0]
90
  row["title"], row["contributors"]
91
+ scene = row["mesh"] # trimesh.Scene (pip install trimesh)
92
  row["preview"] # PIL.Image
93
 
94
  stl = load_dataset("suvadityamuk/nasa-3d-resources", "printables", split="train", streaming=True)
 
97
  For the raw file bytes use `ds.cast_column("mesh", Mesh(decode=False))`, which yields
98
  `{"bytes": <original file bytes>, "path": <file name>}`.
99
 
100
+ The 204 GLBs that NASA ships with Draco mesh compression (`draco_compressed = true`) are stored with their
101
+ geometry decoded, so they load with plain `trimesh` and render in the Dataset Viewer. Their `sha256` and
102
+ `size_bytes` still describe NASA's original file.
103
 
104
  ## Provenance and joins
105
 
models/train-00000-of-00001.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f88c15b07031fa8677aec1445dc0b3674fc9778a6388597ec89726954174e6c6
3
- size 515481046
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e037688984a89c515db91897b47cd50850286d9b2d93610ffe4061b6d34090eb
3
+ size 976654071