nuscenes instance 调研笔记

news2024/12/26 3:22:47

nuscenes instance 调研笔记:

前言

nuscenes这个自动驾驶数据集挺大,官方devkit还提供了各种操作用于提高科研人员的效率,但是吧,东西多了学起来就乱七八糟的,本文仅以提取每个instance关联的所有images为例子,把下表(此表名曰:nuscenes Schema)所描绘的脑回路理一遍

Alt

关于instance的统计数据:

  • 打印下nusc的instance含量
len(nusc.instance)

原来是64386个,还是不少的

  • 看了下nuscenes schema, 好奇instance分别包含哪些类别

Alt

nusc.category
[{'token': 'aaddc3454ccbefbb2d8d8461f8f7f481',
  'name': 'noise',
  'description': 'Any lidar return that does not correspond to a physical object, such as dust, vapor, noise, fog, raindrops, smoke and reflections.',
  'index': 0},
 {'token': '63a94dfa99bb47529567cd90d3b58384',
  'name': 'animal',
  'description': 'All animals, e.g. cats, rats, dogs, deer, birds.',
  'index': 1},
 {'token': '1fa93b757fc74fb197cdd60001ad8abf',
  'name': 'human.pedestrian.adult',
  'description': 'Adult subcategory.',
  'index': 2},
 {'token': 'b1c6de4c57f14a5383d9f963fbdcb5cb',
  'name': 'human.pedestrian.child',
  'description': 'Child subcategory.',
  'index': 3},
 {'token': '909f1237d34a49d6bdd27c2fe4581d79',
  'name': 'human.pedestrian.construction_worker',
  'description': 'Construction worker',
  'index': 4},
 {'token': '403fede16c88426885dd73366f16c34a',
  'name': 'human.pedestrian.personal_mobility',
  'description': 'A small electric or self-propelled vehicle, e.g. skateboard, segway, or scooters, on which the person typically travels in a upright position. Driver and (if applicable) rider should be included in the bounding box along with the vehicle.',
  'index': 5},
 {'token': 'bb867e2064014279863c71a29b1eb381',
  'name': 'human.pedestrian.police_officer',
  'description': 'Police officer.',
  'index': 6},
 {'token': '6a5888777ca14867a8aee3fe539b56c4',
  'name': 'human.pedestrian.stroller',
  'description': 'Strollers. If a person is in the stroller, include in the annotation.',
  'index': 7},
 {'token': 'b2d7c6c701254928a9e4d6aac9446d79',
  'name': 'human.pedestrian.wheelchair',
  'description': 'Wheelchairs. If a person is in the wheelchair, include in the annotation.',
  'index': 8},
 {'token': '653f7efbb9514ce7b81d44070d6208c1',
  'name': 'movable_object.barrier',
  'description': 'Temporary road barrier placed in the scene in order to redirect traffic. Commonly used at construction sites. This includes concrete barrier, metal barrier and water barrier. No fences.',
  'index': 9},
 {'token': '063c5e7f638343d3a7230bc3641caf97',
  'name': 'movable_object.debris',
  'description': 'Movable object that is left on the driveable surface that is too large to be driven over safely, e.g tree branch, full trash bag etc.',
  'index': 10},
 {'token': 'd772e4bae20f493f98e15a76518b31d7',
  'name': 'movable_object.pushable_pullable',
  'description': 'Objects that a pedestrian may push or pull. For example dolleys, wheel barrows, garbage-bins, or shopping carts.',
  'index': 11},
 {'token': '85abebdccd4d46c7be428af5a6173947',
  'name': 'movable_object.trafficcone',
  'description': 'All types of traffic cone.',
  'index': 12},
 {'token': '0a30519ee16a4619b4f4acfe2d78fb55',
  'name': 'static_object.bicycle_rack',
  'description': 'Area or device intended to park or secure the bicycles in a row. It includes all the bikes parked in it and any empty slots that are intended for parking bikes.',
  'index': 13},
 {'token': 'fc95c87b806f48f8a1faea2dcc2222a4',
  'name': 'vehicle.bicycle',
  'description': 'Human or electric powered 2-wheeled vehicle designed to travel at lower speeds either on road surface, sidewalks or bike paths.',
  'index': 14},
 {'token': '003edbfb9ca849ee8a7496e9af3025d4',
  'name': 'vehicle.bus.bendy',
  'description': 'Bendy bus subcategory. Annotate each section of the bendy bus individually.',
  'index': 15},
 {'token': 'fedb11688db84088883945752e480c2c',
  'name': 'vehicle.bus.rigid',
  'description': 'Rigid bus subcategory.',
  'index': 16},
 {'token': 'fd69059b62a3469fbaef25340c0eab7f',
  'name': 'vehicle.car',
  'description': 'Vehicle designed primarily for personal use, e.g. sedans, hatch-backs, wagons, vans, mini-vans, SUVs and jeeps. If the vehicle is designed to carry more than 10 people use vehicle.bus. If it is primarily designed to haul cargo use vehicle.truck. ',
  'index': 17},
 {'token': '5b3cd6f2bca64b83aa3d0008df87d0e4',
  'name': 'vehicle.construction',
  'description': 'Vehicles primarily designed for construction. Typically very slow moving or stationary. Cranes and extremities of construction vehicles are only included in annotations if they interfere with traffic. Trucks used to haul rocks or building materials are considered vehicle.truck rather than construction vehicles.',
  'index': 18},
 {'token': '732cce86872640628788ff1bb81006d4',
  'name': 'vehicle.emergency.ambulance',
  'description': 'All types of ambulances.',
  'index': 19},
 {'token': '7b2ff083a64e4d53809ae5d9be563504',
  'name': 'vehicle.emergency.police',
  'description': 'All types of police vehicles including police bicycles and motorcycles.',
  'index': 20},
 {'token': 'dfd26f200ade4d24b540184e16050022',
  'name': 'vehicle.motorcycle',
  'description': 'Gasoline or electric powered 2-wheeled vehicle designed to move rapidly (at the speed of standard cars) on the road surface. This category includes all motorcycles, vespas and scooters.',
  'index': 21},
 {'token': '90d0f6f8e7c749149b1b6c3a029841a8',
  'name': 'vehicle.trailer',
  'description': 'Any vehicle trailer, both for trucks, cars and bikes.',
  'index': 22},
 {'token': '6021b5187b924d64be64a702e5570edf',
  'name': 'vehicle.truck',
  'description': 'Vehicles primarily designed to haul cargo including pick-ups, lorrys, trucks and semi-tractors. Trailers hauled after a semi-tractor should be labeled as vehicle.trailer',
  'index': 23},
 {'token': '89d20ff31e1fbdc844a74ff50f90c65c',
  'name': 'flat.driveable_surface',
  'description': 'All paved or unpaved surfaces that a car can drive on with no concern of traffic rules.',
  'index': 24},
 {'token': '65deb30a3b9481422af8ad8adc983d63',
  'name': 'flat.other',
  'description': 'All other forms of horizontal ground-level structures that do not belong to any of driveable_surface, curb, sidewalk and terrain. Includes elevated parts of traffic islands, delimiters, rail tracks, stairs with at most 3 steps and larger bodies of water (lakes, rivers).',
  'index': 25},
 {'token': 'bf7b16f053ff2ea504a3d083fed223dd',
  'name': 'flat.sidewalk',
  'description': 'Sidewalk, pedestrian walkways, bike paths, etc. Part of the ground designated for pedestrians or cyclists. Sidewalks do **not** have to be next to a road.',
  'index': 26},
 {'token': '2cfb3bdc510a4d28a4a1a78e611e4dfc',
  'name': 'flat.terrain',
  'description': 'Natural horizontal surfaces such as ground level horizontal vegetation (< 20 cm tall), grass, rolling hills, soil, sand and gravel.',
  'index': 27},
 {'token': 'a6773ab08859eb7037c36acc6d302a57',
  'name': 'static.manmade',
  'description': 'Includes man-made structures but not limited to: buildings, walls, guard rails, fences, poles, drainages, hydrants, flags, banners, street signs, electric circuit boxes, traffic lights, parking meters and stairs with more than 3 steps.',
  'index': 28},
 {'token': '0d35abf67670c9b13a4fe6550c698e73',
  'name': 'static.other',
  'description': 'Points in the background that are not distinguishable, or objects that do not match any of the above labels.',
  'index': 29},
 {'token': 'e8fc03c4a3ce3cd25c9bc1c808197861',
  'name': 'static.vegetation',
  'description': 'Any vegetation in the frame that is higher than the ground, including bushes, plants, potted plants, trees, etc. Only tall grass (> 20cm) is part of this, ground level grass is part of `terrain`.',
  'index': 30},
 {'token': '3847caf8adb16ed747535b76fdb9fd05',
  'name': 'vehicle.ego',
  'description': 'The vehicle on which the cameras, radar and lidar are mounted, that is sometimes visible at the bottom of the image.',
  'index': 31}]
  • 我只想操作car相关的instance:
