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文件的?

相关内容

热门资讯

丹东鸭绿江导游词 丹东鸭绿江导游词  鸭绿江是我们中国和朝鲜的分界线,各位导游,请看下面的丹东鸭绿江导游词,希望可以帮...
幼儿园运动会闭幕式主持词 幼儿园运动会闭幕式主持词  主持人在台上表演的灵魂就表现在主持词中。随着社会一步步向前发展,各种场合...
70大寿主持词 70大寿主持词  主持词的写作需要将主题贯穿于所有节目之中。现今社会在不断向前发展,主持人的需求越来...
个人领奖感谢词 个人领奖感谢词(精选7篇)  获得奖励或者嘉奖,不仅是一份荣誉,更是一份激励。你知道怎么写感谢词吗,...
重阳节经典致辞 关于重阳节经典致辞(精选6篇)  在生活、工作和学习中,大家都不可避免地会接触到致辞吧,致辞要求风格...
幼儿园元旦文艺汇演主持词 男小主持:尊敬的家长,亲爱的老师女小主持:可爱的小朋友合:大家新年好!男小主持:春夏秋冬,黑夜清晨女...
大话西游降妖篇2台词 大话西游降妖篇2台词  导语:《西游伏妖篇》也是继春节档周星驰执导电影《美人鱼》中徐克客串表演之后,...
晚会活动主持词   引导语:晚会最重要的一点就是主持,而有关晚会活动的主持词要怎么写呢?接下来是小编为你带来收集整理...
周年庆活动主持词 周年庆活动主持词9篇  借鉴诗词和散文诗是主持词的一种写作手法。在人们越来越多的参与各种活动的今天,...
《手机》经典台词 《手机》经典台词  砖头媳妇:装得跟头会想事的猪一样。  于文娟:老费吃了不管用,说明他不是不能,而...
公司工会代表大会主持词 公司工会代表大会主持词  各位代表:  请大家坐好,会议马上就要开始了,公司工会代表大会主持词。(待...
影视剧里那些讲完就领便当的台... 关于影视剧里那些讲完就领便当的台词  无论是什么类型的影视作品,片中的角色在将死之前大都会变得不太一...
高三毕业典礼主持词 高三毕业典礼主持词15篇  主持词的写作需要将主题贯穿于所有节目之中。在如今这个时代,活动集会越来越...
班会主持词 班会主持词(精选12篇)  根据活动对象的不同,需要设置不同的主持词。在如今这个时代,各种集会中主持...
学术研讨会主持词 学术研讨会主持词  什么是主持词  由主持人于节目进行过程中串联节目的串联词。如今的各种演出活动和集...
小学音乐会的主持稿 小学音乐会的主持稿范文  开场舞:群舞《仰望五星红旗》  叶XX:感谢14位同学给我们带来的精彩演出...
元旦主持词舞蹈串词 元旦主持词舞蹈串词  开场语:  华:尊敬的各位领导、各位来宾  蒋:亲爱的老师、同学们  杨:大家...
六一儿童节晚会主持词 六一儿童节晚会主持词(精选7篇)  随着六一儿童的临近,幼儿园在紧锣密鼓的为幼儿排练着各大节目,作为...
电视剧版《红高粱》中的经典台... 电视剧版《红高粱》中的经典台词  九儿:高粱下到锅里,蒸熟发酵大火灼烧,把酒气逼出来就成了酒了,你觉...
新学期欢迎新教师致辞 新学期欢迎新教师致辞(精选22篇)  在学习、工作乃至生活中,大家总免不了要接触或使用致辞吧,致辞要...