From 13c9da3725bfabe6a64bbc7f39b18b5d9510c99b Mon Sep 17 00:00:00 2001 From: Yang Lou Date: Mon, 23 Sep 2024 17:33:57 -0700 Subject: [PATCH] remove debug print in benchmarking. Summary: 1. Remove a debug print. 2. Removed depth_anything code in SAM2 example. 3. Added Data Store config yaml files to data/ Reviewed By: echo-xiao9 Differential Revision: D63293449 fbshipit-source-id: a1073c02e8760a2a58e7d05dc8250cbb6c581618 --- .../AriaDigitalTwin_cubercnn_config.yaml | 33 ++++++++++++ .../AriaDigitalTwin_efm_config.yaml | 53 +++++++++++++++++++ ...aSyntheticEnvironment_cubercnn_config.yaml | 33 ++++++++++++ ...heticEnvironment_cubercnn_eval_config.yaml | 33 ++++++++++++ .../AriaSyntheticEnvironment_efm_config.yaml | 53 +++++++++++++++++++ ...aSyntheticEnvironment_efm_eval_config.yaml | 53 +++++++++++++++++++ examples/Demo_4_Sam2_example.ipynb | 5 -- tools/benchmarking_surface_reconstruction.py | 2 - 8 files changed, 258 insertions(+), 7 deletions(-) create mode 100644 data/atek_data_store_confs/AriaDigitalTwin_cubercnn_config.yaml create mode 100644 data/atek_data_store_confs/AriaDigitalTwin_efm_config.yaml create mode 100644 data/atek_data_store_confs/AriaSyntheticEnvironment_cubercnn_config.yaml create mode 100644 data/atek_data_store_confs/AriaSyntheticEnvironment_cubercnn_eval_config.yaml create mode 100644 data/atek_data_store_confs/AriaSyntheticEnvironment_efm_config.yaml create mode 100644 data/atek_data_store_confs/AriaSyntheticEnvironment_efm_eval_config.yaml diff --git a/data/atek_data_store_confs/AriaDigitalTwin_cubercnn_config.yaml b/data/atek_data_store_confs/AriaDigitalTwin_cubercnn_config.yaml new file mode 100644 index 0000000..7678c14 --- /dev/null +++ b/data/atek_data_store_confs/AriaDigitalTwin_cubercnn_config.yaml @@ -0,0 +1,33 @@ +atek_config_name: "cubercnn" +camera_temporal_subsampler: + main_camera_label: "camera-rgb" + time_domain: "DEVICE_TIME" + main_camera_target_freq_hz: 10.0 + sample_length_in_num_frames: 1 + stride_length_in_num_frames: 2 +processors: + rgb: + selected: true + sensor_label: "camera-rgb" + time_domain: "DEVICE_TIME" + tolerance_ns: 10_000_000 + undistort_to_linear_camera: true # if set, undistort to a linear camera model + target_camera_resolution: [] # if set, rescale to [image_width, image_height] + rotate_image_cw90deg: true # if set, rotate image by 90 degrees clockwise + slam_left: + selected: false + slam_right: + selected: false + mps_traj: + selected: true + tolerance_ns: 10_000_000 + mps_semidense: + selected: false + obb_gt: + selected: true + tolerance_ns : 10_000_000 + category_mapping_field_name: prototype_name # {prototype_name, category} + bbox2d_num_samples_on_edge: 10 +wds_writer: + prefix_string: "AdtPublicRelease2023" + max_samples_per_shard: 32 diff --git a/data/atek_data_store_confs/AriaDigitalTwin_efm_config.yaml b/data/atek_data_store_confs/AriaDigitalTwin_efm_config.yaml new file mode 100644 index 0000000..bcba6dc --- /dev/null +++ b/data/atek_data_store_confs/AriaDigitalTwin_efm_config.yaml @@ -0,0 +1,53 @@ +atek_config_name: "efm" +camera_temporal_subsampler: + main_camera_label: "camera-rgb" + time_domain: "DEVICE_TIME" + main_camera_target_freq_hz: 10.0 + sample_length_in_num_frames: 20 + stride_length_in_num_frames: 10 +processors: + rgb: + selected: true + sensor_label: "camera-rgb" + time_domain: "DEVICE_TIME" + tolerance_ns: 10_000_000 + undistort_to_linear_cam: false # if set, undistort to a linear camera model + target_camera_resolution: [240, 240] # if set, rescale to [image_width, image_height] + rescale_antialias: false # to be consistent with cv2 + rotate_image_cw90deg: false # if set, rotate image by 90 degrees clockwise + slam_left: + selected: true + sensor_label: "camera-slam-left" + tolerance_ns: 10_000_000 + time_domain: "DEVICE_TIME" + target_camera_resolution: [320, 240] # if set, rescale to [image_width, image_height] + rescale_antialias: false # to be consistent with cv2 + slam_right: + selected: true + sensor_label: "camera-slam-right" + tolerance_ns: 10_000_000 + time_domain: "DEVICE_TIME" + target_camera_resolution: [320, 240] # if set, rescale to [image_width, image_height] + rescale_antialias: false # to be consistent with cv2 + mps_traj: + selected: true + tolerance_ns: 10_000_000 + mps_semidense: + selected: true + tolerance_ns: 10_000_000 + rgb_depth: + selected: true + # depth_stream_type_id: "214" # 214 for ASE data + depth_stream_id: "345-1" # 345-1 for ADT data + tolerance_ns: 10_000_000 + time_domain: "DEVICE_TIME" + convert_zdepth_to_distance: true + unit_scaling: 0.001 # for ADT and ASEv1 data, convert from mm to meters + efm_gt: + selected: true + tolerance_ns : 10_000_000 + category_mapping_field_name: prototype_name # {prototype_name, category} +wds_writer: + prefix_string: "" + max_samples_per_shard: 8 + remove_last_tar_if_not_full: true diff --git a/data/atek_data_store_confs/AriaSyntheticEnvironment_cubercnn_config.yaml b/data/atek_data_store_confs/AriaSyntheticEnvironment_cubercnn_config.yaml new file mode 100644 index 0000000..3ebf8c5 --- /dev/null +++ b/data/atek_data_store_confs/AriaSyntheticEnvironment_cubercnn_config.yaml @@ -0,0 +1,33 @@ +atek_config_name: "cubercnn" +camera_temporal_subsampler: + main_camera_label: "camera-rgb" + time_domain: "DEVICE_TIME" + main_camera_target_freq_hz: 10.0 + sample_length_in_num_frames: 1 + stride_length_in_num_frames: 2 +processors: + rgb: + selected: true + sensor_label: "camera-rgb" + time_domain: "DEVICE_TIME" + tolerance_ns: 10_000_000 + undistort_to_linear_camera: true # if set, undistort to a linear camera model + target_camera_resolution: [] # if set, rescale to [image_width, image_height] + rotate_image_cw90deg: true # if set, rotate image by 90 degrees clockwise + slam_left: + selected: false + slam_right: + selected: false + mps_traj: + selected: true + tolerance_ns: 10_000_000 + mps_semidense: + selected: false + obb_gt: + selected: true + tolerance_ns : 10_000_000 + category_mapping_field_name: category # {prototype_name, category} + bbox2d_num_samples_on_edge: 10 +wds_writer: + prefix_string: "AsePublicRelease2023" + max_samples_per_shard: 32 diff --git a/data/atek_data_store_confs/AriaSyntheticEnvironment_cubercnn_eval_config.yaml b/data/atek_data_store_confs/AriaSyntheticEnvironment_cubercnn_eval_config.yaml new file mode 100644 index 0000000..afffbe5 --- /dev/null +++ b/data/atek_data_store_confs/AriaSyntheticEnvironment_cubercnn_eval_config.yaml @@ -0,0 +1,33 @@ +atek_config_name: "cubercnn_eval" +camera_temporal_subsampler: + main_camera_label: "camera-rgb" + time_domain: "DEVICE_TIME" + main_camera_target_freq_hz: 10.0 + sample_length_in_num_frames: 1 + stride_length_in_num_frames: 1 +processors: + rgb: + selected: true + sensor_label: "camera-rgb" + time_domain: "DEVICE_TIME" + tolerance_ns: 10_000_000 + undistort_to_linear_camera: true # if set, undistort to a linear camera model + target_camera_resolution: [] # if set, rescale to [image_width, image_height] + rotate_image_cw90deg: true # if set, rotate image by 90 degrees clockwise + slam_left: + selected: false + slam_right: + selected: false + mps_traj: + selected: true + tolerance_ns: 10_000_000 + mps_semidense: + selected: false + obb_gt: + selected: true + tolerance_ns : 10_000_000 + category_mapping_field_name: category # {prototype_name, category} + bbox2d_num_samples_on_edge: 10 +wds_writer: + prefix_string: "AsePublicRelease2023" + max_samples_per_shard: 32 diff --git a/data/atek_data_store_confs/AriaSyntheticEnvironment_efm_config.yaml b/data/atek_data_store_confs/AriaSyntheticEnvironment_efm_config.yaml new file mode 100644 index 0000000..1ee36db --- /dev/null +++ b/data/atek_data_store_confs/AriaSyntheticEnvironment_efm_config.yaml @@ -0,0 +1,53 @@ +atek_config_name: "efm" +camera_temporal_subsampler: + main_camera_label: "camera-rgb" + time_domain: "DEVICE_TIME" + main_camera_target_freq_hz: 10.0 + sample_length_in_num_frames: 20 + stride_length_in_num_frames: 10 +processors: + rgb: + selected: true + sensor_label: "camera-rgb" + time_domain: "DEVICE_TIME" + tolerance_ns: 10_000_000 + undistort_to_linear_cam: false # if set, undistort to a linear camera model + target_camera_resolution: [240, 240] # if set, rescale to [image_width, image_height] + rescale_antialias: false # to be consistent with cv2 + rotate_image_cw90deg: false # if set, rotate image by 90 degrees clockwise + slam_left: + selected: true + sensor_label: "camera-slam-left" + tolerance_ns: 10_000_000 + time_domain: "DEVICE_TIME" + target_camera_resolution: [320, 240] # if set, rescale to [image_width, image_height] + rescale_antialias: false # to be consistent with cv2 + slam_right: + selected: true + sensor_label: "camera-slam-right" + tolerance_ns: 10_000_000 + time_domain: "DEVICE_TIME" + target_camera_resolution: [320, 240] # if set, rescale to [image_width, image_height] + rescale_antialias: false # to be consistent with cv2 + mps_traj: + selected: true + tolerance_ns: 10_000_000 + mps_semidense: + selected: true + tolerance_ns: 10_000_000 + rgb_depth: + selected: true + depth_stream_type_id: "214" # 214 for ASE data + # depth_stream_id: "345-1" # 345-1 for ADT data + tolerance_ns: 10_000_000 + time_domain: "DEVICE_TIME" + convert_zdepth_to_dist: false + unit_scaling: 0.001 # for ADT and ASEv1 data, convert from mm to meters + efm_gt: + selected: true + tolerance_ns : 10_000_000 + category_mapping_field_name: category # {prototype_name, category} +wds_writer: + prefix_string: "" + max_samples_per_shard: 8 + remove_last_tar_if_not_full: true diff --git a/data/atek_data_store_confs/AriaSyntheticEnvironment_efm_eval_config.yaml b/data/atek_data_store_confs/AriaSyntheticEnvironment_efm_eval_config.yaml new file mode 100644 index 0000000..f1ee6c8 --- /dev/null +++ b/data/atek_data_store_confs/AriaSyntheticEnvironment_efm_eval_config.yaml @@ -0,0 +1,53 @@ +atek_config_name: "efm_eval" +camera_temporal_subsampler: + main_camera_label: "camera-rgb" + time_domain: "DEVICE_TIME" + main_camera_target_freq_hz: 10.0 + sample_length_in_num_frames: 20 + stride_length_in_num_frames: 10 +processors: + rgb: + selected: true + sensor_label: "camera-rgb" + time_domain: "DEVICE_TIME" + tolerance_ns: 10_000_000 + undistort_to_linear_cam: false # if set, undistort to a linear camera model + target_camera_resolution: [240, 240] # if set, rescale to [image_width, image_height] + rescale_antialias: false # to be consistent with cv2 + rotate_image_cw90deg: false # if set, rotate image by 90 degrees clockwise + slam_left: + selected: true + sensor_label: "camera-slam-left" + tolerance_ns: 10_000_000 + time_domain: "DEVICE_TIME" + target_camera_resolution: [320, 240] # if set, rescale to [image_width, image_height] + rescale_antialias: false # to be consistent with cv2 + slam_right: + selected: true + sensor_label: "camera-slam-right" + tolerance_ns: 10_000_000 + time_domain: "DEVICE_TIME" + target_camera_resolution: [320, 240] # if set, rescale to [image_width, image_height] + rescale_antialias: false # to be consistent with cv2 + mps_traj: + selected: true + tolerance_ns: 10_000_000 + mps_semidense: + selected: true + tolerance_ns: 10_000_000 + rgb_depth: + selected: true + depth_stream_type_id: "214" # 214 for ASE data + # depth_stream_id: "345-1" # 345-1 for ADT data + tolerance_ns: 10_000_000 + time_domain: "DEVICE_TIME" + convert_zdepth_to_dist: false + unit_scaling: 0.001 # for ADT and ASEv1 data, convert from mm to meters + efm_gt: + selected: true + tolerance_ns : 10_000_000 + category_mapping_field_name: category # {prototype_name, category} +wds_writer: + prefix_string: "" + max_samples_per_shard: 8 + remove_last_tar_if_not_full: true diff --git a/examples/Demo_4_Sam2_example.ipynb b/examples/Demo_4_Sam2_example.ipynb index 87483b8..f91a48c 100644 --- a/examples/Demo_4_Sam2_example.ipynb +++ b/examples/Demo_4_Sam2_example.ipynb @@ -46,15 +46,10 @@ "from atek.data_loaders.sam2_model_adaptor import (\n", " create_atek_dataloader_as_sam2\n", ")\n", - "from atek.data_loaders.sam2_model_adaptor import (\n", - " create_atek_dataloader_as_depth_anything2\n", - ")\n", "from sam2.build_sam import build_sam2\n", "from sam2.sam2_image_predictor import SAM2ImagePredictor\n", "from webdataset.filters import pipelinefilter\n", "\n", - "from depth_anything_v2.dpt import DepthAnythingV2\n", - "\n", "# Data path setup, follow Demo 2 to prepare streamable_validat_tars file.\n", "streamable_atek_yaml_file = \"./streamable_validation_tars.yaml\"\n", "\n", diff --git a/tools/benchmarking_surface_reconstruction.py b/tools/benchmarking_surface_reconstruction.py index ba8648d..a4b7c7f 100644 --- a/tools/benchmarking_surface_reconstruction.py +++ b/tools/benchmarking_surface_reconstruction.py @@ -94,9 +94,7 @@ def main() -> None: correct_mesh_gravity=args.is_adt_mesh, ) - # for testing only logger.info(f" metrics results is {metrics}") - print_obb3_metrics_to_logger(metrics) # Write metrics results to file with open(args.output_file, "w") as f: