NuScenes数据集关于Radar数据的统计

  • 关注于v1.0-mini版本的雷达数据读取与统计:
from nuscenes.utils.data_classes import RadarPointCloud
import numpy as np
import matplotlib.pyplot as plt


points_list = []
radar_sensor = [ 'RADAR_BACK_LEFT',
  'RADAR_BACK_RIGHT',
  'RADAR_FRONT',
  'RADAR_FRONT_LEFT',
  'RADAR_FRONT_RIGHT']
# RadarPointCloud的接口由nuscenes提供
for sample in nusc.sample:
  pts = []
  for sensor in radar_sensor:
    sensor_token = sample['data'][sensor]
    points = RadarPointCloud.from_file(str(nusc.get_sample_data_path(sensor_token))).points.transpose(1,0).astype(np.float32)
    pts.append(points)
  points_list.append(np.concatenate(pts, axis=0))
print('total points {}'.format(len(points_list)))
point_num = 0
min_points = 2000
max_points = -2
for idx, points in enumerate(points_list):
  point_num += points.shape[0]
  min_points = min(points.shape[0], min_points)
  max_points = max(points.shape[0], max_points)
point_num = point_num*1.0 / len(points_list)
print(f'max_points{max_points} min_points{min_points} average_points{point_num}')
  • 输出
total points 404
max_points 323 min_points 97 average_points 196.82920792079207
  • 统计数据
data_dis = [num.shape[0] for num in points_list]

plt.figure(figsize=(10,5))
plt.bar(range(len(data_dis)), data_dis)
输出结果

NuScenes数据集关于Radar数据的统计_第1张图片

 总结
  1. 如上图所示的逐帧,逐传感器的统计数据中,各传感器分布:radar_front的数据密度较高,高于平均值
  2. radar_back的后置雷达数据密度较高,甚至出现某帧0个反射点
  3. 整体分布不均匀,且存在某单个传感器点云为0的现象
  4. 整体分布较为平均,平均每帧的雷达点云数量在200左右

你可能感兴趣的:(毫米波雷达,python,机器学习,开发语言)