From 31e43a39e3323c223f5d7caa5dca328707193e4a Mon Sep 17 00:00:00 2001 From: kokseang Date: Thu, 23 Jan 2025 19:39:56 +0900 Subject: [PATCH] Fix format --- .../t4_dataset/annotation_files_generator.py | 98 +++++++++---------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/perception_dataset/t4_dataset/annotation_files_generator.py b/perception_dataset/t4_dataset/annotation_files_generator.py index 1cd1abf8..5117ac67 100644 --- a/perception_dataset/t4_dataset/annotation_files_generator.py +++ b/perception_dataset/t4_dataset/annotation_files_generator.py @@ -220,58 +220,58 @@ def _convert_to_t4_format( """Convert the annotations to the NuScenes format. Args: - scene_anno_dict (Dict[int, List[Dict[str, Any]]]): [description] - frame_index_to_sample_token (Dict[int, str]): [description] - frame_index_to_sample_data_token (Dict[int, str]): + scene_anno_dict (Dict[int, List[Dict[str, Any]]]): [description] + frame_index_to_sample_token (Dict[int, str]): [description] + frame_index_to_sample_data_token (Dict[int, str]): scene_anno_dict: { - 0: [ - { - "category_name" (str): category name of object, - "instance_id" (str): instance id of object, - "attribute_names" (List[str]): list of object attributes, - "three_d_bbox": { - "translation": { - "x" (float): x of object location, - "y" (float): y of object location, - "z" (float): z of object location, - }, - "velocity" (Optional[Dict[str, float]]): { - "x" (float): x of object velocity, - "y" (float): y of object velocity, - "z" (float): z of object velocity, - }, - "acceleration" (Optional[Dict[str, float]]): { - "x" (float): x of object acceleration, - "y" (float): y of object acceleration, - "z" (float): z of object acceleration, - }, - "size": { - "width" (float): width of object size, - "length" (float): length of object size, - "height" (float): height of object size, - }, - "rotation": { - "w" (float): w of object quaternion, - "x" (float): x of object quaternion, - "y" (float): y of object quaternion. - "z" (float): z of object quaternion, - }, - }, - "two_d_box": [ - "x" (float): x of left top corner, - "y" (float): y of left top corner, - "w" (float): width of bbox, - "h" (float): height of bbox, - ] - "sensor_id": id of the camera - "num_lidar_pts" (int): the number of lidar points in object, - "num_radar_pts" (int): the number of radar points in object, - }, - ... - ], - 1: []. ... + 0: [ + { + "category_name" (str): category name of object, + "instance_id" (str): instance id of object, + "attribute_names" (List[str]): list of object attributes, + "three_d_bbox": { + "translation": { + "x" (float): x of object location, + "y" (float): y of object location, + "z" (float): z of object location, + }, + "velocity" (Optional[Dict[str, float]]): { + "x" (float): x of object velocity, + "y" (float): y of object velocity, + "z" (float): z of object velocity, + }, + "acceleration" (Optional[Dict[str, float]]): { + "x" (float): x of object acceleration, + "y" (float): y of object acceleration, + "z" (float): z of object acceleration, + }, + "size": { + "width" (float): width of object size, + "length" (float): length of object size, + "height" (float): height of object size, + }, + "rotation": { + "w" (float): w of object quaternion, + "x" (float): x of object quaternion, + "y" (float): y of object quaternion. + "z" (float): z of object quaternion, + }, + }, + "two_d_box": [ + "x" (float): x of left top corner, + "y" (float): y of left top corner, + "w" (float): width of bbox, + "h" (float): height of bbox, + ] + "sensor_id": id of the camera + "num_lidar_pts" (int): the number of lidar points in object, + "num_radar_pts" (int): the number of radar points in object, + }, + ... + ], + 1: []. ... } """