Datasets:
Tasks:
Image Segmentation
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
1K - 10K
License:
File size: 6,832 Bytes
67153b0 40bbfa3 ec5491e 40bbfa3 ec5491e 40bbfa3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | ---
pretty_name: nuScenes-NRS
description: Derived front-camera road-segmentation masks for the low-light nuScenes-NRS benchmark.
language:
- en
# The mask release is a derived artifact and remains subject to the
# nuScenes Dataset Terms; see the license notice below.
license: other
task_categories:
- image-segmentation
tags:
- autonomous-driving
- road-segmentation
- low-light-perception
- nuscenes
size_categories:
- 1K<n<10K
---
# nuScenes-NRS
nuScenes-NRS (nuScenes Nighttime Road Segmentation) is the road-segmentation
label release used by **IAF-Net: Illumination-Adaptive Fusion for Low-Light
Urban Road Segmentation**. This repository contains the derived labels and
the information needed to reproduce them from an authorized copy of the
official nuScenes data.
## What is included
| split | scenes | masks | mask resolution | distribution |
|---|---:|---:|---|---|
| training | 79 | 3,182 | 1600 x 900 | `training/masks.zip` |
| validation | 20 | 805 | 1600 x 900 | `validation/masks.zip` |
| **total** | **99** | **3,987** | | |
The split files contain one nuScenes `sample` token per line. Each archive
contains a `masks/` directory with files named `<sample-token>.png`; a mask
corresponds to the `CAM_FRONT` key frame of that sample. The training and
validation scene sets are disjoint. The release contains **no** RGB images,
LiDAR point clouds, lidarseg files, depth maps, normal maps, calibration
files, or other raw nuScenes sensor data.
Extract the archives from the repository root before using the validator or a
loader that expects the unpacked layout:
```bash
unzip training/masks.zip -d training
unzip validation/masks.zip -d validation
```
## Label format
Each file is an 8-bit, three-channel PNG with shape `900 x 1600 x 3` when
read as RGB:
* road: `R=255, G=0, B=0`;
* background: `R=G=B=0`.
For a binary mask, use `mask = (rgb[..., 0] > 127)`. When reading with
OpenCV (`cv2.imread`), the road value is in channel 2 because OpenCV uses
BGR order. The labels are intentionally stored in the same encoding as the
training protocol used in IAF-Net.
## Provenance and generation
The labels are projected from the official nuScenes `LIDAR_TOP` point cloud
and its `lidarseg` labels (class 24, `drivable_surface`) into the official
`CAM_FRONT` camera. The historical post-processing pipeline is:
1. transform LiDAR points through the calibrated-sensor and ego-pose chains;
2. retain points in front of the camera and inside the 1600 x 900 image;
3. Delaunay triangulation with a maximum projected triangle edge of 40 px;
4. elliptical morphological closing (15 x 15, two iterations);
5. external-contour Douglas--Peucker approximation (`epsilon = 0.01` of
contour perimeter), ignoring contours smaller than 1,000 px;
6. a final 5 x 5 elliptical erosion (one iteration).
The reference implementation is
`scripts/generate_masks_from_nuscenes.py`. It writes a three-channel PNG
with the road in the red channel and never modifies the source dataset.
Because the original nuScenes files are not redistributed here, exact
regeneration requires an authorized copy of the same nuScenes trainval and
lidarseg release.
## Reproduce the masks
Obtain `v1.0-trainval` and the matching `lidarseg` package from the official
[nuScenes download page](https://www.nuscenes.org/download), and accept the
nuScenes terms before use. Then install the dependencies:
```bash
python -m pip install -r requirements.txt
```
Generate either split (the command below regenerates training; replace the
split name and file for validation):
```bash
python scripts/generate_masks_from_nuscenes.py \
--dataroot /path/to/nuScenes \
--version v1.0-trainval \
--split training \
--split-file splits/training.txt \
--output-root /tmp/nuScenes-NRS-regenerated
```
The output is written to
`/tmp/nuScenes-NRS-regenerated/training/masks/`. The script reconstructs the
official CAM_FRONT/LIDAR_TOP key-frame mapping from `sample_data.json`, checks
for missing or duplicate records, and reports missing lidarseg files instead
of silently changing the split.
## Verify a downloaded release
From the repository root, either extract both archives as shown above and run
the unpacked validator:
```bash
python scripts/validate_release.py --root .
```
or verify the archive contents and checksums directly:
```bash
python scripts/validate_archives.py --root .
```
The checks cover split counts, filename/token consistency, PNG shape, dtype,
channel encoding, duplicate tokens, scene disjointness (when official
metadata is supplied), archive contents, and the recorded SHA-256 manifest.
## Download
The repository is public at
<https://huggingface.co/datasets/PeterNano/nuScenes-NRS>. For a command-line
download:
```bash
pip install -U huggingface_hub
hf download PeterNano/nuScenes-NRS \
--repo-type dataset --local-dir nuScenes-NRS
```
Older `huggingface_hub` versions expose the same command as
`huggingface-cli download`.
## License and data-use notice
This repository deliberately redistributes only derived masks, split/token
metadata, documentation, and scripts. It does **not** redistribute any
original nuScenes sensor or annotation files. The official nuScenes terms
state that use of the dataset and of data derived from it is governed by the
non-commercial `CC BY-NC-SA 4.0` license together with additional Dataset
Terms; where the two texts conflict, the Dataset Terms prevail. See the
[official terms of use](https://www.nuscenes.org/terms-of-use) and the
[CC BY-NC-SA 4.0 legal code](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
Users must obtain the original nuScenes release directly and satisfy those
terms. The masks and split metadata are offered only to the extent permitted
by those terms, with the additional boundary notes in `LICENSE_DATA.md`.
The scripts are MIT-licensed independently. No license in this repository
grants rights to the original nuScenes data, trademarks, or third-party
components.
The labels are automatically generated from sparse projected LiDAR semantics
and are not hand-drawn dense annotations. They can contain holes, boundary
uncertainty, and projection artifacts, especially in very dark or occluded
regions. They should therefore be used as benchmark labels rather than as a
survey-grade map of drivable space.
## Citation
If you use nuScenes-NRS or the accompanying masks, please cite the dataset
record and the IAF-Net paper. A machine-readable entry is provided in
`CITATION.cff`.
```bibtex
@misc{anonymous2026iafnet,
title = {IAF-Net: Illumination-Adaptive Fusion for Low-Light Urban Road Segmentation},
author = {{Anonymous Authors}},
year = {2026},
howpublished = {Hugging Face Dataset Card: PeterNano/nuScenes-NRS},
note = {nuScenes-NRS derived-label release, version 1.0.0}
}
```
|