I am going to apply nusences dataset for 2D object tracking. However, I don’t know where the instance ID is mentioned. Could you help to clarify it?
@minhdo you can get object instances via
for my_instance in nusc.instance: instance_token = my_instance['token'] nusc.render_instance(instance_token)
Do check out the nuScenes tutorial for more details: https://www.nuscenes.org/nuscenes?tutorial=nuscenes
After usingexport_2d_annotations_as_json.py to get 2D bounding boxes from 3D, how can I get object trajectory in each scene? I would like to apply nuscene data for 2D object tracking
Each instance has a
first_annotation_token key, which you can use as the start and traverse through all the samples of that instance, e.g.:
ann_record = nusc.get('sample_annotation', my_instance['first_annotation_token']) ann_tokens_traverse = set() ann_tokens_traverse.add(ann_record['token']) while not ann_record['next'] == "": ann_record = nusc.get('sample_annotation', ann_record['next']) ann_tokens_traverse.add(ann_record['token'])
You could then match each annotation token of that instance across frames. Once you have that, you could use the centers of the 2D boxes of that instance as your 2D trajectory in the range view.
Thanks a lot. How can I get the trajectory of all instances in each scene?
Take a look at each
ann_record - there is a
translation key which gives the position of the instance for that particular sample