diff --git a/dgp/utils/render_3d_to_2d.py b/dgp/utils/render_3d_to_2d.py new file mode 100644 index 00000000..a8dfc406 --- /dev/null +++ b/dgp/utils/render_3d_to_2d.py @@ -0,0 +1,420 @@ +# Copyright 2023 Toyota Motor Corporation. All rights reserved. +import json +import logging +import math +import os +import time +from collections import defaultdict +from multiprocessing import Pool +from typing import Optional, Tuple + +import numpy as np +from matplotlib import pyplot as plt + +from dgp.annotations import ANNOTATION_TYPE_TO_ANNOTATION_GROUP +from dgp.constants import ALL_ANNOTATION_TYPES, DATASET_SPLIT_NAME_TO_KEY +from dgp.datasets.synchronized_dataset import ( + SynchronizedScene, + SynchronizedSceneDataset, +) +from dgp.proto.dataset_pb2 import SceneDataset +from dgp.utils.camera import Camera +from dgp.utils.structures.bounding_box_3d import BoundingBox3D + +ANNOTATIONS_3D = 'bounding_box_3d' +ANNOTATIONS_2D = 'bounding_box_2d' +# The list of cameras' name +FRONT_CAMERA = ["CAMERA_21"] +# The list of Lidars' name +LIDAR = ["LIDAR"] +MAX_NUM_ITEMS = 2000 +LOGGING_SPAN = 200 +MIN_DIST = -20 +MAX_DIST = 100 +DIST_BIN = 10 + +# Define the class names from bounding_box_2d to bounding_box_3d if the class names are different. +ONTOLOGY_NAME_MAPPER_2D_to_3D = { + 'Pedestrian': 'Person', + 'Car': 'Car', +} + + +def render_bounding_box_3d_to_2d(bbox_3d: BoundingBox3D, camera: Camera) -> np.ndarray: + """Render the bounding box from 3d to 2d to get the centroid. + Parameters + ---------- + bbox_3d: BoundingBox3D + 3D bounding box (cuboid) that is centered at `pose` with extent `sizes. + camera: dgp.utils.camera.Camera + Camera used to render the bounding box. + Returns + ---------- + centroid: np.ndarray + Centroid in image plane. + Raises + ------ + TypeError + Raised if camera is not an instance of Camera. + """ + if not isinstance(camera, Camera): + raise TypeError('`camera` should be of type Camera') + points2d = camera.project(bbox_3d.corners) + corners = points2d.T + if (bbox_3d.corners[:, 2] <= 0).any(): + return None + # Get the centroid in image plane. + return camera.project(np.vstack([bbox_3d.pose.tvec, bbox_3d.pose.tvec, bbox_3d.pose.tvec])).astype(np.int32) + + +def render_bounding_boxes_3d_of_lidars( + dataset: SynchronizedSceneDataset, camera_datum_names: Optional[list[str]], lidar_datum_names: Optional[list[str]], + max_num_items: Optional[int] +) -> defaultdict[defaultdict[list]]: + """Load and project 3D bounding boxes to 2d image with given dataset, camera_datum_name and lidar_datum_names. + Parameters + ---------- + dataset: SynchronizedSceneDataset + A DGP dataset. + camera_datum_names: Optional[list[str]] + List of camera names. + If None, use all the cameras available in the DGP dataset. + lidar_datum_names: Optional[list[str]] + List of lidar names. + If None, use all the lidars available in the DGP dataset. + max_num_items: Optional[int] + If not None, then show only up to this number of items. This is useful for debugging a large dataset. + Default: None. + Returns + ------- + bbox_2d_from_3d: defaultdict[defaultdict[list]] + a dictionary with key is the camera name, value is a dictionary whose key is class_name of bounding_box_3d, + value is list of (bbox_3d, centroid_2d) + """ + ontology = dataset.dataset_metadata.ontology_table.get(ANNOTATIONS_3D, None) + if ontology is None: + id_to_name = dict() + elif ontology is not None: + id_to_name = ontology.contiguous_id_to_name + else: + id_to_name = ontology.contiguous_id_to_name + + if camera_datum_names is None: + camera_datum_names = sorted(dataset.list_datum_names_available_in_all_scenes(datum_type='image')) + if lidar_datum_names is None: + lidar_datum_names = sorted(dataset.list_datum_names_available_in_all_scenes(datum_type='point_cloud')) + + bbox_2d_from_3d = defaultdict(lambda: defaultdict(list)) + + st = time.time() + for idx, datums in enumerate(dataset): + # no temporal context + datums = datums[0] + if idx == max_num_items: + break + if idx % LOGGING_SPAN == 0: + logging.info(f"2D:Frame {idx + 1} of {len(dataset)} in {time.time() - st:.2f}s.") + + datums = {datum['datum_name']: datum for datum in datums} + lidar_datums = [datums[lidar_datum_name] for lidar_datum_name in lidar_datum_names] + camera_datums = [(camera_datum_name, datums[camera_datum_name]) for camera_datum_name in camera_datum_names] + + for camera_name, camera_datum in camera_datums: + rgb = np.array(camera_datum['rgb']).copy() + # Render 3D bboxes + if ANNOTATIONS_3D in camera_datum: + for i, bbox_3d in enumerate(camera_datum[ANNOTATIONS_3D]): + class_name = id_to_name[bbox_3d.class_id] + center_2d = render_bounding_box_3d_to_2d(bbox_3d, Camera(K=camera_datum['intrinsics'])) + bbox_2d_from_3d[camera_name][class_name].append((bbox_3d, center_2d)) + return bbox_2d_from_3d + + +def render_bounding_boxes_2d_of_cameras( + dataset: SynchronizedSceneDataset, camera_datum_names: Optional[list[str]], max_num_items: Optional[int] +) -> defaultdict[defaultdict[list]]: + """Load 2d bounding boxes with given dataset, camera_datum_name. + Parameters + ---------- + dataset: SynchronizedSceneDataset + A DGP dataset. + camera_datum_names: Optional[list[str]] + List of camera names. + If None, use all the cameras available in the DGP dataset. + max_num_items: Optional[int] + If not None, then show only up to this number of items. This is useful for debugging a large dataset. + Default: None. + Returns + ------- + bboxes_2d: defaultdict[defaultdict[list]] + a dictionary with key is the camera name, value is a dictionary whose key is class_name of bounding_box_2d, + value is list of boxes as (N, 4) np.ndarray in format ([left, top, width, height]) + """ + bboxes_2d = defaultdict(lambda: defaultdict(list)) + if len(dataset): + if max_num_items is not None: + if max_num_items > len(dataset): + logging.info( + "`max_num_items` is reduced to the dataset size, from {:d} to {:d}".format( + max_num_items, len(dataset) + ) + ) + max_num_items = len(dataset) + + ontology_table = dataset.dataset_metadata.ontology_table + + if ANNOTATIONS_2D in ontology_table: + ontology = ontology_table[ANNOTATIONS_2D] + + if camera_datum_names is None: + camera_datum_names = sorted(dataset.list_datum_names_available_in_all_scenes(datum_type='image')) + + st = time.time() + for idx, datums in enumerate(dataset): + # no temporal context + datums = datums[0] + if idx == max_num_items: + break + if idx % LOGGING_SPAN == 0: + logging.info(f"2D:Frame {idx + 1} of {len(dataset)} in {time.time() - st:.2f}s.") + datums = {datum['datum_name']: datum for datum in datums} + camera_datums = [(camera_datum_name, datums[camera_datum_name]) for camera_datum_name in camera_datum_names] + # Visualize bounding box 2d + if ANNOTATIONS_2D in dataset.requested_annotations: + for camera_datum_name, camera_datum in camera_datums: + for bbox in camera_datum[ANNOTATIONS_2D]: + bboxes_2d[camera_datum_name][ontology.contiguous_id_to_name[bbox.class_id]].append(bbox.ltwh) + return bboxes_2d + + +def associate_lidar_and_camera_2d_bboxes( + bboxes_from_camera: list[np.ndarray], bboxes_from_lidar: list[Tuple[np.ndarray, np.ndarray]] +) -> list[Tuple]: + """Associate 3d bounding boxes and 2d bounding boxes to the same object by checking + whether the projected centroid of 3d bounding box is inside the 2d bounding box or not. + Parameters + ---------- + bboxes_from_camera: list[np.ndarray] + A list of 2d bounding boxes. + bboxes_from_lidar: list[Tuple[np.ndarray, np.ndarray]] + A list of Tuple (centroid in 2d image, 3d bounding box). + Returns + ------- + associated: list[Tuple[bounding_box_2d, bounding_box_3d, centroid_2d]] + a dictionary with key is the camera name, value is a dictionary whose key is class_name of bounding_box_2d, + value is list of boxes as (N, 4) np.ndarray in format ([left, top, width, height]) + """ + associated = [] + if bboxes_from_camera and bboxes_from_lidar: + for bbox_camera in bboxes_from_camera: + l, t, w, h = bbox_camera + for bbox_lidar, bbox_centroid_2d in bboxes_from_lidar: + if bbox_centroid_2d is None: + continue + bbox_centroid_x, bbox_centroid_y = bbox_centroid_2d[0] + if bbox_centroid_x >= l and bbox_centroid_x < l + w and bbox_centroid_y >= t and bbox_centroid_y < t + h: + associated.append((bbox_camera, bbox_lidar, bbox_centroid_2d[0])) + break + return associated + + +def associate_3d_and_2d_annotations( + dataset: SynchronizedSceneDataset, camera_datum_names: Optional[list[str]], lidar_datum_names: Optional[list[str]], + max_num_items: Optional[int] +) -> defaultdict[defaultdict[list[Tuple]]]: + """Associate 3d bounding boxes and 2d bounding boxes to the same object with given dataset. + Parameters + ---------- + dataset: SynchronizedSceneDataset + A DGP dataset. + camera_datum_names: Optional[list[str]] + List of camera names. + If None, use all the cameras available in the DGP dataset. + lidar_datum_names: Optional[list[str]] + List of lidar names. + If None, use all the lidars available in the DGP dataset. + max_num_items: Optional[int] + If not None, then show only up to this number of items. This is useful for debugging a large dataset. + Default: None. + Returns + ------- + associated_bboxes: defaultdict[defaultdict[list[Tuple]]] + a dictionary with key is the camera name, value is a dictionary whose key is class_name of bounding_box_2d, + value is list of Tuple [bounding_box_2d, bounding_box_3d, centroid_2d] + """ + bboxes_2d_from_lidars = render_bounding_boxes_3d_of_lidars( + dataset, camera_datum_names, lidar_datum_names, max_num_items + ) + bboxes_2d_from_cameras = render_bounding_boxes_2d_of_cameras(dataset, camera_datum_names, max_num_items) + associated_bboxes = defaultdict(lambda: defaultdict(list)) + for camera_name in camera_datum_names: + bboxes_2d_from_lidar = bboxes_2d_from_lidars[camera_name] + bboxes_2d_from_camera = bboxes_2d_from_cameras[camera_name] + for name_2d, name_3d in ONTOLOGY_NAME_MAPPER_2D_to_3D.items(): + logging.info("{}: Associate {} to {}".format(camera_name, name_2d, name_3d)) + bboxes_from_lidar = None + if name_3d in bboxes_2d_from_lidar: + bboxes_from_lidar = bboxes_2d_from_lidar[name_3d] + bboxes_from_camera = None + if name_2d in bboxes_2d_from_camera: + bboxes_from_camera = bboxes_2d_from_camera[name_2d] + associated_bboxes[camera_name][name_2d] = associate_lidar_and_camera_2d_bboxes( + bboxes_from_camera, bboxes_from_lidar + ) + return associated_bboxes + + +def associate_3d_and_2d_annotations_scene( + scene_json: str, + camera_datum_names: Optional[list[str]], + lidar_datum_names: Optional[list[str]], + max_num_items: Optional[int] = MAX_NUM_ITEMS +) -> defaultdict[defaultdict[list[Tuple]]]: + """Associate 3d bounding boxes and 2d bounding boxes to the same object with given scene. + Parameters + ---------- + scene_json: str + Full path to the scene json. + camera_datum_names: Optional[list[str]] + List of camera names. + If None, use all the cameras available in the DGP dataset. + lidar_datum_names: Optional[list[str]] + List of lidar names. + If None, use all the lidars available in the DGP dataset. + max_num_items: Optional[int] + If not None, then show only up to this number of items. This is useful for debugging a large dataset. + Default: None. + Returns + ------- + associated_bboxes: defaultdict[defaultdict[list[Tuple]]] + a dictionary with key is the camera name, value is a dictionary whose key is class_name of bounding_box_2d, + value is list of Tuple [bounding_box_2d, bounding_box_3d, centroid_2d] + """ + datum_names = camera_datum_names + lidar_datum_names + dataset = SynchronizedScene( + scene_json, + datum_names=datum_names, + requested_annotations=[ANNOTATIONS_2D, ANNOTATIONS_3D], + only_annotated_datums=True + ) + return associate_3d_and_2d_annotations(dataset, camera_datum_names, lidar_datum_names, max_num_items) + + +def associate_3d_and_2d_annotations_dataset( + scenes_dataset_json: str, + camera_datum_names: Optional[list[str]], + lidar_datum_names: Optional[list[str]], + max_num_items: Optional[int] = MAX_NUM_ITEMS +) -> defaultdict[defaultdict[list[Tuple]]]: + """Associate 3d bounding boxes and 2d bounding boxes to the same object with given DGP dataset. + Parameters + ---------- + scenes_dataset_json: str + Full path to the dataset scene json. + camera_datum_names: Optional[list[str]] + List of camera names. + If None, use all the cameras available in the DGP dataset. + lidar_datum_names: Optional[list[str]] + List of lidar names. + If None, use all the lidars available in the DGP dataset. + max_num_items: Optional[int] + If not None, then show only up to this number of items. This is useful for debugging a large dataset. + Default: None. + Returns + ------- + associated_bboxes: defaultdict[defaultdict[list[Tuple]]] + a dictionary with key is the camera name, value is a dictionary whose key is class_name of bounding_box_2d, + value is list of Tuple [bounding_box_2d, bounding_box_3d, centroid_2d] + """ + datum_names = camera_datum_names + lidar_datum_names + dataset = SynchronizedSceneDataset( + scenes_dataset_json, + datum_names=datum_names, + requested_annotations=[ANNOTATIONS_2D, ANNOTATIONS_3D], + only_annotated_datums=True + ) + associated_bboxes = associate_3d_and_2d_annotations(dataset, camera_datum_names, lidar_datum_names, max_num_items) + return associated_bboxes + + +def draw_bounding_box_2d_distance_distribution( + scenes_dataset_json: str, + output_dir: str, + camera_datum_names: Optional[list[str]], + lidar_datum_names: Optional[list[str]], + max_num_items: Optional[int] = MAX_NUM_ITEMS +): + """Draw the distance's distributution histogram of 2d bounding boxes by associating bounding_box_3d of the same object. + Parameters + ---------- + scenes_dataset_json: str + Full path to the dataset scene json. + output_dir: str + Path to save the histogram picture. + camera_datum_names: Optional[list[str]] + List of camera names. + If None, use all the cameras available in the DGP dataset. + lidar_datum_names: Optional[list[str]] + List of lidar names. + If None, use all the lidars available in the DGP dataset. + max_num_items: Optional[int] + If not None, then show only up to this number of items. This is useful for debugging a large dataset. + Default: None. + """ + associated_bboxes = associate_3d_and_2d_annotations_dataset( + scenes_dataset_json, camera_datum_names, lidar_datum_names, max_num_items + ) + os.makedirs(output_dir, exist_ok=True) + # Summarize statistics per camera per class over all scenes. + for camera_name in camera_datum_names: + for name_2d, name_3d in ONTOLOGY_NAME_MAPPER_2D_to_3D.items(): + logging.info("Summarizing class {}".format(name_2d)) + summarize_3d_statistics_per_class(associated_bboxes[camera_name][name_2d], output_dir, camera_name, name_2d) + + +def summarize_3d_statistics_per_class( + associated_bboxes: list[Tuple], output_dir: str, camera_name: str, class_name: str +): + """Accumulate distances of the associated bounding boxes and draw the histogram. + Parameters + ---------- + associated_bboxes: list[Tuple] + A list of Tuple [bounding_box_2d, bounding_box_3d, centroid_2d] + output_dir: str + Path to save the histogram picture. + camera_name: str + camera name. + class_name: str + Class name. + """ + dist = [] + for _, bbox_lidar, __ in associated_bboxes: + dist.append( + int( + math.sqrt((bbox_lidar.pose.tvec[0]) * (bbox_lidar.pose.tvec[0]) + (bbox_lidar.pose.tvec[1]) * + (bbox_lidar.pose.tvec[1])) + ) + ) + draw_hist(dist, output_dir, xlable='Dist', title=f"dist_{camera_name}_{class_name}") + + +def draw_hist(data: list, output_dir: str, xlable: str, title: str): + """Draw the histogram of given data. + Parameters + ---------- + data: list + A list of Tuple [bounding_box_2d, bounding_box_3d, centroid_2d] + output_dir: str + Path to save the histogram picture. + xlable: str + The label name of x. + title: str + The tile of the picture. + """ + data = np.array(data) + bins = np.arange(MIN_DIST, MAX_DIST, DIST_BIN) # fixed bin size + plt.hist(data, bins=bins) + plt.title(f'Distribution {title}(fixed bin size)') + plt.xlabel(f'variable {xlable} (bin size = 10)') + plt.ylabel('count') + plt.savefig(os.path.join(output_dir, f'histogram_{title}.png')) diff --git a/tests/data/dgp/associate_2d_to_3d_scene/scene_01/bounding_box_2d/CAMERA_21/6d3e25d9abf1e015564f56ac176e8a7526cdd5ca.json b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/bounding_box_2d/CAMERA_21/6d3e25d9abf1e015564f56ac176e8a7526cdd5ca.json new file mode 100644 index 00000000..40e59d5d --- /dev/null +++ b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/bounding_box_2d/CAMERA_21/6d3e25d9abf1e015564f56ac176e8a7526cdd5ca.json @@ -0,0 +1,56 @@ +{ + "annotations": [ + { + "area": 127092, + "attributes": {}, + "box": { + "h": 534, + "w": 238, + "x": 173, + "y": 1275 + }, + "class_id": 0, + "instance_id": 21, + "iscrowd": false + }, + { + "area": 9800, + "attributes": {}, + "box": { + "h": 140, + "w": 70, + "x": 1306, + "y": 974 + }, + "class_id": 0, + "instance_id": 25, + "iscrowd": false + }, + { + "area": 2958, + "attributes": {}, + "box": { + "h": 87, + "w": 34, + "x": 1605, + "y": 966 + }, + "class_id": 0, + "instance_id": 26, + "iscrowd": false + }, + { + "area": 936, + "attributes": {}, + "box": { + "h": 52, + "w": 18, + "x": 1963, + "y": 1008 + }, + "class_id": 0, + "instance_id": 32, + "iscrowd": false + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/associate_2d_to_3d_scene/scene_01/bounding_box_3d/CAMERA_21/1345048_001.json b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/bounding_box_3d/CAMERA_21/1345048_001.json new file mode 100644 index 00000000..c72e5883 --- /dev/null +++ b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/bounding_box_3d/CAMERA_21/1345048_001.json @@ -0,0 +1,193 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.602, + "length": 0.923, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.5460047245395266, + "qx": -0.5463773062342265, + "qy": 0.44794882501102434, + "qz": -0.4502138716032509 + }, + "translation": { + "x": -0.021767233204855074, + "y": -0.33786151698734557, + "z": 23.655119181323926 + } + }, + "truncation": 0.0, + "width": 0.702 + }, + "class_id": 0, + "instance_id": 4081736164, + "num_points": 488 + }, + { + "attributes": {}, + "box": { + "height": 1.458, + "length": 1.003, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.515906332033461, + "qx": -0.5164238763720558, + "qy": 0.4821749584013948, + "qz": -0.4844113396394155 + }, + "translation": { + "x": -3.0012585309692668, + "y": 1.3998720942093428, + "z": 5.8925998920151414 + } + }, + "truncation": 0.0, + "width": 0.687 + }, + "class_id": 0, + "instance_id": 3157625369, + "num_points": 2506 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.6262508644615135, + "qx": -0.6261543455500395, + "qy": 0.32728740602920997, + "qz": -0.3295808613446478 + }, + "translation": { + "x": 21.405784649079266, + "y": -1.3684778965882174, + "z": 67.40673156544199 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 4002157367, + "num_points": 7 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.39744937852144224, + "qx": -0.39515948875230333, + "qy": -0.5856921452824387, + "qz": 0.5855319640432897 + }, + "translation": { + "x": 5.950197640790634, + "y": -1.4554172491242525, + "z": 41.890144866234095 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 3015682071, + "num_points": 75 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.5168602686509107, + "qx": -0.5173734033178335, + "qy": 0.4811559748520739, + "qz": -0.48339337200005283 + }, + "translation": { + "x": 1.1096138012673293, + "y": 6.686360433724587, + "z": -53.1512378533771 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 3306246368, + "num_points": 71 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.5168602686509107, + "qx": -0.5173734033178335, + "qy": 0.4811559748520739, + "qz": -0.48339337200005283 + }, + "translation": { + "x": 0.37169697588876716, + "y": 6.63103626392018, + "z": -53.30554597065748 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 279291877, + "num_points": 83 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.5021280729858156, + "qx": -0.5027080886060614, + "qy": 0.49645834492590357, + "qz": -0.49867934358967014 + }, + "translation": { + "x": 2.600034834051968, + "y": 9.379402753234501, + "z": -82.74383588414094 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 129671060, + "num_points": 29 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/associate_2d_to_3d_scene/scene_01/bounding_box_3d/LIDAR/1345048_001.json b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/bounding_box_3d/LIDAR/1345048_001.json new file mode 100644 index 00000000..2eaf4d18 --- /dev/null +++ b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/bounding_box_3d/LIDAR/1345048_001.json @@ -0,0 +1,193 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.602, + "length": 0.923, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.9945361181899448, + "qx": 0.005844301846375331, + "qy": -0.04575480638969989, + "qz": 0.09364962062841337 + }, + "translation": { + "x": 26.5559912338922, + "y": 0.19018018179900764, + "z": 0.996752776279834 + } + }, + "truncation": 0.0, + "width": 0.702 + }, + "class_id": 0, + "instance_id": 4081736164, + "num_points": 488 + }, + { + "attributes": {}, + "box": { + "height": 1.458, + "length": 1.003, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.9985009114869703, + "qx": 0.0028882970852891765, + "qy": -0.04603602841012219, + "qz": 0.029466448511131504 + }, + "translation": { + "x": 8.688338234722778, + "y": 3.041835891958385, + "z": 0.8581381595079947 + } + }, + "truncation": 0.0, + "width": 0.687 + }, + "class_id": 0, + "instance_id": 3157625369, + "num_points": 2506 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.9546205851977209, + "qx": 0.015040096910548492, + "qy": -0.04360566083379287, + "qz": 0.29423099793347873 + }, + "translation": { + "x": 70.372899118791, + "y": -20.94096488390045, + "z": -1.8244220886784461 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 4002157367, + "num_points": 7 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": 0.1857940747174927, + "qx": 0.045012389826135105, + "qy": 0.010076851391705489, + "qz": 0.9815054272025399 + }, + "translation": { + "x": 44.8594045019388, + "y": -5.654335267526108, + "z": 0.49063134648028495 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 3015682071, + "num_points": 75 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.998440882943295, + "qx": 0.00297904410121062, + "qy": -0.046030245144616705, + "qz": 0.03143477525898902 + }, + "translation": { + "x": -50.56086723143903, + "y": -1.4905566498621283, + "z": 0.9585148271079902 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 3306246368, + "num_points": 71 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.998440882943295, + "qx": 0.00297904410121062, + "qy": -0.046030245144616705, + "qz": 0.03143477525898902 + }, + "translation": { + "x": -50.71478800739544, + "y": -0.753365988206383, + "z": 1.0237169980551286 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 279291877, + "num_points": 83 + }, + { + "attributes": {}, + "box": { + "height": 1.7, + "length": 0.7, + "occlusion": 0, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.9989345200499858, + "qx": 0.0015970034043485057, + "qy": -0.04609889100571691, + "qz": 0.0014718969645083901 + }, + "translation": { + "x": -80.2643855030285, + "y": -3.192519044929213, + "z": 0.9625515506138242 + } + }, + "truncation": 0.0, + "width": 0.7 + }, + "class_id": 0, + "instance_id": 129671060, + "num_points": 29 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/associate_2d_to_3d_scene/scene_01/calibration/e10c7424d73936c7c8306cd02e927b7d2639c1a6.json b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/calibration/e10c7424d73936c7c8306cd02e927b7d2639c1a6.json new file mode 100644 index 00000000..dca87874 --- /dev/null +++ b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/calibration/e10c7424d73936c7c8306cd02e927b7d2639c1a6.json @@ -0,0 +1,94 @@ +{ + "extrinsics": [ + { + "reference_coordinate_system": "", + "rotation": { + "qw": 1.0, + "qx": 0.0, + "qy": 0.0, + "qz": 0.0 + }, + "translation": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + } + }, + { + "reference_coordinate_system": "", + "rotation": { + "qw": 0.4771700483160217, + "qx": -0.5252321849265068, + "qy": 0.519020460103825, + "qz": -0.4765056448233028 + }, + "translation": { + "x": 2.968057416879674, + "y": 0.009892013289572787, + "z": 2.801236669326528 + } + } + ], + "intrinsics": [ + { + "alpha": 0.0, + "beta": 0.0, + "cx": 0.0, + "cy": 0.0, + "equirectangular": 0, + "fisheye": 0, + "fov": 0.0, + "fx": 0.0, + "fy": 0.0, + "k1": 0.0, + "k2": 0.0, + "k3": 0.0, + "k4": 0.0, + "k5": 0.0, + "k6": 0.0, + "p1": 0.0, + "p2": 0.0, + "s1": 0.0, + "s2": 0.0, + "s3": 0.0, + "s4": 0.0, + "skew": 0.0, + "taux": 0.0, + "tauy": 0.0, + "w": 0.0, + "xi": 0.0 + }, + { + "alpha": 0.0, + "beta": 0.0, + "cx": 1344.739990234375, + "cy": 1073.77001953125, + "equirectangular": 0, + "fisheye": 0, + "fov": 0.0, + "fx": 1976.449951171875, + "fy": 1977.06005859375, + "k1": 0.0, + "k2": 0.0, + "k3": 0.0, + "k4": 0.0, + "k5": 0.0, + "k6": 0.0, + "p1": 0.0, + "p2": 0.0, + "s1": 0.0, + "s2": 0.0, + "s3": 0.0, + "s4": 0.0, + "skew": 0.0, + "taux": 0.0, + "tauy": 0.0, + "w": 0.0, + "xi": 0.0 + } + ], + "names": [ + "LIDAR", + "CAMERA_21" + ] +} \ No newline at end of file diff --git a/tests/data/dgp/associate_2d_to_3d_scene/scene_01/ontology/67f011a9c86852dfe1b2275cbbb6c0c7aa8d1848.json b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/ontology/67f011a9c86852dfe1b2275cbbb6c0c7aa8d1848.json new file mode 100644 index 00000000..f09afdf0 --- /dev/null +++ b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/ontology/67f011a9c86852dfe1b2275cbbb6c0c7aa8d1848.json @@ -0,0 +1,26 @@ +{ + "items": [ + { + "color": { + "b": 20, + "g": 60, + "r": 220 + }, + "id": 0, + "isthing": true, + "name": "Person", + "supercategory": "" + }, + { + "color": { + "b": 0, + "g": 142, + "r": 0 + }, + "id": 1, + "isthing": true, + "name": "Car", + "supercategory": "" + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/associate_2d_to_3d_scene/scene_01/ontology/e77320974afa353aa67d28a8c3c59c595dd9037f.json b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/ontology/e77320974afa353aa67d28a8c3c59c595dd9037f.json new file mode 100644 index 00000000..7dc3d7e8 --- /dev/null +++ b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/ontology/e77320974afa353aa67d28a8c3c59c595dd9037f.json @@ -0,0 +1,26 @@ +{ + "items": [ + { + "color": { + "b": 60, + "g": 20, + "r": 220 + }, + "id": 0, + "isthing": true, + "name": "Pedestrian", + "supercategory": "" + }, + { + "color": { + "b": 142, + "g": 0, + "r": 0 + }, + "id": 1, + "isthing": true, + "name": "Car", + "supercategory": "" + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/associate_2d_to_3d_scene/scene_01/point_cloud/LIDAR/1345048_001.npz b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/point_cloud/LIDAR/1345048_001.npz new file mode 100644 index 00000000..0039dbb0 Binary files /dev/null and b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/point_cloud/LIDAR/1345048_001.npz differ diff --git a/tests/data/dgp/associate_2d_to_3d_scene/scene_01/rgb/CAMERA_21/1345048_001.jpg b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/rgb/CAMERA_21/1345048_001.jpg new file mode 100644 index 00000000..08682c86 Binary files /dev/null and b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/rgb/CAMERA_21/1345048_001.jpg differ diff --git a/tests/data/dgp/associate_2d_to_3d_scene/scene_01/scene_6245881cb04e9f71ae6de99064e771dfa370329d.json b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/scene_6245881cb04e9f71ae6de99064e771dfa370329d.json new file mode 100644 index 00000000..f2e7696a --- /dev/null +++ b/tests/data/dgp/associate_2d_to_3d_scene/scene_01/scene_6245881cb04e9f71ae6de99064e771dfa370329d.json @@ -0,0 +1,123 @@ +{ + "creation_date": "2023-09-20T01:57:01.750472Z", + "data": [ + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_21/6d3e25d9abf1e015564f56ac176e8a7526cdd5ca.json", + "1": "bounding_box_3d/CAMERA_21/1345048_001.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_21/1345048_001.jpg", + "height": 1836, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.11017830669879913, + "qx": 0.10803831368684769, + "qy": 0.6982220411300659, + "qz": -0.6990525126457214 + }, + "translation": { + "x": 433.2738037109375, + "y": 807.4990844726562, + "z": -29.08929443359375 + } + }, + "width": 2692 + } + }, + "id": { + "index": "0", + "log": "dummy", + "name": "CAMERA_21", + "timestamp": "2023-04-26T22:35:22.999530Z" + }, + "key": "957a17d7c7c4e17a3693543306fb97af98c75b34", + "next_key": "7d1bb4ffb684d380f998dd09c61a182909e271c2", + "prev_key": "" + }, + { + "datum": { + "point_cloud": { + "annotations": { + "1": "bounding_box_3d/LIDAR/1345048_001.json" + }, + "filename": "point_cloud/LIDAR/1345048_001.npz", + "metadata": {}, + "point_fields": [], + "point_format": [ + "X", + "Y", + "Z", + "INTENSITY" + ], + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": 0.5861750245094299, + "qx": -0.036432359367609024, + "qy": -0.02829030528664589, + "qz": -0.8088703155517578 + }, + "translation": { + "x": 434.11273193359375, + "y": 810.062744140625, + "z": -32.15201187133789 + } + } + } + }, + "id": { + "index": "0", + "log": "dummy", + "name": "LIDAR", + "timestamp": "2023-04-26T22:35:23.070990Z" + }, + "key": "02eabaf3ca2fb9d13ece23c0f9ae74be098b2617", + "next_key": "b9442c27d742b2ac0fc232bea2db933518a8b933", + "prev_key": "" + } + ], + "description": "", + "log": "", + "metadata": {}, + "name": "dummy", + "ontologies": { + "0": "e77320974afa353aa67d28a8c3c59c595dd9037f", + "1": "67f011a9c86852dfe1b2275cbbb6c0c7aa8d1848" + }, + "samples": [ + { + "calibration_key": "e10c7424d73936c7c8306cd02e927b7d2639c1a6", + "datum_keys": [ + "957a17d7c7c4e17a3693543306fb97af98c75b34", + "02eabaf3ca2fb9d13ece23c0f9ae74be098b2617" + ], + "id": { + "index": "0", + "log": "dummy", + "name": "1345048_001", + "timestamp": "2023-04-26T22:35:23.070990Z" + }, + "metadata": {} + } + ], + "statistics": { + "image_statistics": { + "count": "10", + "mean": [ + 117.7092, + 127.629196, + 117.40488 + ], + "stddev": [ + 7.1080227, + 6.942289, + 7.652583 + ] + } + } +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_01/15616458249936530.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_01/15616458249936530.json new file mode 100644 index 00000000..afc86af1 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_01/15616458249936530.json @@ -0,0 +1,82 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 2.535, + "length": 6.5809999999999995, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.5304017664397861, + "qx": 0.5193498394978048, + "qy": -0.4767493205222065, + "qz": 0.47080759950618184 + }, + "translation": { + "x": 5.806082944058559, + "y": -1.963184294101893, + "z": 79.99168241572625 + } + }, + "truncation": 0.0, + "width": 2.925 + }, + "class_id": 1, + "instance_id": 443946110, + "num_points": 190 + }, + { + "attributes": {}, + "box": { + "height": 1.584, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.5788441361321942, + "qx": 0.5785921399924261, + "qy": -0.4071231246510714, + "qz": 0.4054890417492277 + }, + "translation": { + "x": 8.886862881455494, + "y": -1.7219724069470885, + "z": 92.19259417685407 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 3215172593, + "num_points": 40 + }, + { + "attributes": {}, + "box": { + "height": 1.4969999999999999, + "length": 4.433, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.4844158364565127, + "qx": 0.47549688764560166, + "qy": 0.527733051586114, + "qz": -0.5106288608109525 + }, + "translation": { + "x": 0.7758863153653035, + "y": -0.9747296183397793, + "z": 69.245671238054 + } + }, + "truncation": 0.0, + "width": 2.117 + }, + "class_id": 2, + "instance_id": 3357023490, + "num_points": 31 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_01/15616458250936520.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_01/15616458250936520.json new file mode 100644 index 00000000..87020724 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_01/15616458250936520.json @@ -0,0 +1,82 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 2.535, + "length": 6.5809999999999995, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.5277507467813652, + "qx": 0.522005802646785, + "qy": -0.47526749989490125, + "qz": 0.47234510140198016 + }, + "translation": { + "x": 5.755194512655734, + "y": -2.103753196565094, + "z": 79.0251873956995 + } + }, + "truncation": 0.0, + "width": 2.925 + }, + "class_id": 1, + "instance_id": 443946110, + "num_points": 208 + }, + { + "attributes": {}, + "box": { + "height": 1.584, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.5859698881373695, + "qx": 0.5866789138823866, + "qy": -0.396884821455614, + "qz": 0.39361095094040194 + }, + "translation": { + "x": 8.99858874257311, + "y": -1.8919932155365586, + "z": 91.35045110808187 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 3215172593, + "num_points": 45 + }, + { + "attributes": {}, + "box": { + "height": 1.4969999999999999, + "length": 4.433, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.4838980233873106, + "qx": 0.4760665485686835, + "qy": 0.528085896485396, + "qz": -0.5102240980480743 + }, + "translation": { + "x": 0.6018264442741881, + "y": -1.0368721626507522, + "z": 66.94405907872215 + } + }, + "truncation": 0.0, + "width": 2.117 + }, + "class_id": 2, + "instance_id": 3357023490, + "num_points": 39 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_01/15616458251936472.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_01/15616458251936472.json new file mode 100644 index 00000000..49256b91 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_01/15616458251936472.json @@ -0,0 +1,82 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 2.535, + "length": 6.5809999999999995, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.5251036316795, + "qx": 0.524614597848685, + "qy": -0.4735143308462214, + "qz": 0.47416229099783813 + }, + "translation": { + "x": 5.703597680610184, + "y": -2.1929068961642315, + "z": 78.07271328987281 + } + }, + "truncation": 0.0, + "width": 2.925 + }, + "class_id": 1, + "instance_id": 443946110, + "num_points": 207 + }, + { + "attributes": {}, + "box": { + "height": 1.584, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.5931218762695512, + "qx": 0.5945991847651969, + "qy": -0.38604426784487683, + "qz": 0.3816124639358163 + }, + "translation": { + "x": 9.130798986741596, + "y": -2.005049399226664, + "z": 90.51716573938165 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 3215172593, + "num_points": 54 + }, + { + "attributes": {}, + "box": { + "height": 1.4969999999999999, + "length": 4.433, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.4836206853503111, + "qx": 0.4764069299029632, + "qy": 0.5283638291610611, + "qz": -0.5098814900307627 + }, + "translation": { + "x": 0.42496718948661716, + "y": -1.0515032728378628, + "z": 64.62893064112268 + } + }, + "truncation": 0.0, + "width": 2.117 + }, + "class_id": 2, + "instance_id": 3357023490, + "num_points": 53 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_05/15616458249936530.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_05/15616458249936530.json new file mode 100644 index 00000000..fc4e11dc --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_05/15616458249936530.json @@ -0,0 +1,134 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.6085607524096444, + "qx": -0.6168654299590625, + "qy": 0.3443959285004715, + "qz": -0.3612786962724606 + }, + "translation": { + "x": -15.658014313603644, + "y": -2.398683867584168, + "z": 62.66901499037658 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 715214751, + "num_points": 1 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.6085607524096444, + "qx": -0.6168654299590625, + "qy": 0.3443959285004715, + "qz": -0.3612786962724606 + }, + "translation": { + "x": -7.600298214896611, + "y": -2.501357225385391, + "z": 63.79046470134767 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2110970748, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.1931768575779799, + "qx": -0.19797931305576566, + "qy": 0.6649796253559954, + "qz": -0.6937499485835412 + }, + "translation": { + "x": -12.789521250117787, + "y": -1.873435912426885, + "z": 86.38273659054607 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2556950328, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 3.404, + "length": 8.859, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.6095396539841155, + "qx": -0.6146473106223558, + "qy": 0.34640743044642597, + "qz": -0.3614858031750856 + }, + "translation": { + "x": -19.62596820971453, + "y": -3.1794260477743137, + "z": 62.56267813690306 + } + }, + "truncation": 0.0, + "width": 3.266 + }, + "class_id": 1, + "instance_id": 3527146084, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.049684604339896854, + "qx": 0.04755974491532822, + "qy": 0.6908279001037925, + "qz": -0.7197404554374887 + }, + "translation": { + "x": -24.040295358825006, + "y": -3.302248895042567, + "z": 70.59089751412534 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 3668932913, + "num_points": 0 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_05/15616458250936520.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_05/15616458250936520.json new file mode 100644 index 00000000..38347d63 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_05/15616458250936520.json @@ -0,0 +1,134 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.6084948742897922, + "qx": -0.616920832548318, + "qy": 0.3450407277809002, + "qz": -0.3606793180976261 + }, + "translation": { + "x": -16.663888781563628, + "y": -2.4397240008759127, + "z": 61.876856345466194 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 715214751, + "num_points": 1 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.6084948742897922, + "qx": -0.616920832548318, + "qy": 0.3450407277809002, + "qz": -0.3606793180976261 + }, + "translation": { + "x": -8.60638646596476, + "y": -2.5551467801967647, + "z": 62.998602313204174 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2110970748, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.19355747052926098, + "qx": -0.1975823588507192, + "qy": 0.6654831315179182, + "qz": -0.6932740574537652 + }, + "translation": { + "x": -13.795861903038485, + "y": -1.9429694554685284, + "z": 85.59124832050247 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2556950328, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 3.404, + "length": 8.859, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.609475013071249, + "qx": -0.6147017641821768, + "qy": 0.3470507639096846, + "qz": -0.3608846309041527 + }, + "translation": { + "x": -20.632956768612758, + "y": -3.214644676169655, + "z": 61.76951920752299 + } + }, + "truncation": 0.0, + "width": 3.266 + }, + "class_id": 1, + "instance_id": 3527146084, + "num_points": 1 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.049159707046413204, + "qx": 0.048100627878299995, + "qy": 0.6911618973723336, + "qz": -0.7194198248738366 + }, + "translation": { + "x": -25.047868856747755, + "y": -3.33936220910482, + "z": 69.79738771610073 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 3668932913, + "num_points": 0 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_05/15616458251936472.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_05/15616458251936472.json new file mode 100644 index 00000000..50da6904 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_05/15616458251936472.json @@ -0,0 +1,134 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.6083291788415417, + "qx": -0.617056447055441, + "qy": 0.34552583103455414, + "qz": -0.36026219813515314 + }, + "translation": { + "x": -17.665622983127605, + "y": -2.486603603194226, + "z": 61.08775079653992 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 715214751, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.6083291788415417, + "qx": -0.617056447055441, + "qy": 0.34552583103455414, + "qz": -0.36026219813515314 + }, + "translation": { + "x": -9.60833094364989, + "y": -2.610352334396566, + "z": 62.210119382209314 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2110970748, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.19373679932244514, + "qx": -0.1973506695723212, + "qy": 0.6659292865792363, + "qz": -0.6928614227128831 + }, + "translation": { + "x": -14.799351314606838, + "y": -2.016296623291055, + "z": 84.80289422994338 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2556950328, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 3.404, + "length": 8.859, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.6093104339865528, + "qx": -0.6148369658142916, + "qy": 0.34753502442223594, + "qz": -0.3604659585914189 + }, + "translation": { + "x": -21.635371438198945, + "y": -3.2578706629249155, + "z": 60.97926888085044 + } + }, + "truncation": 0.0, + "width": 3.266 + }, + "class_id": 1, + "instance_id": 3527146084, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.04884609845567672, + "qx": 0.04846717328825534, + "qy": 0.6915003175778534, + "qz": -0.7190913033605907 + }, + "translation": { + "x": -26.05113708097997, + "y": -3.3867309426168504, + "z": 69.00660248649751 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 3668932913, + "num_points": 0 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_06/15616458249936530.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_06/15616458249936530.json new file mode 100644 index 00000000..a3799438 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_06/15616458249936530.json @@ -0,0 +1,30 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 2.343, + "length": 6.236, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.6281455293825682, + "qx": 0.6172186407074127, + "qy": -0.3414068929660027, + "qz": 0.3285052159635969 + }, + "translation": { + "x": -2.815619609081068, + "y": 0.016023213189555463, + "z": 23.1623846354089 + } + }, + "truncation": 0.0, + "width": 2.747 + }, + "class_id": 2, + "instance_id": 1740587446, + "num_points": 3126 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_06/15616458250936520.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_06/15616458250936520.json new file mode 100644 index 00000000..c5f1e2f7 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_06/15616458250936520.json @@ -0,0 +1,30 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 2.343, + "length": 6.236, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.6275663593811421, + "qx": 0.6177853908061366, + "qy": -0.34120343813383097, + "qz": 0.3287581014747193 + }, + "translation": { + "x": -1.7997894739946787, + "y": -0.023757241389148476, + "z": 22.397718576682337 + } + }, + "truncation": 0.0, + "width": 2.747 + }, + "class_id": 2, + "instance_id": 1740587446, + "num_points": 3539 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_06/15616458251936472.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_06/15616458251936472.json new file mode 100644 index 00000000..dd06e906 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_06/15616458251936472.json @@ -0,0 +1,30 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 2.343, + "length": 6.236, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.6271662219401032, + "qx": 0.6181580223983153, + "qy": -0.3409676597891742, + "qz": 0.3290657143791756 + }, + "translation": { + "x": -0.7896143632035546, + "y": -0.04930589464447621, + "z": 21.63727011272067 + } + }, + "truncation": 0.0, + "width": 2.747 + }, + "class_id": 2, + "instance_id": 1740587446, + "num_points": 3649 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_07/15616458249936530.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_07/15616458249936530.json new file mode 100644 index 00000000..7888aca0 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_07/15616458249936530.json @@ -0,0 +1,30 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.94, + "length": 4.276, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.28574619093218734, + "qx": 0.27310598830227506, + "qy": 0.6518881238355256, + "qz": -0.647150761046747 + }, + "translation": { + "x": -7.1185863677576435, + "y": -3.1020348387824015, + "z": 99.49680207834444 + } + }, + "truncation": 0.0, + "width": 1.9060000000000001 + }, + "class_id": 2, + "instance_id": 1793247213, + "num_points": 0 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_07/15616458250936520.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_07/15616458250936520.json new file mode 100644 index 00000000..2038f640 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_07/15616458250936520.json @@ -0,0 +1,30 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.94, + "length": 4.276, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.2854611217802568, + "qx": 0.2734216595365504, + "qy": 0.6513564686963327, + "qz": -0.6476783883500212 + }, + "translation": { + "x": -8.186482909337428, + "y": -2.991190405032512, + "z": 100.20658820074686 + } + }, + "truncation": 0.0, + "width": 1.9060000000000001 + }, + "class_id": 2, + "instance_id": 1793247213, + "num_points": 0 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_07/15616458251936472.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_07/15616458251936472.json new file mode 100644 index 00000000..c3d92c9e --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_07/15616458251936472.json @@ -0,0 +1,30 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.94, + "length": 4.276, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.28516826788262606, + "qx": 0.27377457661689925, + "qy": 0.6510061774570789, + "qz": -0.6480104143482452 + }, + "translation": { + "x": -9.252877356124372, + "y": -2.9315270671982034, + "z": 100.91046259791028 + } + }, + "truncation": 0.0, + "width": 1.9060000000000001 + }, + "class_id": 2, + "instance_id": 1793247213, + "num_points": 0 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_08/15616458249936530.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_08/15616458249936530.json new file mode 100644 index 00000000..57879a34 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_08/15616458249936530.json @@ -0,0 +1,3 @@ +{ + "annotations": [] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_08/15616458250936520.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_08/15616458250936520.json new file mode 100644 index 00000000..57879a34 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_08/15616458250936520.json @@ -0,0 +1,3 @@ +{ + "annotations": [] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_08/15616458251936472.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_08/15616458251936472.json new file mode 100644 index 00000000..57879a34 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_08/15616458251936472.json @@ -0,0 +1,3 @@ +{ + "annotations": [] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_09/15616458249936530.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_09/15616458249936530.json new file mode 100644 index 00000000..408ceec1 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_09/15616458249936530.json @@ -0,0 +1,82 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.526, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.510626950101513, + "qx": -0.5149086256931243, + "qy": 0.48081794500737773, + "qz": -0.49289281672157514 + }, + "translation": { + "x": 6.496073126167644, + "y": -0.19000261537121332, + "z": 140.2667667453279 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 497050057, + "num_points": 7 + }, + { + "attributes": {}, + "box": { + "height": 2.048, + "length": 4.542, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.4927802725071928, + "qx": 0.49636663786461394, + "qy": 0.5074664777899055, + "qz": -0.5032549431075908 + }, + "translation": { + "x": 0.36808857684525265, + "y": 0.9251738487239436, + "z": 21.94803691434481 + } + }, + "truncation": 0.0, + "width": 2.504 + }, + "class_id": 2, + "instance_id": 1545514913, + "num_points": 1341 + }, + { + "attributes": {}, + "box": { + "height": 2.0, + "length": 5.089, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.5083657579311281, + "qx": -0.5029377373290085, + "qy": 0.4829267506612237, + "qz": -0.5053707965734467 + }, + "translation": { + "x": 5.494641292804232, + "y": 0.8362237023932266, + "z": 103.38875661967359 + } + }, + "truncation": 0.0, + "width": 2.493 + }, + "class_id": 2, + "instance_id": 1868710109, + "num_points": 12 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_09/15616458250936520.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_09/15616458250936520.json new file mode 100644 index 00000000..cb8fba44 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_09/15616458250936520.json @@ -0,0 +1,82 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.526, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.5110033758938265, + "qx": -0.5145069646936269, + "qy": 0.4803835672811857, + "qz": -0.49334547873986556 + }, + "translation": { + "x": 6.587505057119074, + "y": 0.0763385686213951, + "z": 143.04421770245926 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 497050057, + "num_points": 8 + }, + { + "attributes": {}, + "box": { + "height": 2.048, + "length": 4.542, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.4963056322398272, + "qx": 0.4929351041320033, + "qy": 0.5062590305632801, + "qz": -0.5043783267494003 + }, + "translation": { + "x": 0.3444414355228247, + "y": 0.9716794761195615, + "z": 21.80972129868769 + } + }, + "truncation": 0.0, + "width": 2.504 + }, + "class_id": 2, + "instance_id": 1545514913, + "num_points": 1389 + }, + { + "attributes": {}, + "box": { + "height": 2.0, + "length": 5.089, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.5087312309110361, + "qx": -0.5025377667773864, + "qy": 0.48248285467410124, + "qz": -0.5058246955257033 + }, + "translation": { + "x": 5.568406914071616, + "y": 1.0255390290080868, + "z": 106.24567205917538 + } + }, + "truncation": 0.0, + "width": 2.493 + }, + "class_id": 2, + "instance_id": 1868710109, + "num_points": 17 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_09/15616458251936472.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_09/15616458251936472.json new file mode 100644 index 00000000..03868359 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/CAMERA_09/15616458251936472.json @@ -0,0 +1,82 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 1.526, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.5113636204288473, + "qx": -0.5140982950858334, + "qy": 0.48015003779819027, + "qz": -0.49362549761346286 + }, + "translation": { + "x": 6.672995694725429, + "y": 0.2916503562632897, + "z": 145.84531062152428 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 497050057, + "num_points": 11 + }, + { + "attributes": {}, + "box": { + "height": 2.048, + "length": 4.542, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.49969560307001426, + "qx": 0.4896193049750717, + "qy": 0.5050215103046456, + "qz": -0.5055002617188625 + }, + "translation": { + "x": 0.318628403642208, + "y": 1.0065267573140773, + "z": 21.636380245882265 + } + }, + "truncation": 0.0, + "width": 2.504 + }, + "class_id": 2, + "instance_id": 1545514913, + "num_points": 1411 + }, + { + "attributes": {}, + "box": { + "height": 2.0, + "length": 5.089, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.5090850396952281, + "qx": -0.5021296650849186, + "qy": 0.48223984199809233, + "qz": -0.5061056772946453 + }, + "translation": { + "x": 5.638415631753617, + "y": 1.178199992531745, + "z": 109.12765734907634 + } + }, + "truncation": 0.0, + "width": 2.493 + }, + "class_id": 2, + "instance_id": 1868710109, + "num_points": 12 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/LIDAR/15616458250027900.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/LIDAR/15616458250027900.json new file mode 100644 index 00000000..b2334515 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/LIDAR/15616458250027900.json @@ -0,0 +1,342 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 2.535, + "length": 6.5809999999999995, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.9997595245843511, + "qx": -0.011796705976182834, + "qy": 0.0063950714667915, + "qz": -0.01734456087420122 + }, + "translation": { + "x": 81.65145121268597, + "y": -0.10194900923829664, + "z": 2.8571381300696785 + } + }, + "truncation": 0.0, + "width": 2.925 + }, + "class_id": 1, + "instance_id": 443946110, + "num_points": 190 + }, + { + "attributes": {}, + "box": { + "height": 1.526, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.017323969936230088, + "qx": -0.006450643117770046, + "qy": -0.015001750579201764, + "qz": -0.9997165682074973 + }, + "translation": { + "x": -140.2143312938024, + "y": 4.272096955986058, + "z": 4.6217691616556635 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 497050057, + "num_points": 7 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.9822822496497678, + "qx": 0.0006012872284046553, + "qy": -0.011873938590447728, + "qz": -0.18703002448540557 + }, + "translation": { + "x": 28.029121113358087, + "y": 59.38059836733623, + "z": 2.722515277987 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 715214751, + "num_points": 1 + }, + { + "attributes": {}, + "box": { + "height": 2.048, + "length": 4.542, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.9998685613568776, + "qx": -0.007044895414966162, + "qy": 0.014414877829238967, + "qz": -0.002332542794719006 + }, + "translation": { + "x": -21.857910325578814, + "y": 0.11974173075759609, + "z": 1.0674473309452992 + } + }, + "truncation": 0.0, + "width": 2.504 + }, + "class_id": 2, + "instance_id": 1545514913, + "num_points": 1341 + }, + { + "attributes": {}, + "box": { + "height": 2.343, + "length": 6.236, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.7280698407397354, + "qx": -0.01005839339450611, + "qy": 0.00041911527015593686, + "qz": -0.685429033576729 + }, + "translation": { + "x": 17.649988992246108, + "y": -17.24356762386833, + "z": 1.7026659926518306 + } + }, + "truncation": 0.0, + "width": 2.747 + }, + "class_id": 2, + "instance_id": 1740587446, + "num_points": 3126 + }, + { + "attributes": {}, + "box": { + "height": 1.94, + "length": 4.276, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.6445804388531142, + "qx": -0.014832522774785596, + "qy": -0.007172481739316183, + "qz": -0.7643589533862752 + }, + "translation": { + "x": -60.11799661699115, + "y": 79.25966132119754, + "z": 3.0702808718010246 + } + }, + "truncation": 0.0, + "width": 1.9060000000000001 + }, + "class_id": 2, + "instance_id": 1793247213, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 2.0, + "length": 5.089, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.0028450651807097604, + "qx": 0.0034936742113693634, + "qy": -0.015094914866918085, + "qz": -0.9998759139962237 + }, + "translation": { + "x": -103.35439841583684, + "y": 3.8771678272361214, + "z": 2.8237101483989306 + } + }, + "truncation": 0.0, + "width": 2.493 + }, + "class_id": 2, + "instance_id": 1868710109, + "num_points": 12 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.9822822496497678, + "qx": 0.0006012872284046553, + "qy": -0.011873938590447728, + "qz": -0.18703002448540557 + }, + "translation": { + "x": 35.048003103286646, + "y": 55.269874902976426, + "z": 2.902037452192218 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2110970748, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.5765007273122139, + "qx": -0.00439525827832565, + "qy": -0.026908650716228156, + "qz": -0.8166416090487846 + }, + "translation": { + "x": 44.97602359193206, + "y": 76.19868118456338, + "z": 1.8284701255447047 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2556950328, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.584, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.9902671505582219, + "qx": -0.004616985525206665, + "qy": 0.002982862166245057, + "qz": -0.13907104840065682 + }, + "translation": { + "x": 94.02996499255823, + "y": -2.354662748855162, + "z": 2.526512346342976 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 3215172593, + "num_points": 40 + }, + { + "attributes": {}, + "box": { + "height": 1.4969999999999999, + "length": 4.433, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.005534684056901218, + "qx": -0.0005146409377720929, + "qy": 0.009972891192122744, + "qz": -0.9999348198049541 + }, + "translation": { + "x": 70.582664648422, + "y": 4.18605059878405, + "z": 1.934261997337785 + } + }, + "truncation": 0.0, + "width": 2.117 + }, + "class_id": 2, + "instance_id": 3357023490, + "num_points": 31 + }, + { + "attributes": {}, + "box": { + "height": 3.404, + "length": 8.859, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.9819429108289287, + "qx": 0.0031509310783181792, + "qy": -0.011428347079248644, + "qz": -0.18880567891138045 + }, + "translation": { + "x": 24.850070455509012, + "y": 61.771984869808875, + "z": 3.4576557479754726 + } + }, + "truncation": 0.0, + "width": 3.266 + }, + "class_id": 1, + "instance_id": 3527146084, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.26228015573107977, + "qx": -0.0059829183571183785, + "qy": -0.028969936496766668, + "qz": -0.9645382664140323 + }, + "translation": { + "x": 26.361219900605192, + "y": 70.80889357854721, + "z": 3.3914413650132786 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 3668932913, + "num_points": 0 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/LIDAR/15616458251018358.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/LIDAR/15616458251018358.json new file mode 100644 index 00000000..f3ec2fb1 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/LIDAR/15616458251018358.json @@ -0,0 +1,342 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 2.535, + "length": 6.5809999999999995, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.9998056582625341, + "qx": -0.007635264009049943, + "qy": 0.005473369111294217, + "qz": -0.017331782375318017 + }, + "translation": { + "x": 80.69873432533313, + "y": -0.11521452980355207, + "z": 2.992672327046421 + } + }, + "truncation": 0.0, + "width": 2.925 + }, + "class_id": 1, + "instance_id": 443946110, + "num_points": 208 + }, + { + "attributes": {}, + "box": { + "height": 1.526, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.017290622962113755, + "qx": -0.005602035997374068, + "qy": -0.015066085293856963, + "qz": -0.9997212934734288 + }, + "translation": { + "x": -142.98525967259366, + "y": 4.311714097269828, + "z": 4.408963987166089 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 497050057, + "num_points": 8 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.982283191624324, + "qx": 0.0008375504098016061, + "qy": -0.011056852275349787, + "qz": -0.18707425258277754 + }, + "translation": { + "x": 26.761804295217644, + "y": 59.383478758235015, + "z": 2.7588562831058425 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 715214751, + "num_points": 1 + }, + { + "attributes": {}, + "box": { + "height": 2.048, + "length": 4.542, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.9999066381871451, + "qx": -0.009334825727109627, + "qy": 0.009737085636859509, + "qz": -0.0021829111817008306 + }, + "translation": { + "x": -21.70739294041914, + "y": 0.09756964605071516, + "z": 1.0177069285959988 + } + }, + "truncation": 0.0, + "width": 2.504 + }, + "class_id": 2, + "instance_id": 1545514913, + "num_points": 1389 + }, + { + "attributes": {}, + "box": { + "height": 2.343, + "length": 6.236, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.7281010566370028, + "qx": -0.009535322296594569, + "qy": -0.0002518349050302551, + "qz": -0.6854034326817762 + }, + "translation": { + "x": 16.391540076474485, + "y": -17.24181445089289, + "z": 1.7335023692523706 + } + }, + "truncation": 0.0, + "width": 2.747 + }, + "class_id": 2, + "instance_id": 1740587446, + "num_points": 3539 + }, + { + "attributes": {}, + "box": { + "height": 1.94, + "length": 4.276, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.6446085560967735, + "qx": -0.014235686720161598, + "qy": -0.007779168410795493, + "qz": -0.7643406564937364 + }, + "translation": { + "x": -61.38762429350572, + "y": 79.2543752252891, + "z": 2.954207446589905 + } + }, + "truncation": 0.0, + "width": 1.9060000000000001 + }, + "class_id": 2, + "instance_id": 1793247213, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 2.0, + "length": 5.089, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.0028110119947967194, + "qx": 0.004341277045121877, + "qy": -0.015171059516490016, + "qz": -0.9998715369877927 + }, + "translation": { + "x": -106.20277958241695, + "y": 3.8991885273792377, + "z": 2.690975317250299 + } + }, + "truncation": 0.0, + "width": 2.493 + }, + "class_id": 2, + "instance_id": 1868710109, + "num_points": 17 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.982283191624324, + "qx": 0.0008375504098016061, + "qy": -0.011056852275349787, + "qz": -0.18707425258277754 + }, + "translation": { + "x": 33.780754438690565, + "y": 55.27343822045623, + "z": 2.950912684359672 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2110970748, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.576485623131715, + "qx": -0.003657097138682411, + "qy": -0.026484970623930716, + "qz": -0.8166697608544148 + }, + "translation": { + "x": 43.70863250209095, + "y": 76.20300110842595, + "z": 1.8908634040087406 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2556950328, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.584, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.9874512632407924, + "qx": -0.005030832976660219, + "qy": 0.0016755644614559065, + "qz": -0.15783499588957178 + }, + "translation": { + "x": 93.2124823385584, + "y": -2.521613192837549, + "z": 2.6894724984837097 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 3215172593, + "num_points": 45 + }, + { + "attributes": {}, + "box": { + "height": 1.4969999999999999, + "length": 4.433, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.005479747730854134, + "qx": 0.000331529693236729, + "qy": 0.009802472262804288, + "qz": -0.999936885003452 + }, + "translation": { + "x": 68.2887887939105, + "y": 4.205092543559658, + "z": 2.004088643699774 + } + }, + "truncation": 0.0, + "width": 2.117 + }, + "class_id": 2, + "instance_id": 3357023490, + "num_points": 39 + }, + { + "attributes": {}, + "box": { + "height": 3.404, + "length": 8.859, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.9819431921863968, + "qx": 0.0033886494619700357, + "qy": -0.010611569348107246, + "qz": -0.1888477666523602 + }, + "translation": { + "x": 23.581290806612742, + "y": 61.77468443182261, + "z": 3.4882350430095244 + } + }, + "truncation": 0.0, + "width": 3.266 + }, + "class_id": 1, + "instance_id": 3527146084, + "num_points": 1 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.2622601491748063, + "qx": -0.0051441635171359575, + "qy": -0.028824050158671843, + "qz": -0.96455291501761 + }, + "translation": { + "x": 25.091709815219474, + "y": 70.81172350293309, + "z": 3.4231562779591087 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 3668932913, + "num_points": 0 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/LIDAR/15616458252028828.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/LIDAR/15616458252028828.json new file mode 100644 index 00000000..c0544d2a --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/bounding_box_3d/LIDAR/15616458252028828.json @@ -0,0 +1,342 @@ +{ + "annotations": [ + { + "attributes": {}, + "box": { + "height": 2.535, + "length": 6.5809999999999995, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.9998333370202224, + "qx": -0.0031844023015159643, + "qy": 0.004888547333588338, + "qz": -0.017299129167596183 + }, + "translation": { + "x": 79.73384900473502, + "y": -0.12787212515945612, + "z": 3.072881183759229 + } + }, + "truncation": 0.0, + "width": 2.925 + }, + "class_id": 1, + "instance_id": 443946110, + "num_points": 207 + }, + { + "attributes": {}, + "box": { + "height": 1.526, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.017240523329003277, + "qx": -0.005091377056554247, + "qy": -0.014926566347134044, + "qz": -0.9997269826568133 + }, + "translation": { + "x": -145.80315832875885, + "y": 4.347755301631764, + "z": 4.289779777853482 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 497050057, + "num_points": 11 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.982278144652347, + "qx": 0.0008053065342827348, + "qy": -0.010529161621147247, + "qz": -0.18713133028781176 + }, + "translation": { + "x": 25.47502002845704, + "y": 59.38579856159845, + "z": 2.8011432379817833 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 715214751, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 2.048, + "length": 4.542, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.9999181252182221, + "qx": -0.011460283766955223, + "qy": 0.0053159700187135756, + "qz": -0.002035981045734936 + }, + "translation": { + "x": -21.547118185714226, + "y": 0.0742934572510876, + "z": 0.9850212640161189 + } + }, + "truncation": 0.0, + "width": 2.504 + }, + "class_id": 2, + "instance_id": 1545514913, + "num_points": 1411 + }, + { + "attributes": {}, + "box": { + "height": 2.343, + "length": 6.236, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.7281412078365146, + "qx": -0.009088845295078033, + "qy": -0.0005355176854917368, + "qz": -0.685366681100266 + }, + "translation": { + "x": 15.114571979048378, + "y": -17.240405591034232, + "z": 1.7450923989915452 + } + }, + "truncation": 0.0, + "width": 2.747 + }, + "class_id": 2, + "instance_id": 1740587446, + "num_points": 3649 + }, + { + "attributes": {}, + "box": { + "height": 1.94, + "length": 4.276, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.6446499863884391, + "qx": -0.013759286071331553, + "qy": -0.008010011030890935, + "qz": -0.7643120546082465 + }, + "translation": { + "x": -62.67683361705667, + "y": 79.24658887558508, + "z": 2.9113973251245966 + } + }, + "truncation": 0.0, + "width": 1.9060000000000001 + }, + "class_id": 2, + "instance_id": 1793247213, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 2.0, + "length": 5.089, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.002762262340376187, + "qx": 0.004853914601955211, + "qy": -0.015038369690662547, + "qz": -0.9998713201491722 + }, + "translation": { + "x": -109.10038776179044, + "y": 3.919094921384044, + "z": 2.6268693813098167 + } + }, + "truncation": 0.0, + "width": 2.493 + }, + "class_id": 2, + "instance_id": 1868710109, + "num_points": 12 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.982278144652347, + "qx": 0.0008053065342827348, + "qy": -0.010529161621147247, + "qz": -0.18713133028781176 + }, + "translation": { + "x": 32.49423958722673, + "y": 55.2765084221744, + "z": 2.9993132049770566 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2110970748, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.5764519996008381, + "qx": -0.003312810555209725, + "qy": -0.026082898781458752, + "qz": -0.8167079036188999 + }, + "translation": { + "x": 42.4208054871965, + "y": 76.20748063891801, + "z": 1.954917927571529 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 2556950328, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.584, + "length": 4.588, + "occlusion": 0, + "pose": { + "rotation": { + "qw": 0.9842128575794213, + "qx": -0.005269888399949194, + "qy": 0.0007407291651478987, + "qz": -0.1769088199381459 + }, + "translation": { + "x": 92.37904055134823, + "y": -2.709527094645182, + "z": 2.7907741686254326 + } + }, + "truncation": 0.0, + "width": 2.048 + }, + "class_id": 2, + "instance_id": 3215172593, + "num_points": 54 + }, + { + "attributes": {}, + "box": { + "height": 1.4969999999999999, + "length": 4.433, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.0054177598175843555, + "qx": 0.0008418931623845223, + "qy": 0.009838006883544158, + "qz": -0.9999365743461046 + }, + "translation": { + "x": 65.9551124616969, + "y": 4.225173295494187, + "z": 2.0243351221700863 + } + }, + "truncation": 0.0, + "width": 2.117 + }, + "class_id": 2, + "instance_id": 3357023490, + "num_points": 53 + }, + { + "attributes": {}, + "box": { + "height": 3.404, + "length": 8.859, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.9819381501620765, + "qx": 0.0033573327521272435, + "qy": -0.010083674888694877, + "qz": -0.18890345966607286 + }, + "translation": { + "x": 22.293487678182828, + "y": 61.77645021030776, + "z": 3.5278898228923126 + } + }, + "truncation": 0.0, + "width": 3.266 + }, + "class_id": 1, + "instance_id": 3527146084, + "num_points": 0 + }, + { + "attributes": {}, + "box": { + "height": 1.8780000000000001, + "length": 4.605, + "occlusion": 0, + "pose": { + "rotation": { + "qw": -0.2622191297838359, + "qx": -0.004682827700854757, + "qy": -0.02856363589936213, + "qz": -0.9645741639730676 + }, + "translation": { + "x": 23.80293937911756, + "y": 70.8136782441436, + "z": 3.4667258875275735 + } + }, + "truncation": 0.0, + "width": 2.12 + }, + "class_id": 2, + "instance_id": 3668932913, + "num_points": 0 + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/ontology/16322f7584a52ca979ed1c7049f17a7e420e86b1.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/ontology/16322f7584a52ca979ed1c7049f17a7e420e86b1.json new file mode 100644 index 00000000..ebd63b35 --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/ontology/16322f7584a52ca979ed1c7049f17a7e420e86b1.json @@ -0,0 +1,114 @@ +{ + "items": [ + { + "color": { + "b": 100, + "g": 60, + "r": 0 + }, + "id": 3, + "isthing": true, + "name": "Bus/RV/Caravan", + "supercategory": "" + }, + { + "color": { + "b": 100, + "g": 80, + "r": 0 + }, + "id": 4, + "isthing": true, + "name": "Motorcycle", + "supercategory": "" + }, + { + "color": { + "b": 30, + "g": 170, + "r": 250 + }, + "id": 5, + "isthing": true, + "name": "Wheeled Slow", + "supercategory": "" + }, + { + "color": { + "b": 110, + "g": 0, + "r": 0 + }, + "id": 6, + "isthing": true, + "name": "Train", + "supercategory": "" + }, + { + "color": { + "b": 142, + "g": 0, + "r": 0 + }, + "id": 7, + "isthing": true, + "name": "Towed Object", + "supercategory": "" + }, + { + "color": { + "b": 230, + "g": 0, + "r": 0 + }, + "id": 8, + "isthing": true, + "name": "Bicycle", + "supercategory": "" + }, + { + "color": { + "b": 90, + "g": 0, + "r": 0 + }, + "id": 9, + "isthing": true, + "name": "Trailer", + "supercategory": "" + }, + { + "color": { + "b": 60, + "g": 20, + "r": 220 + }, + "id": 0, + "isthing": true, + "name": "Person", + "supercategory": "" + }, + { + "color": { + "b": 70, + "g": 0, + "r": 0 + }, + "id": 1, + "isthing": true, + "name": "Truck", + "supercategory": "" + }, + { + "color": { + "b": 142, + "g": 0, + "r": 0 + }, + "id": 2, + "isthing": true, + "name": "Car", + "supercategory": "" + } + ] +} \ No newline at end of file diff --git a/tests/data/dgp/test_scene/scene_02/autolabels/test-model/scene.json b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/scene.json new file mode 100644 index 00000000..64fe929c --- /dev/null +++ b/tests/data/dgp/test_scene/scene_02/autolabels/test-model/scene.json @@ -0,0 +1,878 @@ +{ + "data": [ + { + "datum": { + "point_cloud": { + "annotations": { + "1": "bounding_box_3d/LIDAR/15616458250027900.json" + }, + "filename": "point_cloud/LIDAR/15616458250027900.npz", + "metadata": {}, + "point_fields": [], + "point_format": [ + "X", + "Y", + "Z", + "INTENSITY" + ], + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.701507293064849, + "qx": -0.005770785693231001, + "qy": 0.015431988162520002, + "qz": 0.712471802635488 + }, + "translation": { + "x": 111.45486229951824, + "y": -2261.3842407442175, + "z": -12.733956682582992 + } + } + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "LIDAR", + "timestamp": "2464-11-12T01:04:10.027900Z" + }, + "key": "2504076f8a5d7b56696e5938eef364256281e804", + "next_key": "", + "prev_key": "8060ee6e11a59335baef639af9881f06276d86cf" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_01/15616458250027900.json", + "1": "bounding_box_3d/CAMERA_01/15616458249936530.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_01/15616458249936530.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.026737673843549, + "qx": 0.010073240707172, + "qy": -0.7046769876230721, + "qz": 0.708952727432206 + }, + "translation": { + "x": 111.67133170999641, + "y": -2262.8032891568937, + "z": -11.14430549826587 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_01", + "timestamp": "2464-11-12T01:04:09.936530Z" + }, + "key": "2050436a0bed451c45a7cd3f0ab9cab2e9b5216f", + "next_key": "", + "prev_key": "94d2a825e7efb020bb6a79a4196003cee863e081" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_05/15616458250027900.json", + "1": "bounding_box_3d/CAMERA_05/15616458249936530.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_05/15616458249936530.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.304385087431559, + "qx": 0.30227730504870104, + "qy": -0.6333704409210771, + "qz": 0.6440652404603241 + }, + "translation": { + "x": 111.8415099171323, + "y": -2262.8453927741903, + "z": -11.125282283208845 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_05", + "timestamp": "2464-11-12T01:04:09.936530Z" + }, + "key": "4eb3efc14eebf085905f15fd334e9ef3dcd152c1", + "next_key": "", + "prev_key": "c80ac79b82a10faf7c17a73307186576cec1a083" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_06/15616458250027900.json", + "1": "bounding_box_3d/CAMERA_06/15616458249936530.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_06/15616458249936530.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": 0.3094128061743, + "qx": -0.332425373787537, + "qy": -0.627460071821294, + "qz": 0.632495805920937 + }, + "translation": { + "x": 110.97219253292165, + "y": -2262.846122593118, + "z": -11.19356886200419 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_06", + "timestamp": "2464-11-12T01:04:09.936530Z" + }, + "key": "32bfe434973c7b3fa742ce955debafd211e97c57", + "next_key": "", + "prev_key": "9ad65962ecc8c367af4ae71ec2e8c71c89fdaa7e" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_07/15616458250027900.json", + "1": "bounding_box_3d/CAMERA_07/15616458249936530.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_07/15616458249936530.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.617968419234546, + "qx": 0.623853853416071, + "qy": -0.332191776572331, + "qz": 0.344339986037626 + }, + "translation": { + "x": 111.81825645400964, + "y": -2262.4313553874504, + "z": -11.14427596300068 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_07", + "timestamp": "2464-11-12T01:04:09.936530Z" + }, + "key": "4fc6300299fb51341b4e521503ece5cd96443184", + "next_key": "", + "prev_key": "3dd01103bb34bbed9ec8b8210a4bca87adf7ee63" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_08/15616458250027900.json", + "1": "bounding_box_3d/CAMERA_08/15616458249936530.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_08/15616458249936530.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.6196394552156801, + "qx": 0.6370433227734571, + "qy": 0.33247468256698504, + "qz": -0.315726679109874 + }, + "translation": { + "x": 110.93134665409706, + "y": -2262.4099494070624, + "z": -11.17953434223646 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_08", + "timestamp": "2464-11-12T01:04:09.936530Z" + }, + "key": "af8ef5088767a54a6b88266b9109ecaf44009497", + "next_key": "", + "prev_key": "9f5103c7c965103cfc9084c7f3a12ce0643c43fa" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_09/15616458250027900.json", + "1": "bounding_box_3d/CAMERA_09/15616458249936530.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_09/15616458249936530.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.709680353959914, + "qx": 0.704472865391225, + "qy": 0.006552993865234001, + "qz": 0.005369860539106 + }, + "translation": { + "x": 111.54045551661851, + "y": -2261.47283021645, + "z": -11.199511108285467 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_09", + "timestamp": "2464-11-12T01:04:09.936530Z" + }, + "key": "bf5b106fcbb34d0a6949c968e0c091243624df6c", + "next_key": "", + "prev_key": "0065274b90ef246ad3d72bd972fd5825da40d097" + }, + { + "datum": { + "point_cloud": { + "annotations": { + "1": "bounding_box_3d/LIDAR/15616458251018358.json" + }, + "filename": "point_cloud/LIDAR/15616458251018358.npz", + "metadata": {}, + "point_fields": [], + "point_format": [ + "X", + "Y", + "Z", + "INTENSITY" + ], + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.7014864755837661, + "qx": -0.00643004157145, + "qy": 0.014893784037226002, + "qz": 0.712498108303108 + }, + "translation": { + "x": 111.43516925360107, + "y": -2262.6411226813084, + "z": -12.71743392922662 + } + } + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "LIDAR", + "timestamp": "2464-11-12T01:04:11.018358Z" + }, + "key": "6a1eca098cb729b63fabd775f7664bbc270b2c8c", + "next_key": "", + "prev_key": "2504076f8a5d7b56696e5938eef364256281e804" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_01/15616458251018358.json", + "1": "bounding_box_3d/CAMERA_01/15616458250936520.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_01/15616458250936520.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.026774750057927003, + "qx": 0.009995531443067, + "qy": -0.7053335342727101, + "qz": 0.708299235874834 + }, + "translation": { + "x": 111.65115147537942, + "y": -2264.0764362556565, + "z": -11.130321693139923 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_01", + "timestamp": "2464-11-12T01:04:10.936520Z" + }, + "key": "64a846ff4118412e81e71689e140859e3038e00f", + "next_key": "", + "prev_key": "2050436a0bed451c45a7cd3f0ab9cab2e9b5216f" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_05/15616458251018358.json", + "1": "bounding_box_3d/CAMERA_05/15616458250936520.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_05/15616458250936520.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.304677122099694, + "qx": 0.30196144677311604, + "qy": -0.6339263086851411, + "qz": 0.643528220895218 + }, + "translation": { + "x": 111.82133902289591, + "y": -2264.118246897645, + "z": -11.111145214502097 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_05", + "timestamp": "2464-11-12T01:04:10.936520Z" + }, + "key": "eda53e13e84fab57889d88081cee537b28d75776", + "next_key": "", + "prev_key": "4eb3efc14eebf085905f15fd334e9ef3dcd152c1" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_06/15616458251018358.json", + "1": "bounding_box_3d/CAMERA_06/15616458250936520.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_06/15616458250936520.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": 0.30967404609688803, + "qx": -0.33220455505097, + "qy": -0.6280240148569091, + "qz": 0.631924010890849 + }, + "translation": { + "x": 110.9520243320044, + "y": -2264.1187325313654, + "z": -11.179486642300796 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_06", + "timestamp": "2464-11-12T01:04:10.936520Z" + }, + "key": "7206c564c1c632fdc60932f770df2b2f39ab3d89", + "next_key": "", + "prev_key": "32bfe434973c7b3fa742ce955debafd211e97c57" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_07/15616458251018358.json", + "1": "bounding_box_3d/CAMERA_07/15616458250936520.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_07/15616458250936520.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.618520137138158, + "qx": 0.6232952963257811, + "qy": -0.33245695479931403, + "qz": 0.34410490658855203 + }, + "translation": { + "x": 111.79808958346497, + "y": -2263.7039955716764, + "z": -11.129326471836738 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_07", + "timestamp": "2464-11-12T01:04:10.936520Z" + }, + "key": "4cef12c4be4f9b76da8538fb6c15fe15c51acdce", + "next_key": "", + "prev_key": "4fc6300299fb51341b4e521503ece5cd96443184" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_08/15616458251018358.json", + "1": "bounding_box_3d/CAMERA_08/15616458250936520.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_08/15616458250936520.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.620160169948729, + "qx": 0.636545648740605, + "qy": 0.33277500386061104, + "qz": -0.31539149875057504 + }, + "translation": { + "x": 110.91117928567564, + "y": -2263.682402085488, + "z": -11.164628196562553 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_08", + "timestamp": "2464-11-12T01:04:10.936520Z" + }, + "key": "4db70de2e8393ae3207420c968d4fd13abdb2ea7", + "next_key": "", + "prev_key": "af8ef5088767a54a6b88266b9109ecaf44009497" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_09/15616458251018358.json", + "1": "bounding_box_3d/CAMERA_09/15616458250936520.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_09/15616458250936520.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.710265070013237, + "qx": 0.703882456647782, + "qy": 0.0065910385216740005, + "qz": 0.005438359475007 + }, + "translation": { + "x": 111.52031208454802, + "y": -2262.7451226658845, + "z": -11.182913851994364 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_09", + "timestamp": "2464-11-12T01:04:10.936520Z" + }, + "key": "b317cef1289e1cdc63c078a42cbf73330dd8a220", + "next_key": "", + "prev_key": "bf5b106fcbb34d0a6949c968e0c091243624df6c" + }, + { + "datum": { + "point_cloud": { + "annotations": { + "1": "bounding_box_3d/LIDAR/15616458252028828.json" + }, + "filename": "point_cloud/LIDAR/15616458252028828.npz", + "metadata": {}, + "point_fields": [], + "point_format": [ + "X", + "Y", + "Z", + "INTENSITY" + ], + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.701454166681016, + "qx": -0.006703930351764, + "qy": 0.014440759943522001, + "qz": 0.712536717521232 + }, + "translation": { + "x": 111.41493320146672, + "y": -2263.918036624573, + "z": -12.703077512164834 + } + } + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "LIDAR", + "timestamp": "2464-11-12T01:04:12.028828Z" + }, + "key": "2ba9c5c623ce0537e1dcc6856e1d151605c027b6", + "next_key": "", + "prev_key": "6a1eca098cb729b63fabd775f7664bbc270b2c8c" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_01/15616458252028828.json", + "1": "bounding_box_3d/CAMERA_01/15616458251936472.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_01/15616458251936472.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.026675419764756, + "qx": 0.010024900157219001, + "qy": -0.70577839400566, + "qz": 0.7078592952783781 + }, + "translation": { + "x": 111.63133595400431, + "y": -2265.342786954348, + "z": -11.117845347784975 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_01", + "timestamp": "2464-11-12T01:04:11.936472Z" + }, + "key": "2f81ddf658a5ecfcc074620be3af04387a9d217a", + "next_key": "", + "prev_key": "64a846ff4118412e81e71689e140859e3038e00f" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_05/15616458252028828.json", + "1": "bounding_box_3d/CAMERA_05/15616458251936472.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_05/15616458251936472.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.304783099080413, + "qx": 0.30180208204338504, + "qy": -0.6343991496178041, + "qz": 0.6430866852559021 + }, + "translation": { + "x": 111.80153618508534, + "y": -2265.3845471652303, + "z": -11.099000777534684 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_05", + "timestamp": "2464-11-12T01:04:11.936472Z" + }, + "key": "0f2578fcd12c338705d82988925ad4511a8356b5", + "next_key": "", + "prev_key": "eda53e13e84fab57889d88081cee537b28d75776" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_06/15616458252028828.json", + "1": "bounding_box_3d/CAMERA_06/15616458251936472.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_06/15616458251936472.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": 0.309987527744137, + "qx": -0.33195720855035404, + "qy": -0.6283936398342991, + "qz": 0.631532721044867 + }, + "translation": { + "x": 110.93221003423827, + "y": -2265.384813908222, + "z": -11.16714772320681 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_06", + "timestamp": "2464-11-12T01:04:11.936472Z" + }, + "key": "eb36c947c983949e32bc50a9e38aa8a8fe036584", + "next_key": "", + "prev_key": "7206c564c1c632fdc60932f770df2b2f39ab3d89" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_07/15616458252028828.json", + "1": "bounding_box_3d/CAMERA_07/15616458251936472.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_07/15616458251936472.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.618877810650446, + "qx": 0.622913884040137, + "qy": -0.33277598314642404, + "qz": 0.34384399601486504 + }, + "translation": { + "x": 111.77832256401882, + "y": -2264.9702317077117, + "z": -11.116621266239243 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_07", + "timestamp": "2464-11-12T01:04:11.936472Z" + }, + "key": "1fd26abfd6801edfd2c64579ae550036cdaa88b9", + "next_key": "", + "prev_key": "4cef12c4be4f9b76da8538fb6c15fe15c51acdce" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_08/15616458252028828.json", + "1": "bounding_box_3d/CAMERA_08/15616458251936472.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_08/15616458251936472.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.62062401872633, + "qx": 0.63612085305801, + "qy": 0.33288504546921105, + "qz": -0.31521997745652003 + }, + "translation": { + "x": 110.89140981083308, + "y": -2264.9484598446957, + "z": -11.151696087757145 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_08", + "timestamp": "2464-11-12T01:04:11.936472Z" + }, + "key": "1b2423efc6db20a327001e736dd84f105dc84490", + "next_key": "", + "prev_key": "4db70de2e8393ae3207420c968d4fd13abdb2ea7" + }, + { + "datum": { + "image": { + "annotations": { + "0": "bounding_box_2d/CAMERA_09/15616458252028828.json", + "1": "bounding_box_3d/CAMERA_09/15616458251936472.json" + }, + "channels": 3, + "filename": "rgb/CAMERA_09/15616458251936472.jpg", + "height": 1216, + "metadata": {}, + "pose": { + "reference_coordinate_system": "", + "rotation": { + "qw": -0.710719106131501, + "qx": 0.7034254011586331, + "qy": 0.006478693661622001, + "qz": 0.005392931753123001 + }, + "translation": { + "x": 111.50062155906006, + "y": -2264.011060010517, + "z": -11.16890673407187 + } + }, + "width": 1936 + } + }, + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "CAMERA_09", + "timestamp": "2464-11-12T01:04:11.936472Z" + }, + "key": "5f940a623ba7fe7f109b929e4ce4a7d265165705", + "next_key": "", + "prev_key": "b317cef1289e1cdc63c078a42cbf73330dd8a220" + } + ], + "description": "DGP scene for unittest.", + "log": "TRI_INTERNAL_LOG", + "metadata": {}, + "name": "", + "ontologies": { + "0": "16322f7584a52ca979ed1c7049f17a7e420e86b1", + "1": "16322f7584a52ca979ed1c7049f17a7e420e86b1" + }, + "samples": [ + { + "calibration_key": "64b9fde6360457d8beddcfb06c512fec6e2989d8", + "datum_keys": [ + "2504076f8a5d7b56696e5938eef364256281e804", + "2050436a0bed451c45a7cd3f0ab9cab2e9b5216f", + "4eb3efc14eebf085905f15fd334e9ef3dcd152c1", + "32bfe434973c7b3fa742ce955debafd211e97c57", + "4fc6300299fb51341b4e521503ece5cd96443184", + "af8ef5088767a54a6b88266b9109ecaf44009497", + "bf5b106fcbb34d0a6949c968e0c091243624df6c" + ], + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "", + "timestamp": "2464-11-12T01:04:10.027900Z" + }, + "metadata": {} + }, + { + "calibration_key": "64b9fde6360457d8beddcfb06c512fec6e2989d8", + "datum_keys": [ + "6a1eca098cb729b63fabd775f7664bbc270b2c8c", + "64a846ff4118412e81e71689e140859e3038e00f", + "eda53e13e84fab57889d88081cee537b28d75776", + "7206c564c1c632fdc60932f770df2b2f39ab3d89", + "4cef12c4be4f9b76da8538fb6c15fe15c51acdce", + "4db70de2e8393ae3207420c968d4fd13abdb2ea7", + "b317cef1289e1cdc63c078a42cbf73330dd8a220" + ], + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "", + "timestamp": "2464-11-12T01:04:11.018358Z" + }, + "metadata": {} + }, + { + "calibration_key": "64b9fde6360457d8beddcfb06c512fec6e2989d8", + "datum_keys": [ + "2ba9c5c623ce0537e1dcc6856e1d151605c027b6", + "2f81ddf658a5ecfcc074620be3af04387a9d217a", + "0f2578fcd12c338705d82988925ad4511a8356b5", + "eb36c947c983949e32bc50a9e38aa8a8fe036584", + "1fd26abfd6801edfd2c64579ae550036cdaa88b9", + "1b2423efc6db20a327001e736dd84f105dc84490", + "5f940a623ba7fe7f109b929e4ce4a7d265165705" + ], + "id": { + "index": "0", + "log": "TRI_INTERNAL_LOG", + "name": "", + "timestamp": "2464-11-12T01:04:12.028828Z" + }, + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/tests/utils/test_render_3d_to_2d.py b/tests/utils/test_render_3d_to_2d.py new file mode 100644 index 00000000..fc51e3e7 --- /dev/null +++ b/tests/utils/test_render_3d_to_2d.py @@ -0,0 +1,37 @@ +# Copyright 2023 Woven by Toyota. All rights reserved. +"""Unit test to merge dgp datasets.""" +import logging +import os +import tempfile +import unittest +import unittest.mock as mock + +import dgp.utils.render_3d_to_2d as render_engine +from tests import TEST_DATA_DIR + +SCENE_JSON = 'scene_6245881cb04e9f71ae6de99064e771dfa370329d.json' + + +class TestAssociateDGP3dto2d(unittest.TestCase): + logging.getLogger().setLevel(logging.INFO) + + def test_associate_scene(self): + """Verifies the target bounding box can be associated successfully.""" + # answer = gt_engine.associate_3d_and_2d_annotations_scene(scene_json=os.path.join(TEST_DATA_DIR,'dgp/test_scene/scene_03', SCENE_JSON)) + answer = render_engine.associate_3d_and_2d_annotations_scene( + scene_json=os.path.join(TEST_DATA_DIR, 'dgp/associate_2d_to_3d_scene/scene_01', SCENE_JSON), + camera_datum_names=render_engine.FRONT_CAMERA, + lidar_datum_names=render_engine.LIDAR, + ) + assert render_engine.FRONT_CAMERA[0] in answer + for class_name in render_engine.ONTOLOGY_NAME_MAPPER_2D_to_3D.keys(): + if class_name == "Pedestrian": + assert len(answer[render_engine.FRONT_CAMERA[0]][class_name]) == 4 + elif class_name == "Car": + assert len(answer[render_engine.FRONT_CAMERA[0]][class_name]) == 0 + else: + raise RuntimeError('Unexpected class_name {}'.format(class_name)) + + +if __name__ == "__main__": + unittest.main()