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

相关内容

热门资讯

常用商务英语口语   商务英语是以适应职场生活的语言要求为目的,内容涉及到商务活动的方方面面。下面是小编收集的常用商务...
六年级上册英语第一单元练习题   一、根据要求写单词。  1.dry(反义词)__________________  2.writ...
复活节英文怎么说 复活节英文怎么说?复活节的英语翻译是什么?复活节:Easter;"Easter,anniversar...
2008年北京奥运会主题曲 2008年北京奥运会(第29届夏季奥林匹克运动会),2008年8月8日到2008年8月24日在中华人...
英语道歉信 英语道歉信15篇  在日常生活中,道歉信的使用频率越来越高,通过道歉信,我们可以更好地解释事情发生的...
六年级英语专题训练(连词成句... 六年级英语专题训练(连词成句30题)  1. have,playhouse,many,I,toy,i...
上班迟到情况说明英语   每个人都或多或少的迟到过那么几次,因为各种原因,可能生病,可能因为交通堵车,可能是因为天气冷,有...
小学英语教学论文 小学英语教学论文范文  引导语:英语教育一直都是每个家长所器重的,那么有关小学英语教学论文要怎么写呢...
英语口语学习必看的方法技巧 英语口语学习必看的方法技巧如何才能说流利的英语? 说外语时,我们主要应做到四件事:理解、回答、提问、...
四级英语作文选:Birth ... 四级英语作文范文选:Birth controlSince the Chinese Governmen...
金融专业英语面试自我介绍 金融专业英语面试自我介绍3篇  金融专业的学生面试时,面试官要求用英语做自我介绍该怎么说。下面是小编...
我的李老师走了四年级英语日记... 我的李老师走了四年级英语日记带翻译  我上了五个学期的小学却换了六任老师,李老师是带我们班最长的语文...
小学三年级英语日记带翻译捡玉... 小学三年级英语日记带翻译捡玉米  今天,我和妈妈去外婆家,外婆家有刚剥的`玉米棒上带有玉米籽,好大的...
七年级英语优秀教学设计 七年级英语优秀教学设计  作为一位兢兢业业的人民教师,常常要写一份优秀的教学设计,教学设计是把教学原...
我的英语老师作文 我的英语老师作文(通用21篇)  在日常生活或是工作学习中,大家都有写作文的经历,对作文很是熟悉吧,...
英语老师教学经验总结 英语老师教学经验总结(通用19篇)  总结是指社会团体、企业单位和个人对某一阶段的学习、工作或其完成...
初一英语暑假作业答案 初一英语暑假作业答案  英语练习一(基础训练)第一题1.D2.H3.E4.F5.I6.A7.J8.C...
大学生的英语演讲稿 大学生的英语演讲稿范文(精选10篇)  使用正确的写作思路书写演讲稿会更加事半功倍。在现实社会中,越...
VOA美国之音英语学习网址 VOA美国之音英语学习推荐网址 美国之音网站已经成为语言学习最重要的资源站点,在互联网上还有若干网站...
商务英语期末试卷 Part I Term Translation (20%)Section A: Translate ...