From 4ec01b4ab302d51342409ce4c2caf26b0a794793 Mon Sep 17 00:00:00 2001 From: Masato Saeki <78376491+MasatoSaeki@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:27:01 +0900 Subject: [PATCH] delete ros_critical_ground_truth_objects (#180) Signed-off-by: MasatoSaeki --- README.md | 1 - .../manager/perception_evaluation_manager.py | 4 +--- perception_eval/test/perception_fp_validation_lsim.py | 5 ----- perception_eval/test/perception_lsim.py | 6 ------ perception_eval/test/perception_lsim2d.py | 5 ----- 5 files changed, 1 insertion(+), 20 deletions(-) diff --git a/README.md b/README.md index ebf2c80c..e7d1d603 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,6 @@ for frame in datasets: unix_time=unix_time, ground_truth_now_frame=frame, estimated_objects=estimated_objects, - ros_critical_ground_truth_objects=frame.objects, critical_object_filter_config=critical_object_filter_config, frame_pass_fail_config=pass_fail_config, ) diff --git a/perception_eval/perception_eval/manager/perception_evaluation_manager.py b/perception_eval/perception_eval/manager/perception_evaluation_manager.py index 68fb659e..7851886e 100644 --- a/perception_eval/perception_eval/manager/perception_evaluation_manager.py +++ b/perception_eval/perception_eval/manager/perception_evaluation_manager.py @@ -90,15 +90,13 @@ def add_frame_result( TODO: - Arrange `CriticalObjectFilterConfig` and `PerceptionPassFailConfig` to `PerceptionFrameConfig`. - - Allow input `PerceptionFrameConfig` and `ros_critical_ground_truth_objects` are None. + - Allow input `PerceptionFrameConfig` is None. Args: unix_time (int): Unix timestamp [us]. ground_truth_now_frame (FrameGroundTruth): FrameGroundTruth instance that has the closest timestamp with `unix_time`. estimated_objects (List[ObjectType]): Estimated objects list. - ros_critical_ground_truth_objects (List[ObjectType]): Critical ground truth objects filtered by ROS - node to evaluate pass fail result. critical_object_filter_config (CriticalObjectFilterConfig): Parameter config to filter objects. frame_pass_fail_config (PerceptionPassFailConfig):Parameter config to evaluate pass/fail. diff --git a/perception_eval/test/perception_fp_validation_lsim.py b/perception_eval/test/perception_fp_validation_lsim.py index a9c11d09..4e2d335f 100644 --- a/perception_eval/test/perception_fp_validation_lsim.py +++ b/perception_eval/test/perception_fp_validation_lsim.py @@ -62,10 +62,6 @@ def __init__(self, dataset_paths: List[int], result_root_directory: str) -> None def callback(self, unix_time: int, estimated_objects: List[ObjectType]) -> None: ground_truth_now_frame = self.evaluator.get_ground_truth_now_frame(unix_time) - # Ideally, critical GT should be obtained in each frame. - # In this mock, set it as a copy of `ground_truth_now_frame`. - ros_critical_ground_truth_objects = ground_truth_now_frame.objects - critical_object_filter_config = CriticalObjectFilterConfig( evaluator_config=self.evaluator.evaluator_config, target_labels=["car", "bicycle", "pedestrian", "motorbike"], @@ -83,7 +79,6 @@ def callback(self, unix_time: int, estimated_objects: List[ObjectType]) -> None: unix_time=unix_time, ground_truth_now_frame=ground_truth_now_frame, estimated_objects=estimated_objects, - ros_critical_ground_truth_objects=ros_critical_ground_truth_objects, critical_object_filter_config=critical_object_filter_config, frame_pass_fail_config=frame_pass_fail_config, ) diff --git a/perception_eval/test/perception_lsim.py b/perception_eval/test/perception_lsim.py index cbb5f4b2..90d0b30b 100644 --- a/perception_eval/test/perception_lsim.py +++ b/perception_eval/test/perception_lsim.py @@ -101,12 +101,6 @@ def callback( unix_time, interpolate_ground_truth=interpolate ) - # [Option] ROS側でやる(Map情報・Planning結果を用いる)UC評価objectを選別 - # ros_critical_ground_truth_objects : List[DynamicObject] = custom_critical_object_filter( - # ground_truth_now_frame.objects - # ) - ros_critical_ground_truth_objects = ground_truth_now_frame.objects - # 1 frameの評価 # 距離などでUC評価objectを選別するためのインターフェイス(PerceptionEvaluationManager初期化時にConfigを設定せず、関数受け渡しにすることで動的に変更可能なInterface) # どれを注目物体とするかのparam diff --git a/perception_eval/test/perception_lsim2d.py b/perception_eval/test/perception_lsim2d.py index 6105d570..bbbc9785 100644 --- a/perception_eval/test/perception_lsim2d.py +++ b/perception_eval/test/perception_lsim2d.py @@ -119,11 +119,6 @@ def callback( else: raise ValueError(f"Unexpected label prefix: {self.label_prefix}") - # [Option] ROS側でやる(Map情報・Planning結果を用いる)UC評価objectを選別 - # ros_critical_ground_truth_objects : List[DynamicObject] = custom_critical_object_filter( - # ground_truth_now_frame.objects - # ) - matching_threshold_list = None if self.evaluation_task == "classification2d" else [0.5, 0.5, 0.5, 0.5] # 距離などでUC評価objectを選別するためのインターフェイス(PerceptionEvaluationManager初期化時にConfigを設定せず、関数受け渡しにすることで動的に変更可能なInterface) # どれを注目物体とするかのparam