Spaces:
Running on CPU Upgrade
Download README.md from Sandflow/sand3d-explorer: direct link, hf CLI and curl.
- Browser
- Download file 4 kB
-
https://huggingface.co/spaces/Sandflow/sand3d-explorer/resolve/main/README.md
- Command line
-
hf download hf://spaces/Sandflow/sand3d-explorer/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Sandflow/sand3d-explorer/resolve/main/README.md
title: Sand3D Explorer
colorFrom: gray
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
short_description: 3D objects, each with the Python program that builds it
Sand3D Explorer
Browse Sand3D, Sandflow's open dataset of 3D objects written as code: every object comes with the short sand3d program that builds it. Filter by dataset, family or joints, search by words or by look, read and copy a program, and open the object in 3D where a GLB was built for it.
The programs are run under sand3d in a fresh process. Reconstructed objects are checked against their source geometry. Nature assets are scored against their original prompt.
How it runs
A FastAPI process serves one static page and a JSON API, on the free CPU tier. At start it
downloads the datasets listed in config.json, keeps their metadata and programs in memory
and packs the grid images into one file on disk. It then reads
Sandflow/sand3d-explorer-assets: one GLB per object for a varied sample, and one image
embedding per render. A text query is encoded on CPU by the same open image-text model the
renders were embedded with.
Nature dataset
Sandflow/sand3d-nature uses one row per asset in data/nature/train-*.parquet and
data/nature/validation-*.parquet. Paths are relative to the repository root.
| Fields | Values |
|---|---|
id |
Globally unique, URL-safe object id, also used by the GLB manifest |
asset_id |
nature:<original prompt id>, used to match the published geometry |
source, source_group, family, split |
nature for both source fields, taxonomy family, train or val |
prompt, domain, subject, style |
Original prompt and taxonomy strings |
semantic_score, triangles |
Score in [0, 1], integer triangle count |
sand3d_version, license, n_joints |
1.7.0, CC-BY-4.0, zero |
f_score, source_license, attribution |
Null |
program, entry, render |
Program text, optional entry function, and standard render as an embedded Hub Image |
usda_path, usda_bytes |
USD path under usda/<shard>/ and file size |
cycles_path |
Optional 512 px WebP in cycles/<shard>/<id>.webp, encoded from the Cycles PNG by the Hub staging step. The Space derives a 256 px grid thumbnail when loading and uses the standard PNG if the WebP is missing or unreadable. |
The gallery shows assets at or above 0.8 first. Within each score band it sorts by descending complexity, then descending score. Complexity is the floor of log₂ of the mesh-node count, capped at 32 nodes. If the count is unavailable, each 1,024 triangles counts as one estimated node, with a minimum of one for any positive triangle count. Assets with neither count come last within the complexity sort. At equal complexity and score, the order takes one asset per family per round. Unscored assets follow scored assets.
The first 48 positions in the unfiltered Nature gallery rotate domains among assets with equal complexity and score,
using the family order within each domain. A coral leads the marine domain when one shares that
tier. Edit showcase_demote_families in config.json to place named families after the showcase.
Their assets remain in Nature and in search. The base order resumes after the showcase.
All interleaves above-floor Nature assets with the reconstructed objects. The Nature search matches words and quoted phrases in the original prompt and subject. All includes these text matches when Nature image embeddings are unavailable.
default_dataset in config.json selects the tab at the home URL. Set it to "" for All.
For local development, set EXPLORER_LOCAL_HUB to a directory containing one subdirectory per
dataset repository name (for example, sand3d-nature). Run uvicorn app.main:app --port 7860
from this directory containing the Space app. EXPLORER_DATA holds the generated image blob,
and EXPLORER_ASSETS_DIR can point to a local set of GLBs.