--- license: other license_link: LICENSE.md license_name: comma-av-dataset configs: - config_name: thumbnails default: true data_files: - split: test path: "data/*/thumbnail.jpg" drop_labels: true --- # comma 1M A large self-driving dataset containing one-minute driving segments with road-camera video, and full localization data. ## Dataset collection Segments were recorded by comma devices installed in real user vehicles. The collection spans several hardware generations (comma two, comma three, comma 3X, and comma four) Camera systems vary between generations, so native resolution and field of view are not uniform across the dataset. ![hw_types](https://cdn-uploads.huggingface.co/production/uploads/608c79739c5a8f8ddd85c409/Ef4v5j12CW1AHGgzqvMGp.png) Each segment includes an offline localization estimate in `localizer.safetensors`. It fuses raw GNSS measurements, accelerometer and gyroscope data, vehicle motion constraints, and visual feature tracks from the road cameras. ## Structure ```text data/ └── / ├── fcamera.hevc ├── ecamera.hevc (for segments collected using hardware type >= comma three) ├── thumbnail.jpg └── localizer.safetensors ``` ## Example usage ```python import numpy as np import plotly.graph_objects as go from huggingface_hub import hf_hub_download from safetensors.numpy import load_file from pymap3d import ecef2geodetic from PIL import Image segment_id = "001774ef60cf6c43657cd317035fae58" thumbnail_path = hf_hub_download( repo_id="commaai/comma1M", repo_type="dataset", filename=f"data/{segment_id}/thumbnail.jpg", ) Image.open(thumbnail_path).show() ``` ![tmpwp75ks43](https://cdn-uploads.huggingface.co/production/uploads/608c79739c5a8f8ddd85c409/c6DkyVrD6644hwFgt1Aow.png) ```python localizer_path = hf_hub_download( repo_id="commaai/comma1M", repo_type="dataset", filename=f"data/{segment_id}/localizer.safetensors", ) states = load_file(localizer_path)["states"] latitude, longitude, _ = ecef2geodetic(*states[:, :3].T) speed = np.linalg.norm(states[:, 7:10], axis=1) fig = go.Figure() fig.add_trace(go.Scattermap(lat=latitude[::10], lon=longitude[::10], mode="lines+markers", line={"color": "#ff4d4d", "width": 3}, marker={"size": 6,"color": speed[::10],"colorscale": "Turbo","colorbar": {"title": "speed (m/s)"}})) # span and zoom for map span = max(float(np.ptp(latitude)), float(np.ptp(longitude)), 1e-6) zoom = float(np.clip(np.log2(360.0 / span) - 1., 1, 18)) fig.update_layout(map={"style": "open-street-map","center": {"lat": float(np.mean(latitude)), "lon": float(np.mean(longitude))},"zoom": zoom}, legend={"orientation": "h", "x": 0.01, "y": 0.01}, ) fig.show() ``` ![newplot](https://cdn-uploads.huggingface.co/production/uploads/608c79739c5a8f8ddd85c409/MR00BzcF_gCATP4nombod.png)