nuscenes instance 调研笔记:

前言

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

关于instance的统计数据:

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

原来是64386个,还是不少的

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

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=0curr_annotation_token=first_annotation_tokenwhile curr_annotation_token!=last_annotation_token:cur_annotation_num=cur_annotation_num+1cur_annotation=nusc.get('sample_annotation',curr_annotation_token)curr_annotation_token= cur_annotation['next']else:cur_annotation_num=cur_annotation_num+1if cur_annotation_num>max_annotation_num:max_annotation_num=cur_annotation_numimages_sum=images_sum+cur_annotation_numif cur_annotation_num>=10:ge_than_10=ge_than_10+1print(f'max annotation num is: {max_annotation_num}, image sum is:{images_sum}, ge than 10:{ge_than_10}')

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

nuscenes instance 调研笔记相关推荐

  1. RacerX Effective, Static Detection of Race Conditions and Deadlocks调研笔记

    RacerX: Effective, Static Detection of Race Conditions and Deadlocks调研笔记 作者:Dawson Engler and Ken As ...

  2. ElasticSearch 的使用-整体方向和调研笔记

    目录 ElasticSearch 的使用-整体方向和调研笔记 介绍 ElasticSearch 安装 启动 创建索引 插件管理 使用 Kibana 下载 启动 汉化 实际运用的思考 ElasticSe ...

  3. 读书项目排版引擎调研笔记

    最新公司立项了一个读书项目,需要进行前期的一些调研工作,其中比较重要的有以下功能,如排版引擎,下载,断点续传,存储,搜索,翻页效果等.而其中的重中之重是排版引擎,它涉及到图文混排,字号大小切换,字体切 ...

  4. Go的日志模块glog调研笔记

    glog简介 glog是著名的google开源C++日志库glog(https://github.com/google/glog)的golang版本,glog是一个轻量级的日志库,上手简单不需要配置文 ...

  5. 微信协议简单调研笔记

    前言 微信可调研点很多,这里仅仅从协议角度进行调研,会涉及到微信协议交换.消息收发等.所谓"弱水三千,只取一瓢"吧. 杂七杂八的,有些长,可直接拉到最后看结论好了. 一.微信协议概 ...

  6. Chrome DevTools 调研笔记

    1  说明 此篇文章针对Chrome DevTools常用功能进行调研分析.描述了每个功能点能实现的功能.应用场景和详细操作. 2  Elements 2.1  功能 检查和实时更新页面的HTML与C ...

  7. 团队协作工具调研笔记

    前言 最近公司希望通过各个组提交周报来增强管理和绩效评定,为了减少无谓的重复低效劳动,我琢磨着这么简单的功能应该早就有工具实现了啊,于是就开始了这次团队协作工具的调研.主要是将各个工具试用了一下. 需 ...

  8. 数据湖在大数据场景下应用和实施方案调研笔记(增强版)

    点击上方蓝色字体,选择"设为星标" 回复"面试"获取更多惊喜 在读本文前你应该看过这些: <我看好数据湖的未来,但不看好数据湖的现在> <数据 ...

  9. 全文检索引擎技术调研笔记

    找了几个案例,最后选择把调研范围控制在较为主流的Elasticsearch.Solr和略偏门的Sphinx Elasticsearch( https://www.elastic.co/guide/en ...

最新文章

  1. Shell命令-文件及目录操作之mkdir、mv
  2. js如何判断字符串里面是否含有某个字符串
  3. boost 文件操作
  4. 关于如何清除某个特定网站的缓存---基于Chrome浏览器
  5. asp.net core 系列 19 EFCore介绍
  6. mysql 5.5 外键_MySQL 5.5添加外键失败,错误[HY000] [150]和[HY000] [1005]
  7. PC 平台上的一种快速 Red Hat Linux 安装方法
  8. AcWing 2041. 干草堆(差分)
  9. 修改CentOS 7默认语言为中文
  10. 光储充一体化充电站,新能源汽车充电桩节能解决方案
  11. UAV021(六):系统架构优化、SBUS协议、遥控器控制电机转动
  12. e580显卡驱动_联想e580网卡驱动下载|联想e580无线网卡驱动官方版_ - 极光下载站...
  13. 参数validator/valid校验用法(通俗)
  14. F5 HSL高速日志配置(GTMLTM)
  15. c语言读取png文件大小,求助: C语言- 利用libpng读取png大小,并转换为jpg类型图片...
  16. 遍历HashMap的几种常用方法
  17. linux面试题_全网最新、最全Linux面试题(2020版)!
  18. 中国书法艺术会消亡吗?
  19. 计算机专业助我成长作文600,资助助我成长作文
  20. 成都七中2021级高考成绩查询,2021年成都各高中高考成绩排名及放榜最新消息

热门文章

  1. 编写函数求区间[200,3000]中所有的回文数, 回文数是正读和反读都是一样的数
  2. NumPy 学习 第三篇:矢量化和广播
  3. PTA L2-048 寻宝图 (25 分)
  4. Python 模拟Laguerre Polynomial拉盖尔多项式
  5. element 表格,实现选择的行变色
  6. endl和\n的区别
  7. 异常处理·EF·准备命令定义时发生错误。有关详细信息,请参阅内部异常
  8. 无法加载文件 XXX,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft问题解决
  9. 疫情推动“宅经济”成为当前重要经济发展模式
  10. 吕 思 伟 ---- 潘 爱 民 :: ATL 介 绍( 一)