car_instances=[]
for instance in nusc.instance:
    category_token= instance['category_token']
    instance_category= nusc.get('category',category_token)
    if instance_category['name']=='vehicle.car':
        car_instances.append(instance)
    
print(len(car_instances))

一共有27701个car,不少

  • 我想统计instance在sample中出现的次数大于等于10次的instance
max_annotation_num=0
images_sum=0
ge_than_10=0
for car_instance in tqdm(car_instances):
    first_annotation_token= car_instance['first_annotation_token']
    last_annotation_token=car_instance['last_annotation_token']
    
    cur_annotation_num=0
    curr_annotation_token=first_annotation_token
    while curr_annotation_token!=last_annotation_token:
        cur_annotation_num=cur_annotation_num+1
        cur_annotation=nusc.get('sample_annotation',curr_annotation_token)
        curr_annotation_token= cur_annotation['next']
        
        
    else:
        cur_annotation_num=cur_annotation_num+1
    
    if cur_annotation_num>max_annotation_num:
        max_annotation_num=cur_annotation_num
    
    images_sum=images_sum+cur_annotation_num
    if cur_annotation_num>=10:
        ge_than_10=ge_than_10+1
    
print(f'max annotation num is: {max_annotation_num}, image sum is:{images_sum}, ge than 10:{ge_than_10}')

