Datasets:
CARLA Walking Video
Synthetic outdoor videos rendered with CARLA 0.9.15. The camera models a person filming while
walking (eye level 1.45–1.8 m, looking ahead, glancing left/right and up at facades), plus, in v4_div, a dashcam.
Traffic and pedestrians move during each clip. Every frame has RGB, metric depth, a semantic label map, camera
intrinsics and camera pose, and per-object 3D boxes with occlusion-aware 2D boxes. Each clip carries two annotation
versions: v1 (annotation.json.gz, every box with ignore flags) and v3 (annotation_v3.json.gz, the
training targets: one fixed box per static object per clip, see v3 annotation).
| Clips | 12,964 |
| Frames | 777,840 (60 per clip) |
| Frame rate / clip length | 15 fps / 4 s |
| Resolution | 1024 × 1024, square pixels, principal point at the centre |
| Field of view | sampled per clip (10th / 50th / 90th percentile ≈ 47° / 62° / 124°), fx = fy = 512 / tan(fov / 2) |
| Weather | 7 presets, ~1.8–1.9 K clips each: ClearNoon, CloudyNoon, WetNoon, WetCloudyNoon, ClearSunset, CloudySunset, WetSunset |
| Annotated objects | v1: 7.54 M objects (per clip, summed), 23.7 M kept per-frame boxes; v3: 12.1 M per-frame boxes |
| Modalities | RGB (JPEG), depth (float16, metres), semantic labels (CARLA tags), 3D + 2D boxes, camera intrinsics and poses |
| Format | WebDataset: 260 tar shards of ~1.8 GB (473 GB in total), one sample per clip |
Subsets
All clips are in one set of shards; the subset column of clips.csv tells which collection a clip comes from.
Clip ids are unique across subsets (v4_div indices start at 5000).
| Subset | Clips | Town01 | Town02 | Town03 | Town04 | Town05 | Town07 | Town10HD |
|---|---|---|---|---|---|---|---|---|
v4_10k |
9,965 | 1,197 | 793 | 1,700 | 1,192 | 1,700 | 1,183 | 2,200 |
v4_div |
2,999 | 999 | — | 1,000 | — | 1,000 | — | — |
| Subset | Camera paths | Speed (median) | Per-frame step |
|---|---|---|---|
v4_10k |
walk only: pedestrian on the sidewalk |
1.2 m/s | 5–10 cm |
v4_div |
40 % free: pedestrian anywhere (roads, squares, grass); 40 % vehicle: dashcam; 20 % walk |
free / walk 1.2 m/s, vehicle 6.5 m/s | free / walk 5–10 cm, vehicle 24–70 cm |
v4_div adds viewpoints on maps whose sidewalks are already well covered by v4_10k.
Both subsets share the same format.
clips.csv lists every clip with its subset, map, weather, camera mode, field of view, frame count, number of
annotated objects and the shard that holds it, so a subset (e.g. only walk clips, or one town) can be downloaded
shard by shard.
Layout
README.md
clips.csv subset, clip_id, map, weather, camera_mode, fov_deg, n_frames, fps, n_objects, shard
env/<Town>.json static map objects (CARLA environment objects) of each town
data/train-00000-of-00260.tar WebDataset shards, 50 clips each, clips shuffled across shards (fixed seed)
...
Each clip is one WebDataset sample whose key is the clip id. A sample holds 184 members, stored contiguously:
| Member | Content |
|---|---|
<clip>.info.json |
the clip's clips.csv row plus frames (the sorted frame ids) |
<clip>.annotation.json.gz |
the gzipped v1 annotation file (cameras + objects, all boxes with ignore flags), see below |
<clip>.annotation_v3.json.gz |
the gzipped v3 annotation (training targets), see v3 annotation |
<clip>.raw.json.gz |
gzipped simulator log: trajectory parameters, per-frame camera and actor poses, actor boxes (CARLA native coordinates) |
<clip>.<frame>.jpg |
RGB of frame <frame> (000000 … 000059) |
<clip>.<frame>.depth.npz |
depth of that frame |
<clip>.<frame>.seg.png |
semantic tags of that frame |
The rgb_path / depth_path / semantic_path fields inside an annotation refer to the original folder layout
(images/<clip>/<frame>.jpg, depth_npz/<clip>/<frame>.npz, semantic/<clip>/<frame>.png). In the shards the same
files are the members <frame>.jpg, <frame>.depth.npz and <frame>.seg.png of the clip's sample. Object ids such as
env_000123 are local to their clip.
File formats
- RGB: 1024 × 1024 JPEG.
- Depth:
np.load(file)["depth"], a(1024, 1024)float16array of planar z-depth in metres (distance along the camera's optical axis, not along the ray). Sky and anything beyond the far plane is1000. float16 resolution is about 3 cm at 30–60 m and 0.5 m beyond 500 m. - Semantic: single-channel 8-bit PNG holding the CARLA 0.9.15 semantic tag id of each pixel (e.g. 1 road, 2 sidewalk, 3 building, 9 vegetation, 11 sky, 14 car, 12 pedestrian; see the CARLA docs for the full table).
Coordinate conventions
- World: CARLA world mirrored to a right-handed frame,
p = diag(1, -1, 1) · p_carla, metres,+zup. - Camera: OpenCV convention (x right, y down, z forward).
camera_poseis the 4 × 4 camera-to-world matrix, andrgb_intrinsicis the 3 × 3 pinhole matrix in pixels.- The raw simulator log (
raw.json.gz) is not converted: it is in CARLA's native left-handed, Unreal-axis coordinates.
Annotation file
{
"schema": "spatialencoder-train-annotations-v1", "annotation_version": "v1",
"source": "CARLA", "split": "train", "source_id": "carla_town01_0000",
"metadata": {
"scene_id": "...", "map": "Town01", "weather": "WetNoon", "fps": 15,
"camera_convention": "...", "world_frame": "...", // conventions, as described above
"frames": {
"000000": {
"rgb_path": "images/<clip>/000000.jpg", "depth_path": "depth_npz/<clip>/000000.npz",
"semantic_path": "semantic/<clip>/000000.png",
"rgb_intrinsic": [[fx,0,cx],[0,fy,cy],[0,0,1]], "camera_pose": [[...4x4 camera-to-world...]],
"timestamp_s": 0.0, "ground_height_m": 0.104, "camera_height_above_ground_m": 1.58
}, ...
},
"objects": {
"<object_id>": {
"3d_category": "car", "source": "carla_actor", ..., // static fields
"000000": { // one entry per frame the object appears in
"category_name": "car",
"camera_center": [x, y, z], // box centre in the camera frame (m)
"camera_R": [[...3x3...]], // box axes expressed in the camera frame
"camera_scale": [sx, sy, sz], // full box size along those axes (m)
"camera_box_2d_proj": [x0,y0,x1,y1], // projection of the 3D box
"camera_box_2d_rend": [x0,y0,x1,y1], // occlusion-aware box of the object's visible pixels
"visible_pixels": 1088,
"ignore": false, "ignore_reason": "..." // see below
}, ...
}
},
"v1": { "rules": "...", "params": {...}, "ignore_reasons": {...}, "new_object_sources": {...}, ... }
}
}
The box corners in the camera frame are camera_center + camera_R @ (±camera_scale / 2).
Object sources
source |
What it is |
|---|---|
carla_actor |
Vehicles and pedestrians, posed per frame |
carla_environment_object |
Static map meshes (trees, poles, signs, walls, …), grouped per actor or building |
building_part |
Facade parts (windows, doors, balconies, …) propagated onto buildings |
v1_group |
A group box replacing many small, adjacent same-class objects (members lists them) |
v1_forest |
An outline box for a dense stand of trees |
v1_railtrack |
Railway track segments fitted on track geometry |
v1_bent_segment |
Straight pieces of a bent fence, wall or guard-rail mesh |
ignore flags
Objects are never deleted. Instead, an entry that is unsuitable as a training target (too small for its distance,
too far, mostly occluded or truncated, a fake vegetation plane, merged into a group box, …) has "ignore": true and
an ignore_reason. Every annotation file carries the full list of reasons and the filter parameters under
metadata.v1. When a box was changed by the v1 rules, the original is kept in orig_camera_*.
For training, use the entries with ignore == false. Across the dataset, about 23.7 M of the 194 M per-frame entries
are kept.
v3 annotation (annotation_v3.json.gz)
v3 is the version used as training targets. It starts from v2 (v1 plus fixes for zero-thickness boxes, duplicates, missed objects and missing projected boxes) and changes three things:
- One box per static object per clip. v1 clips the boxes of buildings, forests and grouped objects to what is in view and visible in each frame, and builds groups per frame, so the same static object can change size by tens of metres between consecutive frames. In v3 every static object (everything except vehicles and pedestrians) has a single box for the whole clip: its full, unclipped box when that is the same in every frame (e.g. a building's mesh box), otherwise the union of all frames' full boxes, oriented like the largest of them. Vehicles and pedestrians keep their per-frame boxes.
- Facade parts ignored: window, balcony, door, glass facade, storefront, sign, awning.
- Far objects ignored: an object whose nearest box point is more than 50 m from the camera, with no exemptions (buildings, railway and forests included).
The v2 ignore decisions are kept. Of 194 M per-frame entries, 12.1 M remain (v1: 23.7 M); 7.2 M are dropped as facade parts and 4.3 M as farther than 50 m. Over all clips, 7.3 M static boxes were already constant and 0.15 M are unions.
The file is in a simpler, training-ready form than v1: only the kept boxes are listed (no ignore flags).
{
"scene_id": "carla_town01_0000", "map": "Town01", "weather": "WetNoon", "geometry_units": "meters",
"annotation_version": "v3", "v3": { "version": "v3", "base": "...", "rules": ["..."] },
"split": "train", // train / test / buffer / test_extra, see below
"frames": {
"000000": { "rgb_path": "images/<clip>/000000.jpg", "depth_path": "depth_npz/<clip>/000000.npz",
"rgb_intrinsic": [[fx,0,cx],[0,fy,cy],[0,0,1]], "camera_pose": [[...4x4 camera-to-world...]],
"original_width": 1024, "original_height": 1024 }, ...
},
"objects": {
"<object_id>": {
"3d_category": "building",
"000000": { "camera_center": [x, y, z], "camera_R": [[...3x3...]], "camera_scale": [sx, sy, sz],
"camera_box_2d_rend": [x0,y0,x1,y1], "camera_box_2d_proj": [x0,y0,x1,y1] }, ...
}
}
}
Compared with v1, in v3 camera_R's columns are reordered so that the box's local +y axis points down (the
axis closest to world vertical, signed downwards; camera_scale follows the same order), sides thinner than 5 mm are
set to 5 cm, and camera_box_2d_proj is recomputed from the 3D box. Box corners are still
camera_center + camera_R @ (±camera_scale / 2); frame paths map to the sample members as for v1.
split is a location-disjoint benchmark split: test (280 clips, 40 per town; test areas are separated from
training areas by a 25 m buffer and every test camera is at least 25.9 m from every training camera), buffer
(1,540 clips inside the buffer zones, not used for training), test_extra (524 further clips in test areas) and
train (10,620 clips).
Loading v3 instead of v1 in the example below:
ann3 = json.loads(gzip.decompress(f["annotation_v3.json.gz"]))
boxes = [(oid, o["3d_category"], o[fid]) for oid, o in ann3["objects"].items() if fid in o]
Loading example
Reading one shard with the standard library only:
import io, json, gzip, tarfile
import numpy as np
from PIL import Image
def iter_clips(tar_path):
with tarfile.open(tar_path) as tf:
cur, files = None, {}
for m in tf:
key, suffix = m.name.split(".", 1)
if cur is not None and key != cur:
yield cur, files; files = {}
cur, files[suffix] = key, tf.extractfile(m).read()
if cur is not None:
yield cur, files
for clip_id, f in iter_clips("data/train-00000-of-00260.tar"):
info = json.loads(f["info.json"])
ann = json.loads(gzip.decompress(f["annotation.json.gz"]))["metadata"]
for fid in info["frames"]:
rgb = np.asarray(Image.open(io.BytesIO(f[f"{fid}.jpg"])))
depth = np.load(io.BytesIO(f[f"{fid}.depth.npz"]))["depth"].astype(np.float32) # metres, sky = 1000
sem = np.asarray(Image.open(io.BytesIO(f[f"{fid}.seg.png"]))) # CARLA tag ids
fr = ann["frames"][fid]
K, T_c2w = np.array(fr["rgb_intrinsic"]), np.array(fr["camera_pose"])
boxes = [(oid, o["3d_category"], o[fid]) for oid, o in ann["objects"].items()
if isinstance(o.get(fid), dict) and not o[fid]["ignore"]]
With the webdataset library, wds.WebDataset(urls) yields one dict per clip with the same suffixes as keys
("info.json", "annotation.json.gz", "000000.jpg", …).
To fetch only some clips, look up their shard in clips.csv and download those shards, e.g.
huggingface_hub.hf_hub_download(repo_id, "data/train-00000-of-00260.tar", repo_type="dataset").
- Downloads last month
- 10,293