nuScenes Map Expansion Tutorial
创始人
2024-06-02 14:18:25
0

nuScenes Map Expansion Tutorial

    • 0.引言
    • 1.Google colab
    • 2.初始化加载地图
    • 3.Visualization
    • 4.Navigation
    • 5.other

0.引言

  • 官方教程学习记录

  • Nuscenes其他模块学习

  • Nuscenes其他模块学习

  • Nuscenes其他模块学习

  • Nuscenes其他模块学习

  • Nuscenes其他模块学习

1.Google colab

本地配置还是比较麻烦,使用官方的教程进行学习,官方的教程是基于colab的。

  • colab学习参考
  • colab学习参考

我的云盘:
在这里插入图片描述

挂载Google云盘:

from google.colab import drive
drive.mount('/content/drive/')
import os
os.chdir('/content/drive/My Drive/')
!pwd

运行时会提示:

在这里插入图片描述

2.初始化加载地图

!pip install nuscenes-devkit &> /dev/null  # Install nuImages.import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
import tqdm
import numpy as npfrom nuscenes.map_expansion.map_api import NuScenesMap
from nuscenes.map_expansion import arcline_path_utils
from nuscenes.map_expansion.bitmap import BitMap
from google.colab import drive
drive.mount('/content/drive/')
import os
os.chdir('/content/drive/My Drive/')
!pwd
nusc_map = NuScenesMap(dataroot='/content/drive/My Drive/data/sets/nuscenes', map_name='singapore-onenorth')

3.Visualization

  • Rendering multiple layers
    在这里插入图片描述
  • Rendering the lidar basemap

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.

在这里插入图片描述

  • Rendering a particular record of the map layer
    在这里插入图片描述

  • Rendering binary map mask layers
    在这里插入图片描述

在这里插入图片描述

  • Rendering map layers on top of camera images
!pip install nuscenes-devkit &> /dev/null  # Install nuImages.import matplotlib.pyplot as plt# Init nuScenes. Requires the dataset to be stored on disk.
from nuscenes.nuscenes import NuScenes
from google.colab import drive
drive.mount('/content/drive/')
import os
os.chdir('/content/drive/My Drive/')
!pwd
nusc = NuScenes(version='v1.0-mini', dataroot='/content/drive/My Drive/data/sets/nuscenes', verbose=True, map_resolution=1)# Pick a sample and render the front camera image.
sample_token = nusc.sample[9]['token']
layer_names = ['road_segment', 'lane', 'ped_crossing', 'walkway', 'stop_line', 'carpark_area']
camera_channel = 'CAM_FRONT'
nusc_map.render_map_in_image(nusc, sample_token, layer_names=layer_names, camera_channel=camera_channel)

在这里插入图片描述

  • Rendering ego poses on the map
    在这里插入图片描述

4.Navigation

We also provide functions for navigation around the road network. For this purpose, the road layers lane, road_block and road_segment are especially useful (see definitions below). The get_next_roads(x, y) function looks at the road layer at a particular point. It then retrieves the next road object in the direction of the lane or road_block. As road_segments do not have a direction (e.g. intersections), we return all possible next roads.

在这里插入图片描述

  • Working with Lanes

For the prediction challenge we added connectivity information to the map expansion (v1.2) to efficiently query which lane is connected to which other lanes. Below we render the lane and lane_connector objects. The lanes and lane_connectors are defined by parametric curves. The resolution_meters parameter specifies the discretization resolution of the curve. If we set it to a high value (e.g. 100), the curves will appear as straight lines. We recommend setting this value to 1m or less.

在这里插入图片描述

  • Data Exploration

Let’s render a particular patch on the map:
在这里插入图片描述

  • Polygon

在这里插入图片描述

  • Drivable Area

Drivable area is defined as the area where the car can drive, without consideration for driving directions or legal restrictions. This is the only layer in which the record can be represented by more than one geometric entity.
Note: On some machines this polygon renders incorrectly as a filled black rectangle.

在这里插入图片描述

If we render this road segment we can see that it is indeed an intersection:

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

5.other

其实我更好奇他是如何将数据转换为json文件的?

相关内容

热门资讯

幼儿园晨会主持词 幼儿园晨会主持词  美好的一天从早上开始,从晨会开始,从大家的好的状态开始,从最好的开始。以下是小编...
诗文诵读展示主持词 诗文诵读展示主持词  主持词没有固定的格式,他的最大特点就是富有个性。在当今不断发展的世界,很多晚会...
大学生毕业典礼的主持词 大学生毕业典礼的主持词(精选5篇)  活动对象的不同,主持词的写作风格也会大不一样。在当下的社会中,...
婚礼的主持词 婚礼的主持词  婚礼的主持词(精选21篇)  主持词的写作要突出活动的主旨并贯穿始终。随着社会一步步...
主婚人致辞 主婚人致辞(精选6篇)  在生活、工作和学习中,大家都写过致辞吧,致辞具有很强的实用性和针对性。还在...
促销活动主持词 促销活动主持词  利用在中国拥有几千年文化的诗词能够有效提高主持词的感染力。在现今人们越来越重视活动...
小品活动的主持词 小品活动的主持词  【篇一】  各位亲爱的老师,同学们,大家下午好!  欢迎来到天津师范大学新闻传播...
森林报好词好句 森林报好词好句  好词:  小巧玲珑 飞云流雾 红日西垂 霞光四射 层峦叠嶂 水天相接  轻歌曼舞 ...
早会主持稿 早会主持稿(精选5篇)  在现在社会,我们可以使用主持稿的机会越来越多,主持稿是主持人为节目进行过程...
优秀员工颁奖词 优秀员工颁奖词大全  在平时的学习、工作或生活中,大家都经常接触到颁奖词吧,颁奖词是在某一主题的颁奖...
女儿出阁司仪主持词 女儿出阁司仪主持词范文  主持词要把握好吸引观众、导入主题、创设情境等环节以吸引观众。在当下的中国社...
歌颂祖国串词 歌颂祖国串词一。各位领导 各位来宾,大家晚上好。今天我们这里篷壁生辉,喜气洋溢,是因为有您们的光临,...
小学生庆元旦联欢会主持词 小学生庆元旦联欢会主持词范文(精选5篇)  主持词要注意活动对象,针对活动对象写相应的主持词。在现今...
新年升旗仪式致辞 新年升旗仪式致辞(精选14篇)  在现实生活或工作学习中,说到致辞,大家肯定都不陌生吧,致辞具有思路...
表演半台词 表演三句半台词  敲锣打鼓走圆场  1:锣鼓一响好心情,  2:我们漫游动画城;  3:表演一个三句...
毕业30周年同学聚会主持词 毕业30周年同学聚会主持词范文  老同学聚会,一桌饭菜,谈论着当年的同学情,好不快活呀,往日是多么的...
结训典礼主持词 结训典礼主持词范文  主持词是主持人在节目进行过程中用于串联节目的串联词。在当今中国社会,各种集会中...
集团董事长新年的经典致辞 集团董事长新年的经典致辞(通用13篇)  在平平淡淡的学习、工作、生活中,大家对致辞都不陌生吧,致辞...