我想,在结合nuscenes Schema和代码,应该能够明白各个数据表之间相互关联的操作了。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/426269.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

USRP具有MIMO系统如何同步

MIMO系统要求 时间和频率同步&#xff0c;并且每个通道必须满足下面两个要求&#xff1a; 1&#xff09;时钟必须同步对齐 2&#xff09;对DSP操作时间也要对齐&#xff0c;来自同一的时钟边缘 波束成形和测向要求 除了采样时间和采样时钟对准外&#xff0c;系统还必须在每个…

华为OD机试 - 相同数字组成图形的周长(Java JS Python)

题目描述 有一个6464的矩阵,每个元素的默认值为0,现在向里面填充数字,相同的数字组成一个实心图形,如下图所示是矩阵的局部(空白表示填充0): 数字1组成了蓝色边框的实心图形,数字2组成了红色边框的实心图形。 单元格的边长规定为1个单位。 请根据输入,计算每个非0值…

java 数组和字符串操作

目录一、前言二、数组操作1.charAt操作2.getBytes操作3.toCharArray操作4.String.valueOf5.substring&#xff0c;toUpperCase&#xff0c;toLowerCase&#xff0c;concat6.indexOf7.Arrays使用一、前言 本文章主要讲解数组的一些基本操作&#xff0c;让我们写代码更加方便&am…

1.docker-安装及使用

1.安装步骤 Install Docker Engine on CentOS 1. 确定CenOS7及以上版本 cat /etc/redhat-release2.卸载旧版本 yum remove docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-latest-logrotate \docker-logrotate \docker-engine3.yum安…

软件测试岗位求职避坑,今年毁约应届生的公司有这么多?….

不知不觉九月已至&#xff0c;“金三银四”招聘旺季也落入尾声&#xff0c;大学生也迎来毕业季&#xff01; 这个时候&#xff0c;应届生开始集体走向社会&#xff0c;而职场人也迎来了跳槽涨薪的好时机。 可现实的求职情况却是一片困境&#xff1a;从中小微到“大厂”&#…

ICPC SWERC 2020 K - Unique Activities(SAM记录子串第一次出现的位置 or SAM + hash)

两种做法的效率差异 做法一&#xff1a;SAM记录子串第一次结束位置 做法二&#xff1a;SAM hash 题意&#xff1a; 给定一个字符串&#xff0c;让你找到只出现过一次&#xff0c;且长度最短的子串并输出&#xff0c;如果有多个则输出最先出现的那个。 思路&#xff1a…

迷宫问题-DFS-BFS

迷宫问题迷宫问题简介BFS解决迷宫最短路径问题DFS记录迷宫路径DFS解决迷宫所有路径问题迷宫问题简介 &#x1f680;学习过算法程序设计的应该都学习过迷宫这个问题&#xff0c;迷宫问题主要设计的算法就是DFS-深度优先遍历和BFS-广度优先遍历。 &#x1f680;在一个二维数组中…

Jmeter和Testlink自动化测试框架研究与实施

摘 要 目前基于Jmeter的接口自动化测试框架&#xff0c;大多只实现脚本维护和自动调度&#xff0c;无法与Testlink进行互通&#xff0c;实现测试方案与自动化实施流程连接&#xff0c;本文基于Testlink、Jmeter、Jenkins实现&#xff1a;通过Testlink统一维护接口自动化测试用…

搭建es集群

单点es的缺点&#xff1a;1.存储数据有限&#xff1b;2.单点故障问题&#xff08;es出现故障则整个服务会直接宕机&#xff09; 解决存储数据有限&#xff1a;搭建多台es服务器实现集群 解决单点故障&#xff1a;在不同的es服务器中进行备份数据&#xff08;例&#xff1a;在…

