diff --git a/tensorbay/opendataset/nuScenes/catalog.json b/tensorbay/opendataset/nuScenes/catalog.json index 73f5038ba..4b7c15080 100644 --- a/tensorbay/opendataset/nuScenes/catalog.json +++ b/tensorbay/opendataset/nuScenes/catalog.json @@ -98,21 +98,16 @@ ], "attributes": [ { - "name": "vehicle_motion", - "enum": ["moving", "parked", "stopped"], - "parentCategories": [ - "vehicle.bicycle", - "vehicle.bus.bendy", - "vehicle.bus.rigid", - "vehicle.car", - "vehicle.construction", - "vehicle.emergency.ambulance", - "vehicle.emergency.police", - "vehicle.motorcycle", - "vehicle.trailer", - "vehicle.truck" - ], - "description": "Motion of the vehicle." + "name": "num_lidar_pts", + "type": "integer", + "minimum": 0, + "description": "Number of lidar points in this box. Points are counted during the lidar sweep identified with this sample." + }, + { + "name": "num_radar_pts", + "type": "integer", + "minimum": 0, + "description": "Number of radar points in this box. Points are counted during the radar sweep identified with this sample. This number is summed across all radar sensors without any invalid point filtering." }, { "name": "cycle_rider", @@ -138,6 +133,23 @@ ], "description": "Motion of the pedestrain." }, + { + "name": "vehicle_motion", + "enum": ["moving", "parked", "stopped"], + "parentCategories": [ + "vehicle.bicycle", + "vehicle.bus.bendy", + "vehicle.bus.rigid", + "vehicle.car", + "vehicle.construction", + "vehicle.emergency.ambulance", + "vehicle.emergency.police", + "vehicle.motorcycle", + "vehicle.trailer", + "vehicle.truck" + ], + "description": "Motion of the vehicle." + }, { "name": "visibility", "enum": ["v0-40", "v40-60", "v60-80", "v80-100"], diff --git a/tensorbay/opendataset/nuScenes/loader.py b/tensorbay/opendataset/nuScenes/loader.py index e6f98366b..0c2a629d7 100644 --- a/tensorbay/opendataset/nuScenes/loader.py +++ b/tensorbay/opendataset/nuScenes/loader.py @@ -267,6 +267,8 @@ def _get_labeled_box( attributes["visibility"] = annotation_info["visibility"][ instance_annotation["visibility_token"] ]["level"] + attributes["num_lidar_pts"] = instance_annotation["num_lidar_pts"] + attributes["num_radar_pts"] = instance_annotation["num_radar_pts"] width, length, height = instance_annotation["size"] return LabeledBox3D(