|
| 1 | +.. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +.. SPDX-License-Identifier: Apache-2.0 |
| 3 | +
|
| 4 | +nuScenes Dataset |
| 5 | +================ |
| 6 | + |
| 7 | +The NCore nuScenes tool converts data from the |
| 8 | +`nuScenes <https://www.nuscenes.org/>`_ autonomous driving dataset into |
| 9 | +NCore V4 format. All dataset versions are supported (v1.0-mini, |
| 10 | +v1.0-trainval, v1.0-test). |
| 11 | + |
| 12 | +.. _nuscenes_data_conventions: |
| 13 | + |
| 14 | +Conventions |
| 15 | +----------- |
| 16 | + |
| 17 | +The nuScenes dataset provides data from 6 cameras, 1 lidar, and 5 |
| 18 | +radars. The converter handles all sensor modalities and 3D annotations. |
| 19 | + |
| 20 | +Camera Sensors |
| 21 | +^^^^^^^^^^^^^^ |
| 22 | + 1. **Front (camera_front)** -- 1600x900, 70 deg FOV |
| 23 | + 2. **Front Left (camera_front_left)** -- 1600x900, 70 deg FOV |
| 24 | + 3. **Front Right (camera_front_right)** -- 1600x900, 70 deg FOV |
| 25 | + 4. **Back (camera_back)** -- 1600x900, 110 deg FOV |
| 26 | + 5. **Back Left (camera_back_left)** -- 1600x900, 70 deg FOV |
| 27 | + 6. **Back Right (camera_back_right)** -- 1600x900, 70 deg FOV |
| 28 | + |
| 29 | +All cameras use Basler acA1600-60gc sensors (global shutter). Images are |
| 30 | +provided undistorted with zero distortion coefficients. Camera intrinsics |
| 31 | +are stored using :class:`~ncore.data.OpenCVPinholeCameraModelParameters` |
| 32 | +with ``ShutterType.GLOBAL``. |
| 33 | + |
| 34 | +LiDAR Sensor |
| 35 | +^^^^^^^^^^^^^ |
| 36 | + 1. **Top LiDAR (lidar_top)** -- Velodyne HDL-32E, 32 layers, ~34k points/frame |
| 37 | + |
| 38 | +Point clouds in nuScenes are motion-compensated to the sensor frame at the |
| 39 | +sweep reference timestamp. The converter decompensates them back to |
| 40 | +per-point-time sensor frames (raw measurements) before storing, since |
| 41 | +NCore V4 expects non-motion-compensated ray-bundle data. |
| 42 | + |
| 43 | +Per-point timestamps are derived from the column structure of the .bin |
| 44 | +file: each file contains 32-point columns (one per beam) in sequential |
| 45 | +firing order. All points within a column receive the same timestamp. |
| 46 | +Frame time bounds are derived from consecutive sweep timestamps (not a |
| 47 | +hardcoded scan frequency). |
| 48 | + |
| 49 | +A structured lidar model (``RowOffsetStructuredSpinningLidarModelParameters``) |
| 50 | +is derived from the first frame's geometry and stored as intrinsics: |
| 51 | + |
| 52 | +- ``row_elevations_rad``: per-beam elevation angles (median across columns) |
| 53 | +- ``column_azimuths_rad``: per-column azimuth angles (median across beams) |
| 54 | +- ``spinning_direction``: clockwise ("cw") |
| 55 | +- ``spinning_frequency_hz``: derived from inter-sweep timestamps (~20 Hz) |
| 56 | + |
| 57 | +The ``model_element`` field is populated with ``[ring_index, column_index]`` |
| 58 | +per point, enabling structured lidar operations at read time. |
| 59 | + |
| 60 | +The minimum distance filter (1.0 m) matches the ``remove_close`` |
| 61 | +default used by the nuScenes devkit to discard sensor housing |
| 62 | +reflections. |
| 63 | + |
| 64 | +Radar Sensors |
| 65 | +^^^^^^^^^^^^^ |
| 66 | + 1. **Front (radar_front)** -- Continental ARS 408 |
| 67 | + 2. **Front Left (radar_front_left)** -- Continental ARS 408 |
| 68 | + 3. **Front Right (radar_front_right)** -- Continental ARS 408 |
| 69 | + 4. **Back Left (radar_back_left)** -- Continental ARS 408 |
| 70 | + 5. **Back Right (radar_back_right)** -- Continental ARS 408 |
| 71 | + |
| 72 | +Radar detections are sparse (typically 10-100 per sweep). Each detection |
| 73 | +provides position (x, y, z), ego-motion-compensated velocity, and radar |
| 74 | +cross section (RCS). Per-frame generic data fields: |
| 75 | + |
| 76 | +- ``radial_velocity_m_s`` (float32, [N]) -- radial velocity in m/s |
| 77 | + (positive = moving away from sensor), computed by projecting the |
| 78 | + ego-motion-compensated velocity vector onto the detection direction. |
| 79 | +- ``rcs_dBsm`` (float32, [N]) -- radar cross section in dBsm. |
| 80 | + |
| 81 | +Radar is not a spinning sensor; all detections in a frame share a single |
| 82 | +timestamp. |
| 83 | + |
| 84 | +Ego Poses |
| 85 | +^^^^^^^^^ |
| 86 | +Ego poses are derived from the per-sweep ``ego_pose`` records in the |
| 87 | +nuScenes database (GPS/INS-based). Poses are stored as dynamic |
| 88 | +``("rig", "world")`` poses relative to the first frame. The absolute |
| 89 | +first-frame pose is preserved as a static ``("world", "world_global")`` |
| 90 | +transform. |
| 91 | + |
| 92 | +3D Annotations |
| 93 | +^^^^^^^^^^^^^^ |
| 94 | +Cuboid annotations are stored in the ``world_global`` coordinate frame |
| 95 | +(the nuScenes global map frame) as |
| 96 | +:class:`~ncore.data.v4.CuboidsComponent` observations. Only keyframe |
| 97 | +annotations are included. The :meth:`~ncore.data.CuboidTrackObservation.transform` |
| 98 | +method can re-project them to any sensor frame at runtime via the pose |
| 99 | +graph. |
| 100 | + |
| 101 | +Category mapping from nuScenes to NCore class IDs: |
| 102 | + |
| 103 | +- vehicle.car -> car |
| 104 | +- vehicle.truck -> truck |
| 105 | +- vehicle.bus.* -> bus |
| 106 | +- vehicle.construction -> construction_vehicle |
| 107 | +- vehicle.motorcycle -> motorcycle |
| 108 | +- vehicle.bicycle -> bicycle |
| 109 | +- vehicle.trailer -> trailer |
| 110 | +- vehicle.emergency.* -> emergency_vehicle |
| 111 | +- human.pedestrian.* -> pedestrian |
| 112 | +- movable_object.barrier -> barrier |
| 113 | +- movable_object.trafficcone -> traffic_cone |
| 114 | + |
| 115 | +Usage |
| 116 | +----- |
| 117 | + |
| 118 | +.. code-block:: bash |
| 119 | +
|
| 120 | + bazel run //tools/data_converter/nuscenes -- \ |
| 121 | + --root-dir /path/to/nuscenes \ |
| 122 | + --output-dir /path/to/output \ |
| 123 | + nuscenes \ |
| 124 | + --version v1.0-trainval |
| 125 | +
|
| 126 | +Convert a single scene by name: |
| 127 | + |
| 128 | +.. code-block:: bash |
| 129 | +
|
| 130 | + bazel run //tools/data_converter/nuscenes -- \ |
| 131 | + --root-dir /path/to/nuscenes \ |
| 132 | + --output-dir /path/to/output \ |
| 133 | + nuscenes \ |
| 134 | + --version v1.0-mini \ |
| 135 | + --scene-name scene-0061 |
| 136 | +
|
| 137 | +See ``tools/data_converter/nuscenes/README.md`` for full option documentation. |
0 commit comments