车载测试需要有哪些知识需要学习的?

一、车载行业前景 其中的车载测试也随着国家对新能源、智能驾驶等领域的支持&#xff0c;而异常活跃&#xff0c;目前我国共有9000家自动驾驶相关企业&#xff0c;而今年从华为、中兴、大唐等通信领域的企业到以阿里、腾讯、小米等为代表的互联网企业&#xff0c;均已布局自动…

浅谈继承和发扬传统文化路径

中华民族五千年文明历史,造就了博大精深的中华传统文化。如何继承和发扬传统文化,是当代文化爱好者和工作者所关注的&#xff0c;实现这一使命,文化传承需要在以下路径上发力: 1. “微更新”路径。在传承的基础上进行融合拓展,实现内涵丰富和更新。 2. “强保护”路径。利用立…

空压机远程监控系统解决方案

一、项目背景 随着物联网各种技术快速发展,各物联网远程监测应用场景也应用而生&#xff0c;空压机是一种空气压缩和气体输送设备&#xff0c;广泛运用于矿山、机械、电子、医疗等各行业。空压机常规都是需要人在现场监测和维护,现在通过物联网技术,远程监控成为可能&#xff…

利用Msray-plus提升SEO工作效率和效果

随着互联网的不断发展和普及&#xff0c;SEO&#xff08;搜索引擎优化&#xff09;已经成为了网站推广和营销的重要手段之一。SEO的核心是通过优化网站的结构、内容和关键词等&#xff0c;提高网站在搜索引擎中的排名&#xff0c;从而吸引更多的访问量和潜在客户。然而&#xf…

多通道振弦传感器无线采集采集仪如何开始使用

多通道振弦传感器无线采集采集仪如何开始使用 开始使用 设备电源 VS208~432 可使用内置电池&#xff08;默认&#xff09;也可使用外部电池工作。 需要特别注意&#xff1a;严禁内置和外部电池&#xff08;电源&#xff09;同时使用&#xff0c;严重时会造成短路起火&#xff0…

宝塔搭建chevereto图床

前言 chevereto是一个国外开发的图床&#xff0c;使用phpnginxmysql搭建的&#xff0c;使用宝塔面板更方便搭建chevereto图床&#xff0c;chevereto有收费和免费版本 准备环境 宝塔面板&#xff0c;百度网上很多教程&#xff0c;一键安装.chevereto安装包&#xff0c;本次使…

Cadence Allegro PCB设计88问解析(二十七) 之 Allegro中dimension environment命令使用(添加及删除尺寸标注)

一个学习信号完整性仿真的layout工程师 在通常的设计中&#xff0c;一般会在outline的光绘层中添加单板或则拼版外形的尺寸大小。方便板厂人员查看&#xff0c;但是尺寸标注的添加涉及到尺寸单位、精度等&#xff0c;要根据公司的标准添加。如果需要修改尺寸的参数&#xff0c;…

nssctf web 入门(7)

这里通过nssctf的题单web安全入门来写&#xff0c;会按照题单详细解释每题。题单在NSSCTF中。 想入门ctfweb的可以看这个系列&#xff0c;之后会一直出这个题单的解析&#xff0c;题目一共有28题&#xff0c;打算写10篇。 [SWPUCTF 2021 新生赛]hardrce [SWPUCTF 2021 新生赛…

【快乐手撕LeetCode题解系列】——环形链表

【【快乐手撕LeetCode题解系列】——移除链表元素&#x1f60e;前言&#x1f64c;环形链表&#x1f64c;画图分析&#xff1a;&#x1f60d;思路分析&#xff1a;&#x1f60d;源代码分享&#xff1a;&#x1f60d;总结撒花&#x1f49e;&#x1f60e;博客昵称&#xff1a;博客…

python简单认识一下字面量并尝试编写输出字面量在控制台

首先 还是顾名思义 什么是字面量&#xff1f; 在代码中写下来的固定的值 我们称之为 字面量 python的字面量主要是以下几种 当然 前期不需要那么急 我们先熟悉 数字类型中的 整数 浮点数 和字符串类型 然后后续再慢慢扩展即可 整数呢 就相当于 我们数学中的 正整数 例如 1 10…

Compose (10/N) - 动画

一、高级别动画 1.1 简单值动画 animate***AsState 为单个值添加动画。只需要指定目标值&#xff0c;会从当前值向目标值渐变。 animateColorAsStateanimateDpAsStateanimateSizeAsStateanimateOffsetAsStateanimateRectAsState animateIntAsState animateIntOffsetAsState an…