예제 #1
0
# In[39]:

#c
#level5data.render_sample_data(my_sample_data['prev'],underlay_map = True)
#level5data.render_sample_data(my_sample_data['token'],0,0,40,None,1,'/home/ee904-pc4/dataset/',0)
#while my_sample_data :
#print("aaa")
#my_sample_data = level5data.get('sample_data', my_sample['data'][sensor_channel])
#    next_sample_data = level5data.get('sample_data', my_sample_data["next"])
#   level5data.render_sample_data(next_sample_data['token'],0,0,40,None,1,'/home/ee904-pc4/dataset/',0)
#   my_sample_data = next_sample_data

#my_sample_data['token'] = my_sample_data['next']
#level5data.render_sample_data(my_sample_data['next'],underlay_map = True)
'''

# ### 4. `sample_annotation`

# `sample_annotation` refers to any ***bounding box defining the position of an object seen in a sample***. All location data is given with respect to the global coordinate system. Let's examine an example from our `sample` above.

# In[ ]:


my_annotation_token = my_sample['anns'][16]
my_annotation =  my_sample_data.get('sample_annotation', my_annotation_token)
#my_annotation


# We can also render an annotation to have a closer look.
예제 #2
0
my_sample
nusc.list_sample(my_sample['token'])

my_sample['data']

sensor = 'CAM_FRONT'
cam_front_data = nusc.get('sample_data', my_sample['data'][sensor])
cam_front_data

nusc.render_sample_data(cam_front_data['token'])

my_annotation_token = my_sample['anns'][18]
my_annotation_metadata = nusc.get('sample_annotation', my_annotation_token)
my_annotation_metadata

nusc.render_annotation(my_annotation_token)

my_instance = nusc.instance[599]
my_instance

instance_token = my_instance['token']
nusc.render_instance(instance_token)

print("First annotated sample of this instance:")
nusc.render_annotation(my_instance['first_annotation_token'])
print("Last annotated sample of this instance")
nusc.render_annotation(my_instance['last_annotation_token'])

nusc.list_categories()
nusc.category[9]