nuScenes Map Expansion Tutorial

This is the tutorial for the nuScenes map expansion. In particular, the NuScenesMap data class.

This tutorial will go through the description of each layers, how we retrieve and query a certain record within the map layers, render methods, and advanced data exploration

In database terms, layers are basically tables of the map database in which we assign arbitrary parts of the maps with informative labels such as traffic_light, stop_line, walkway, etc. Refer to the discussion on layers for more details.


To install the map expansion, please download the files from and copy the files into your nuScenes map folder, e.g. /data/sets/nuscenes/maps.


We will be working with the singapore-onenorth map. The NuScenesMap can be initialized as follows:


Before we go into the details, let's visualize the map.

Rendering multiple layers

The NuScenesMap class makes it possible to render multiple map layers on a matplotlib figure.

Rendering the lidar basemap

New: We can render the HD lidar basemap used for localization. The basemap is a bitmap image that can be underlaid for most functions (render_centerlines, render_egoposes_on_fancy_map, render_layers, render_map_patch, render_next_roads, render_record). The same BitMap class can also be used to render the semantic prior (drivable surface + sidewalk) from the original nuScenes release. Note that in this visualization we only show the lane annotations for better visibility.