Skip to content

Commit

Permalink
remove debug print in benchmarking.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
YLouWashU authored and facebook-github-bot committed Sep 24, 2024
1 parent de13514 commit 13c9da3
Show file tree
Hide file tree
Showing 8 changed files with 258 additions and 7 deletions.
33 changes: 33 additions & 0 deletions data/atek_data_store_confs/AriaDigitalTwin_cubercnn_config.yaml
Original file line number Diff line number Diff line change
@@ -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
53 changes: 53 additions & 0 deletions data/atek_data_store_confs/AriaDigitalTwin_efm_config.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions examples/Demo_4_Sam2_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions tools/benchmarking_surface_reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 13c9da3

Please sign in to comment.