|
Download README.md from Bmingg/CARLA_sim_data: direct link, hf CLI and curl.
- Browser
- Download file 6.91 kB
-
https://huggingface.co/datasets/Bmingg/CARLA_sim_data/resolve/refs%2Fpr%2F1/README.md
- Command line
-
hf download hf://datasets/Bmingg/CARLA_sim_data@refs/pr/1/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/Bmingg/CARLA_sim_data/resolve/refs%2Fpr%2F1/README.md
6.91 kB
| pretty_name: CARLA Simulated Paired Collision Data | |
| language: | |
| - en | |
| tags: | |
| - carla | |
| - event-camera | |
| - collision-prediction | |
| - paired-data | |
| - video | |
| configs: | |
| - config_name: reviews | |
| default: true | |
| drop_labels: true | |
| data_files: | |
| - split: all | |
| path: | |
| - data/*/*/review.mp4 | |
| - metadata.jsonl | |
| # CARLA_sim_data | |
| This dataset contains **392 recordings (196 collision/near-miss pairs)** covering head-on, close turning, braking, pedestrian crossing, and dense-traffic pilots. The download is about **15.6 GiB**. It includes reduced event arrays and MP4 previews. Original raw events are kept locally and are not included in this release. | |
| ## Get started | |
| Create a [Hugging Face account](https://huggingface.co/join), request access to [Bmingg/CARLA_sim_data](https://huggingface.co/datasets/Bmingg/CARLA_sim_data), and wait for approval. Create your own [access token](https://huggingface.co/settings/tokens): read permission for downloads, or write/PR permission for contributions. Enter it only at the login prompt. | |
| Use **any working folder you choose**. These Linux/macOS commands create a small environment and download the catalog and tools, without downloading the videos: | |
| ```bash | |
| python3 -m venv .venv | |
| source .venv/bin/activate | |
| python -m pip install 'huggingface_hub>=1.0,<2' 'numpy>=1.26,<3' | |
| hf auth login | |
| hf download Bmingg/CARLA_sim_data --repo-type dataset --local-dir carla-data \ | |
| --include README.md FORMAT.md metadata.jsonl metadata_schema.json \ | |
| dataset_tools.py new_pair.py upload_dataset.py requirements.txt | |
| cd carla-data | |
| ``` | |
| Use Python 3.10 or later. On Windows, activate with `.venv\Scripts\activate`. All commands below run inside the downloaded `carla-data` folder; your original simulation files can stay anywhere. | |
| ## Folder structure and metadata | |
| ```text | |
| metadata.jsonl # Catalog: one row per recording. | |
| metadata_schema.json # Metadata rules. | |
| data/<unique_pair_id>/ | |
| pair_config.json # Optional generation settings and audit. | |
| collision/ | |
| metadata.json # Standardized recording metadata. | |
| events.npy # Required event array. | |
| capture_metadata.json # Optional original capture details. | |
| review.mp4 # Optional human preview. | |
| near_miss/ | |
| ...same recording files... | |
| ``` | |
| Metadata records the scenario, outcome, target type, `static`, `dense_traffic`, background/town/roads, speeds, timing, sensor settings, asset hashes, and `split`. Unknown optional values are JSON `null`; `assets.raw_events` is null because raw files are omitted. A braking target that eventually stops still has `static: false`. | |
| The existing split contains **200 train, 30 validation, and 30 test recordings**. Another **132 recordings are unassigned** (`split: null`). Paired recordings stay together. Filter the catalog by `split`; separate split folders are unnecessary. | |
| See [FORMAT.md](FORMAT.md) for field definitions, event encoding, and timing. Our recordings last four seconds, with 10 ms event bins and 25 FPS previews. | |
| ## Download data | |
| Find a pair ID in `metadata.jsonl`, then replace `PAIR_ID` below: | |
| ```bash | |
| hf download Bmingg/CARLA_sim_data --repo-type dataset --local-dir . \ | |
| --include 'data/PAIR_ID/**' | |
| python dataset_tools.py validate --pair-id PAIR_ID | |
| ``` | |
| Use `--include 'data/*/*/review.mp4'` for previews only, or omit `--include` to download everything. Add `--revision COMMIT_HASH` to every download when reproducing an experiment. | |
| ## Contribute a pair or a whole batch | |
| Choose a unique ID such as `linh_batch01_0001`. Copy your files from wherever you store them into `data/linh_batch01_0001/collision/` and `near_miss/`, following the layout above. Your original project structure does not need to change. | |
| For arrays matching [our event encoding](FORMAT.md), create a local `details.json` with your **actual** settings. This is an example: | |
| ```json | |
| { | |
| "contributor_id": "linh", | |
| "batch_id": "batch01", | |
| "scenario_type": "head_on", | |
| "object_type": "car", | |
| "static": false, | |
| "dense_traffic": false, | |
| "duration_s": 4, | |
| "simulation_dt_ms": 10, | |
| "event_bin_ms": 10, | |
| "num_event_bins": 400, | |
| "sensor_width_px": 640, | |
| "sensor_height_px": 480 | |
| } | |
| ``` | |
| Generate metadata, then fill in available background information and each recording's observed collision time and clearance. Missing optional fields start as null. If your encoding differs, declare it according to the schema instead of using the helper unchanged. | |
| ```bash | |
| python new_pair.py --pair-id linh_batch01_0001 --details details.json | |
| # Review and edit the two metadata.json files before continuing. | |
| python dataset_tools.py validate --pair-id linh_batch01_0001 --no-index --deep-events | |
| python upload_dataset.py --root . --pair-id linh_batch01_0001 --dry-run | |
| python upload_dataset.py --root . --pair-id linh_batch01_0001 | |
| ``` | |
| The last command submits only your pair as a **pull request**, which Bmingg reviews before merging. New pairs keep `split: null`. File validation does not establish physical correctness; mark quality as passed only with supporting scenario-audit evidence. Do not upload your token or edit the shared catalog. | |
| To upload your whole dataset together, prepare all its pair folders under `data/` in a separate upload folder, with metadata for each recording. You do not need other contributors' data or a local catalog. From that folder, run: | |
| ```bash | |
| python upload_dataset.py --root . --batch --dry-run | |
| python -u upload_dataset.py --root . --batch > batch-upload.log 2>&1 | |
| ``` | |
| This validates all pairs and checks their IDs against HF before uploading them into **one PR**. Rerun the same command to resume that PR; keep the folder and its `.cache` unchanged. Do not merge the PR until the log says the upload is complete. Use a separate folder for the next batch. | |
| Using Bmingg's token works, but does not increase transfer speed; actions use Bmingg's identity. Prefer a [separate token scoped to this dataset](https://huggingface.co/docs/hub/security-tokens), entered through `hf auth login`. The contributor metadata should still name the person who generated the recordings. | |
| ## Owner upload | |
| From your **complete prepared dataset folder**, containing the tools and catalog, run: | |
| ```bash | |
| python upload_dataset.py --root . --dry-run | |
| python -u upload_dataset.py --root . > upload.log 2>&1 | |
| ``` | |
| The uploader enables and verifies **manual gated access** before uploading. Rerun the same command after an interruption. After accepting contributions, synchronize your complete local copy and run `python dataset_tools.py reindex` before uploading again. Never rebuild the catalog from a partial download. | |
| The dataset page is public; downloads require approval. Gating does not prevent approved users from keeping copies. A dataset license has not yet been specified. Passing validation does not mean the data are free of event-count bias. | |