Hi,
I run the code as follows to see the number of radar points of all objects annotations in one sample. But I find the number of radar points of all objects are really rare. I get the result below:
nusc = NuScenes(version=‘v1.0-mini’, dataroot=‘datapath’, verbose=True)
my_scene = nusc.scene[2]
first_sample_token = my_scene[‘first_sample_token’]
nusc.render_sample(first_sample_token)
plt.show()
my_sample = nusc.get(‘sample’, first_sample_token)
print(‘how many annotations does this sample have:’)
print(len(my_sample[‘anns’]))
my_anno_token = my_sample[‘anns’][22]
my_anno_metadata = nusc.get(‘sample_annotation’,my_anno_token)
print(‘The 22th annotation of this sample:’)
print(my_anno_metadata)
nusc.render_annotation(my_anno_token)
plt.title(‘The 22th object annotation in this sample’)
plt.show()
print(‘List out the number of radar points and lidar points of all objects annotations:’)
for i in my_sample[‘anns’]:
amd = nusc.get(‘sample_annotation’,i)
print(amd[‘num_radar_pts’], amd[‘num_lidar_pts’])
how many annotations does this sample have:
40
The 22th annotation of this sample:
{‘token’: ‘0e70ceb9294b47ee8039a5c2ba98f677’, ‘sample_token’: ‘8687ba92abd3406aa797115b874ebeba’, ‘instance_token’: ‘254ca291f1ee4223a0b1e392d4885fd2’, ‘visibility_token’: ‘4’, ‘attribute_tokens’: [‘c3246a1e22a14fcb878aa61e69ae3329’], ‘translation’: [1319.41, 1031.387, 1.821], ‘size’: [2.339, 6.418, 3.964], ‘rotation’: [0.3343250529872262, 0.0, 0.0, 0.9424578287356354], ‘prev’: ‘’, ‘next’: ‘6d88e84846bf4a53a37020db07122f52’, ‘num_lidar_pts’: 1389, ‘num_radar_pts’: 1, ‘category_name’: ‘vehicle.truck’}
List out the number of radar points and lidar points of all objects annotations:
0 5
0 7
0 26
1 0
0 7
1 3
0 21
0 25
0 24
0 1
0 5
0 50
4 2
1 8
5 473
0 2
2 0
0 1
2 0
9 335
0 7
0 24
1 1389
1 1
1 13
2 20
1 0
0 31
0 5
0 5
1 0
3 0
1 7
0 4
0 3
1 0
1 1
0 10
0 35
0 2445
The 22th annotation object is a big truck behind the ego vehicle, but the radar point is zero. And the radar point of the 39th annotation object which is a car just on the left side of the ego vehicle is also zero. But the lidar points for these two objects are quite normal. Is there anything wrong in the code or it’s true that the radar didn’t detect any of them? As my result shows, all the other objects also have very rare radar points.