From 9bb04cee8803d5f8479ae58197c21931c75b5613 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Wed, 14 Jan 2026 16:08:31 +0900 Subject: [PATCH 01/68] Update docker installation commit for perception_evaluation --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c5240c498..22d18f5ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ RUN python3 -m pip --no-cache-dir install \ RUN python3 -m pip install git+https://github.com/tier4/t4-devkit@v0.5.1 # Install autoware-perception-evaluation -RUN python3 -m pip install git+https://github.com/tier4/autoware_perception_evaluation@develop +RUN python3 -m pip install git+https://github.com/tier4/autoware_perception_evaluation@dd37a546352f953565033f1d4b8cb443df1232c59 # Need to dowgrade setuptools to 60.2.0 to fix setup RUN python3 -m pip --no-cache-dir install \ From 1a7ebee39f66d37cd45b20e23575d352a6cdc493 Mon Sep 17 00:00:00 2001 From: KokSeang Tan Date: Thu, 19 Mar 2026 20:57:55 +0900 Subject: [PATCH 02/68] Update config --- ...evfusion_camera_swin_fpn_30e_8xb8_j6gen2_base_120m.py} | 4 ++-- ...idar_voxel_second_secfpn_20e_8xb8_j6gen2_base_120m.py} | 4 ++-- ...oxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m.py} | 4 ++-- ...idar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py} | 4 ++-- ...oxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py} | 4 ++-- ...fline_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py} | 4 ++-- ...idar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py} | 4 ++-- ...oxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py} | 4 ++-- ...usion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py} | 8 ++++---- ..._cosine.py => default_20e_8xb8_adamw_linear_cosine.py} | 6 +++--- ...8_adamw_cosine.py => default_30e_8xb8_adamw_cosine.py} | 4 ++-- ..._cosine.py => default_30e_8xb8_adamw_linear_cosine.py} | 4 ++-- ...8_adamw_cosine.py => default_50e_8xb8_adamw_cosine.py} | 4 ++-- 13 files changed, 29 insertions(+), 29 deletions(-) rename projects/BEVFusion/configs/t4dataset/BEVFusion-C/{bevfusion_camera_swin_fpn_30e_4xb8_j6gen2_base_120m.py => bevfusion_camera_swin_fpn_30e_8xb8_j6gen2_base_120m.py} (97%) rename projects/BEVFusion/configs/t4dataset/BEVFusion-CL/{bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_j6gen2_base_120m.py => bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_j6gen2_base_120m.py} (98%) rename projects/BEVFusion/configs/t4dataset/BEVFusion-CL/{bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_jpntaxi_gen2_base_120m.py => bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m.py} (98%) rename projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/{bevfusion_offline_lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m.py => bevfusion_offline_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py} (97%) rename projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/{bevfusion_offline_lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m.py => bevfusion_offline_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py} (97%) rename projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/{bevfusion_offline_lidar_voxel_second_secfpn_50e_4xb8_base_120m.py => bevfusion_offline_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py} (97%) rename projects/BEVFusion/configs/t4dataset/BEVFusion-L/{bevfusion_lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m.py => bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py} (97%) rename projects/BEVFusion/configs/t4dataset/BEVFusion-L/{bevfusion_lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m.py => bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py} (97%) rename projects/BEVFusion/configs/t4dataset/BEVFusion-L/{bevfusion_lidar_voxel_second_secfpn_50e_4xb8_base_120m.py => bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py} (94%) rename projects/BEVFusion/configs/t4dataset/default/schedulers/{default_20e_4xb8_adamw_linear_cosine.py => default_20e_8xb8_adamw_linear_cosine.py} (97%) rename projects/BEVFusion/configs/t4dataset/default/schedulers/{default_30e_4xb8_adamw_cosine.py => default_30e_8xb8_adamw_cosine.py} (98%) rename projects/BEVFusion/configs/t4dataset/default/schedulers/{default_30e_4xb8_adamw_linear_cosine.py => default_30e_8xb8_adamw_linear_cosine.py} (98%) rename projects/BEVFusion/configs/t4dataset/default/schedulers/{default_50e_4xb8_adamw_cosine.py => default_50e_8xb8_adamw_cosine.py} (98%) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-C/bevfusion_camera_swin_fpn_30e_4xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-C/bevfusion_camera_swin_fpn_30e_8xb8_j6gen2_base_120m.py similarity index 97% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-C/bevfusion_camera_swin_fpn_30e_4xb8_j6gen2_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-C/bevfusion_camera_swin_fpn_30e_8xb8_j6gen2_base_120m.py index b781e2c71..e65c52ece 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-C/bevfusion_camera_swin_fpn_30e_4xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-C/bevfusion_camera_swin_fpn_30e_8xb8_j6gen2_base_120m.py @@ -3,7 +3,7 @@ "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", "../default/pipelines/default_camera_lidar_intensity_120m.py", "../default/models/default_camera_swin_fpn_120m.py", - "../default/schedulers/default_30e_4xb8_adamw_linear_cosine.py", + "../default/schedulers/default_30e_8xb8_adamw_linear_cosine.py", "../default/default_misc.py", ] @@ -16,7 +16,7 @@ info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_camera/j6gen2_base/" + _base_.dataset_type -experiment_name = "bevfusion_camera_swin_fpn_30e_4xb8_j6gen2_base_120m" +experiment_name = "bevfusion_camera_swin_fpn_30e_8xb8_j6gen2_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_j6gen2_base_120m.py similarity index 98% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_j6gen2_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_j6gen2_base_120m.py index a1ab10f57..4f81af760 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_j6gen2_base_120m.py @@ -3,7 +3,7 @@ "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", "../default/pipelines/default_camera_lidar_intensity_120m.py", "../default/models/default_camera_swin_fpn_lidar_second_secfpn_120m.py", - "../default/schedulers/default_20e_4xb8_adamw_linear_cosine.py", + "../default/schedulers/default_20e_8xb8_adamw_linear_cosine.py", "../default/default_misc.py", ] @@ -16,7 +16,7 @@ info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_camera_lidar_intensity/j6gen2_base/" + _base_.dataset_type -experiment_name = "bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_j6gen2_base_120m" +experiment_name = "bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_j6gen2_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_jpntaxi_gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m.py similarity index 98% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_jpntaxi_gen2_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m.py index a9887a15c..6556cf818 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_jpntaxi_gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m.py @@ -3,7 +3,7 @@ "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2_base.py", "../default/pipelines/default_camera_lidar_intensity_120m.py", "../default/models/default_camera_swin_fpn_lidar_second_secfpn_120m.py", - "../default/schedulers/default_20e_4xb8_adamw_linear_cosine.py", + "../default/schedulers/default_20e_8xb8_adamw_linear_cosine.py", "../default/default_misc.py", ] @@ -16,7 +16,7 @@ info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_camera_lidar_intensity/jpntaxi_gen2_base/" + _base_.dataset_type -experiment_name = "bevfusion_camera_lidar_voxel_second_secfpn_20e_4xb8_jpntaxi_gen2_base_120m" +experiment_name = "bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py similarity index 97% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index 8b0aef32e..5d743e184 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -3,7 +3,7 @@ "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", "../default/pipelines/default_offline_lidar_intensity_120m.py", "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_30e_4xb8_adamw_cosine.py", + "../default/schedulers/default_30e_8xb8_adamw_cosine.py", "../default/default_misc.py", ] @@ -16,7 +16,7 @@ info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_intensity_offline/j6gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m" +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py similarity index 97% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py index 59f91c8a4..da461a567 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py @@ -3,7 +3,7 @@ "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2_base.py", "../default/pipelines/default_offline_lidar_intensity_120m.py", "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_30e_4xb8_adamw_cosine.py", + "../default/schedulers/default_30e_8xb8_adamw_cosine.py", "../default/default_misc.py", ] @@ -16,7 +16,7 @@ info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_intensity_offline/jpntaxi_gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m" +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_50e_4xb8_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py similarity index 97% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_50e_4xb8_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py index df500705c..89bb7cd7b 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_50e_4xb8_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L-offline/bevfusion_offline_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py @@ -4,7 +4,7 @@ "../default/pipelines/default_offline_lidar_120m.py", "../models/default_lidar_second_secfpn_120m.py", "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_50e_4xb8_adamw_cosine.py", + "../default/schedulers/default_50e_8xb8_adamw_cosine.py", "../default/default_misc.py", ] @@ -17,7 +17,7 @@ info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_offline/base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_50e_4xb8_base_120m" +experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py similarity index 97% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index 178f5ff3d..69be0f0d9 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -3,7 +3,7 @@ "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", "../default/pipelines/default_lidar_intensity_120m.py", "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_30e_4xb8_adamw_cosine.py", + "../default/schedulers/default_30e_8xb8_adamw_cosine.py", "../default/default_misc.py", ] @@ -16,7 +16,7 @@ info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_intensity/j6gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_4xb8_j6gen2_base_120m" +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py similarity index 97% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py index e2b2d1678..e6addac7d 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py @@ -3,7 +3,7 @@ "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2_base.py", "../default/pipelines/default_lidar_intensity_120m.py", "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_30e_4xb8_adamw_cosine.py", + "../default/schedulers/default_30e_8xb8_adamw_cosine.py", "../default/default_misc.py", ] @@ -16,7 +16,7 @@ info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_intensity/jpntaxi_gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_4xb8_jpntaxi_gen2_base_120m" +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_4xb8_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py similarity index 94% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_4xb8_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py index d65c470d9..a5c72aef0 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_4xb8_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py @@ -3,7 +3,7 @@ "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/base.py", "../default/pipelines/default_lidar_120m.py", "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_50e_4xb8_adamw_cosine.py", + "../default/schedulers/default_50e_8xb8_adamw_cosine.py", "../default/default_misc.py", ] @@ -13,10 +13,10 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" +info_directory_path = "info/kokseang_2_6_1/" -experiment_group_name = "bevfusion_lidar/base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_50e_4xb8_base_120m" +experiment_group_name = "bevfusion_lidar_2.6.0/base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_4xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py similarity index 97% rename from projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_4xb8_adamw_linear_cosine.py rename to projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py index 8dc5e7bf1..d491eaa4b 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_4xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py @@ -1,11 +1,11 @@ # learning rate -# lr = 0.0001 -lr = 1e-4 +# lr = 0.0002 +lr = 2e-4 t_max = 6 max_epochs = 20 val_interval = 1 -train_gpu_size = 4 +train_gpu_size = 8 test_batch_size = 2 train_batch_size = 8 diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_4xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py similarity index 98% rename from projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_4xb8_adamw_cosine.py rename to projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py index 07a9110c7..c5053d943 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_4xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py @@ -1,10 +1,10 @@ # learning rate -lr = 0.0001 +lr = 2e-4 t_max = 8 max_epochs = 30 val_interval = 5 -train_gpu_size = 4 +train_gpu_size = 8 test_batch_size = 2 train_batch_size = 8 diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_4xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py similarity index 98% rename from projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_4xb8_adamw_linear_cosine.py rename to projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py index 9d4ee8e61..c05aeafcb 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_4xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py @@ -1,10 +1,10 @@ # learning rate -lr = 1e-4 +lr = 2e-4 t_max = 8 max_epochs = 30 val_interval = 1 -train_gpu_size = 4 +train_gpu_size = 8 test_batch_size = 2 train_batch_size = 8 diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_4xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py similarity index 98% rename from projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_4xb8_adamw_cosine.py rename to projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py index 29fc38b4c..fc1914dde 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_4xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py @@ -1,10 +1,10 @@ # learning rate -lr = 0.0001 +lr = 2e-4 t_max = 15 max_epochs = 50 val_interval = 5 -train_gpu_size = 4 +train_gpu_size = 8 test_batch_size = 2 train_batch_size = 8 From 84024516eafe70aac0252f8b1cafbf40ba7fd05f Mon Sep 17 00:00:00 2001 From: KokSeang Tan Date: Tue, 24 Mar 2026 16:48:43 +0900 Subject: [PATCH 03/68] Update config --- ..._voxel_second_secfpn_20e_8xb8_jpntaxi_base_120m.py} | 6 +++--- ...ar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py | 6 ++++-- ..._voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py} | 10 ++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) rename projects/BEVFusion/configs/t4dataset/BEVFusion-CL/{bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m.py => bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_base_120m.py} (98%) rename projects/BEVFusion/configs/t4dataset/BEVFusion-L/{bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py => bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py} (92%) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_base_120m.py similarity index 98% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_base_120m.py index 6556cf818..20c85b1d8 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-CL/bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_base_120m.py @@ -1,6 +1,6 @@ _base_ = [ "../../../../../autoware_ml/configs/detection3d/default_runtime.py", - "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2_base.py", + "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py", "../default/pipelines/default_camera_lidar_intensity_120m.py", "../default/models/default_camera_swin_fpn_lidar_second_secfpn_120m.py", "../default/schedulers/default_20e_8xb8_adamw_linear_cosine.py", @@ -15,8 +15,8 @@ data_root = "data/t4dataset/" info_directory_path = "info/user_name/" -experiment_group_name = "bevfusion_camera_lidar_intensity/jpntaxi_gen2_base/" + _base_.dataset_type -experiment_name = "bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_gen2_base_120m" +experiment_group_name = "bevfusion_camera_lidar_intensity/jpntaxi_base/" + _base_.dataset_type +experiment_name = "bevfusion_camera_lidar_voxel_second_secfpn_20e_8xb8_jpntaxi_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index 69be0f0d9..e43f9c485 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -13,9 +13,9 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" +info_directory_path = "info/kokseang_2_6_1/" -experiment_group_name = "bevfusion_lidar_intensity/j6gen2_base/" + _base_.dataset_type +experiment_group_name = "bevfusion_lidar_intensity_2.6.1/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name @@ -143,3 +143,5 @@ checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), ) log_processor = dict(window_size=50) + +load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_40.pth" \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py similarity index 92% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index e6addac7d..8538784f8 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -1,6 +1,6 @@ _base_ = [ "../../../../../autoware_ml/configs/detection3d/default_runtime.py", - "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2_base.py", + "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py", "../default/pipelines/default_lidar_intensity_120m.py", "../default/models/default_lidar_second_secfpn_120m.py", "../default/schedulers/default_30e_8xb8_adamw_cosine.py", @@ -13,10 +13,10 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" +info_directory_path = "info/kokseang_2_6_1/" -experiment_group_name = "bevfusion_lidar_intensity/jpntaxi_gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_gen2_base_120m" +experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter @@ -143,3 +143,5 @@ checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), ) log_processor = dict(window_size=50) + +load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_40.pth" \ No newline at end of file From cf6e13dea087c2983e045df78840b86c166cd79a Mon Sep 17 00:00:00 2001 From: KokSeang Tan Date: Wed, 25 Mar 2026 19:07:44 +0900 Subject: [PATCH 04/68] Update config --- ...n_30e_8xb8_j6gen2_base_120m_t4metric_v2.py | 78 +++++++++++++++++++ ..._30e_8xb8_jpntaxi_base_120m_t4metric_v2.py | 78 +++++++++++++++++++ ...d_secfpn_50e_8xb8_base_120m_t4metric_v2.py | 78 +++++++++++++++++++ 3 files changed, 234 insertions(+) create mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py create mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py create mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py new file mode 100644 index 000000000..f048ab1a8 --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py @@ -0,0 +1,78 @@ +_base_ = [ + "./bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py", +] + +# user setting +data_root = "data/t4dataset/" +info_directory_path = "info/kokseang_2_6_1/" + +experiment_group_name = "bevfusion_lidar_intensity_2.6.1/j6gen2_base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2" +work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name + +# Add evaluator configs +perception_evaluator_configs = dict( + dataset_paths=_base_.data_root, + frame_id="base_link", + evaluation_config_dict=_base_.evaluator_metric_configs, + load_raw_data=False, +) + +frame_pass_fail_config = dict( + target_labels=_base_.class_names, + # Matching thresholds per class (must align with `plane_distance_thresholds` used in evaluation) + matching_threshold_list=[2.0, 2.0, 2.0, 2.0, 2.0], + confidence_threshold_list=None, +) + +training_statistics_parquet_path = ( + _base_.data_root + _base_.info_directory_path + _base_.info_train_statistics_file_name +) +testing_statistics_parquet_path = _base_.data_root + _base_.info_directory_path + _base_.info_test_statistics_file_name +validation_statistics_parquet_path = ( + _base_.data_root + _base_.info_directory_path + _base_.info_val_statistics_file_name +) + +val_evaluator = dict( + _delete_=True, + type="T4MetricV2", + data_root=_base_.data_root, + ann_file=_base_.data_root + _base_.info_directory_path + _base_.info_val_file_name, + training_statistics_parquet_path=training_statistics_parquet_path, + testing_statistics_parquet_path=testing_statistics_parquet_path, + validation_statistics_parquet_path=validation_statistics_parquet_path, + output_dir="validation", + dataset_name="base", + perception_evaluator_configs=perception_evaluator_configs, + critical_object_filter_config=None, + frame_pass_fail_config=frame_pass_fail_config, + num_workers=64, + scene_batch_size=-1, + write_metric_summary=False, + class_names={{_base_.class_names}}, + name_mapping={{_base_.name_mapping}}, + experiment_name=experiment_name, + experiment_group_name=_base_.experiment_group_name, +) + +test_evaluator = dict( + _delete_=True, + type="T4MetricV2", + data_root=_base_.data_root, + ann_file=_base_.data_root + _base_.info_directory_path + _base_.info_test_file_name, + training_statistics_parquet_path=training_statistics_parquet_path, + testing_statistics_parquet_path=testing_statistics_parquet_path, + validation_statistics_parquet_path=validation_statistics_parquet_path, + output_dir="testing", + dataset_name="base", + perception_evaluator_configs=perception_evaluator_configs, + critical_object_filter_config=None, + frame_pass_fail_config=frame_pass_fail_config, + num_workers=64, + scene_batch_size=-1, + write_metric_summary=True, + class_names={{_base_.class_names}}, + name_mapping={{_base_.name_mapping}}, + experiment_name=experiment_name, + experiment_group_name=_base_.experiment_group_name, +) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py new file mode 100644 index 000000000..b4d8ddfbf --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py @@ -0,0 +1,78 @@ +_base_ = [ + "./bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py", +] + +# user setting +data_root = "data/t4dataset/" +info_directory_path = "info/kokseang_2_6_1/" + +experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2" +work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name + +# Add evaluator configs +perception_evaluator_configs = dict( + dataset_paths=_base_.data_root, + frame_id="base_link", + evaluation_config_dict=_base_.evaluator_metric_configs, + load_raw_data=False, +) + +frame_pass_fail_config = dict( + target_labels=_base_.class_names, + # Matching thresholds per class (must align with `plane_distance_thresholds` used in evaluation) + matching_threshold_list=[2.0, 2.0, 2.0, 2.0, 2.0], + confidence_threshold_list=None, +) + +training_statistics_parquet_path = ( + _base_.data_root + _base_.info_directory_path + _base_.info_train_statistics_file_name +) +testing_statistics_parquet_path = _base_.data_root + _base_.info_directory_path + _base_.info_test_statistics_file_name +validation_statistics_parquet_path = ( + _base_.data_root + _base_.info_directory_path + _base_.info_val_statistics_file_name +) + +val_evaluator = dict( + _delete_=True, + type="T4MetricV2", + data_root=_base_.data_root, + ann_file=_base_.data_root + _base_.info_directory_path + _base_.info_val_file_name, + training_statistics_parquet_path=training_statistics_parquet_path, + testing_statistics_parquet_path=testing_statistics_parquet_path, + validation_statistics_parquet_path=validation_statistics_parquet_path, + output_dir="validation", + dataset_name="base", + perception_evaluator_configs=perception_evaluator_configs, + critical_object_filter_config=None, + frame_pass_fail_config=frame_pass_fail_config, + num_workers=64, + scene_batch_size=-1, + write_metric_summary=False, + class_names={{_base_.class_names}}, + name_mapping={{_base_.name_mapping}}, + experiment_name=experiment_name, + experiment_group_name=_base_.experiment_group_name, +) + +test_evaluator = dict( + _delete_=True, + type="T4MetricV2", + data_root=_base_.data_root, + ann_file=_base_.data_root + _base_.info_directory_path + _base_.info_test_file_name, + training_statistics_parquet_path=training_statistics_parquet_path, + testing_statistics_parquet_path=testing_statistics_parquet_path, + validation_statistics_parquet_path=validation_statistics_parquet_path, + output_dir="testing", + dataset_name="base", + perception_evaluator_configs=perception_evaluator_configs, + critical_object_filter_config=None, + frame_pass_fail_config=frame_pass_fail_config, + num_workers=64, + scene_batch_size=-1, + write_metric_summary=True, + class_names={{_base_.class_names}}, + name_mapping={{_base_.name_mapping}}, + experiment_name=experiment_name, + experiment_group_name=_base_.experiment_group_name, +) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py new file mode 100644 index 000000000..7a0215139 --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py @@ -0,0 +1,78 @@ +_base_ = [ + "./bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py", +] + +# user setting +data_root = "data/t4dataset/" +info_directory_path = "info/kokseang_2_6_1/" + +experiment_group_name = "bevfusion_lidar_2.6.0/base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2" +work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name + +# Add evaluator configs +perception_evaluator_configs = dict( + dataset_paths=_base_.data_root, + frame_id="base_link", + evaluation_config_dict=_base_.evaluator_metric_configs, + load_raw_data=False, +) + +frame_pass_fail_config = dict( + target_labels=_base_.class_names, + # Matching thresholds per class (must align with `plane_distance_thresholds` used in evaluation) + matching_threshold_list=[2.0, 2.0, 2.0, 2.0, 2.0], + confidence_threshold_list=None, +) + +training_statistics_parquet_path = ( + _base_.data_root + _base_.info_directory_path + _base_.info_train_statistics_file_name +) +testing_statistics_parquet_path = _base_.data_root + _base_.info_directory_path + _base_.info_test_statistics_file_name +validation_statistics_parquet_path = ( + _base_.data_root + _base_.info_directory_path + _base_.info_val_statistics_file_name +) + +val_evaluator = dict( + _delete_=True, + type="T4MetricV2", + data_root=_base_.data_root, + ann_file=_base_.data_root + _base_.info_directory_path + _base_.info_val_file_name, + training_statistics_parquet_path=training_statistics_parquet_path, + testing_statistics_parquet_path=testing_statistics_parquet_path, + validation_statistics_parquet_path=validation_statistics_parquet_path, + output_dir="validation", + dataset_name="base", + perception_evaluator_configs=perception_evaluator_configs, + critical_object_filter_config=None, + frame_pass_fail_config=frame_pass_fail_config, + num_workers=64, + scene_batch_size=-1, + write_metric_summary=False, + class_names={{_base_.class_names}}, + name_mapping={{_base_.name_mapping}}, + experiment_name=experiment_name, + experiment_group_name=_base_.experiment_group_name, +) + +test_evaluator = dict( + _delete_=True, + type="T4MetricV2", + data_root=_base_.data_root, + ann_file=_base_.data_root + _base_.info_directory_path + _base_.info_test_file_name, + training_statistics_parquet_path=training_statistics_parquet_path, + testing_statistics_parquet_path=testing_statistics_parquet_path, + validation_statistics_parquet_path=validation_statistics_parquet_path, + output_dir="testing", + dataset_name="base", + perception_evaluator_configs=perception_evaluator_configs, + critical_object_filter_config=None, + frame_pass_fail_config=frame_pass_fail_config, + num_workers=64, + scene_batch_size=-1, + write_metric_summary=True, + class_names={{_base_.class_names}}, + name_mapping={{_base_.name_mapping}}, + experiment_name=experiment_name, + experiment_group_name=_base_.experiment_group_name, +) From e1ebc993b9c8f17090a64b5a11476a3733e89084 Mon Sep 17 00:00:00 2001 From: KokSeang Tan Date: Thu, 26 Mar 2026 20:20:08 +0900 Subject: [PATCH 05/68] Update config --- .../configs/detection3d/dataset/t4dataset/jpntaxi_base.py | 1 - .../pipelines/default_camera_lidar_intensity_120m.py | 4 ++-- .../t4dataset/default/pipelines/default_lidar_120m.py | 8 ++++++-- .../default/pipelines/default_lidar_intensity_120m.py | 8 ++++++-- .../schedulers/default_20e_8xb8_adamw_linear_cosine.py | 2 +- .../default/schedulers/default_30e_8xb8_adamw_cosine.py | 2 +- .../schedulers/default_30e_8xb8_adamw_linear_cosine.py | 2 +- .../default/schedulers/default_50e_8xb8_adamw_cosine.py | 2 +- 8 files changed, 18 insertions(+), 11 deletions(-) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py index 28ba4ab33..a50cf8852 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py @@ -18,7 +18,6 @@ # dataset scene setting dataset_test_groups = { - "jpntaxi_gen2": ("t4dataset_jpntaxi_gen2_infos_test.pkl", False), "jpntaxi_base": ("t4dataset_jpntaxi_base_infos_test.pkl", True), } diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_camera_lidar_intensity_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_camera_lidar_intensity_120m.py index acac440dc..9d1910dab 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_camera_lidar_intensity_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_camera_lidar_intensity_120m.py @@ -84,8 +84,8 @@ "traffic_cone", ], ), - dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), - dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), + # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), + # dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), dict(type="PointShuffle"), dict( type="Pack3DDetInputs", diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py index 7ffedc232..7ee393ea6 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py @@ -64,8 +64,8 @@ "traffic_cone", ], ), - dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), - dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), + # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=1), + # dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), dict(type="PointShuffle"), dict( type="Pack3DDetInputs", @@ -89,6 +89,8 @@ "img_aug_matrix", "lidar_aug_matrix", "timestamp", + "vehicle_type", + "city", ], ), ] @@ -130,6 +132,8 @@ "num_pts_feats", "num_views", "timestamp", + "vehicle_type", + "city", ], ), ] diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py index c7fa1b2cb..8b154901e 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py @@ -64,8 +64,8 @@ "traffic_cone", ], ), - dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), - dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), + # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), + # dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), dict(type="PointShuffle"), dict( type="Pack3DDetInputs", @@ -89,6 +89,8 @@ "img_aug_matrix", "lidar_aug_matrix", "timestamp", + "vehicle_type", + "city", ], ), ] @@ -130,6 +132,8 @@ "num_pts_feats", "num_views", "timestamp", + "vehicle_type", + "city", ], ), ] diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py index d491eaa4b..c3f82e76d 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py @@ -1,6 +1,6 @@ # learning rate # lr = 0.0002 -lr = 2e-4 +lr = 1.5e-4 t_max = 6 max_epochs = 20 val_interval = 1 diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py index c5053d943..94c2a4160 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py @@ -1,5 +1,5 @@ # learning rate -lr = 2e-4 +lr = 1.5e-4 t_max = 8 max_epochs = 30 val_interval = 5 diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py index c05aeafcb..f5c747e62 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py @@ -1,5 +1,5 @@ # learning rate -lr = 2e-4 +lr = 1.5e-4 t_max = 8 max_epochs = 30 val_interval = 1 diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py index fc1914dde..f0bd87ca4 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py @@ -1,5 +1,5 @@ # learning rate -lr = 2e-4 +lr = 1.5e-4 t_max = 15 max_epochs = 50 val_interval = 5 From 2dac4333e0dce899701b0602778626e0df191a8a Mon Sep 17 00:00:00 2001 From: KokSeang Tan Date: Fri, 27 Mar 2026 11:01:29 +0900 Subject: [PATCH 06/68] Update config --- .../t4dataset/default/pipelines/default_lidar_120m.py | 10 +++++----- .../schedulers/default_20e_8xb8_adamw_linear_cosine.py | 6 +++++- .../schedulers/default_30e_8xb8_adamw_cosine.py | 6 +++++- .../schedulers/default_30e_8xb8_adamw_linear_cosine.py | 6 +++++- .../schedulers/default_50e_8xb8_adamw_cosine.py | 6 +++++- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py index 7ee393ea6..347ba6452 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py @@ -54,14 +54,14 @@ classes=[ "car", "truck", - "construction_vehicle", + # "construction_vehicle", "bus", - "trailer", - "barrier", - "motorcycle", + # "trailer", + # "barrier", + # "motorcycle", "bicycle", "pedestrian", - "traffic_cone", + # "traffic_cone", ], ), # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=1), diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py index c3f82e76d..a0be6f4ab 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py @@ -1,6 +1,6 @@ # learning rate # lr = 0.0002 -lr = 1.5e-4 +lr = 1.0e-4 t_max = 6 max_epochs = 20 val_interval = 1 @@ -57,3 +57,7 @@ ) auto_scale_lr = dict(enable=False, base_batch_size=train_gpu_size * train_batch_size) + +# Only set if the number of train_gpu_size more than 1 +if train_gpu_size > 1: + sync_bn = "torch" \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py index 94c2a4160..edcbd74bf 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py @@ -1,5 +1,5 @@ # learning rate -lr = 1.5e-4 +lr = 1.0e-4 t_max = 8 max_epochs = 30 val_interval = 5 @@ -69,3 +69,7 @@ ) auto_scale_lr = dict(enable=False, base_batch_size=train_gpu_size * train_batch_size) + +# Only set if the number of train_gpu_size more than 1 +if train_gpu_size > 1: + sync_bn = "torch" \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py index f5c747e62..32e8d59fa 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py @@ -1,5 +1,5 @@ # learning rate -lr = 1.5e-4 +lr = 1.0e-4 t_max = 8 max_epochs = 30 val_interval = 1 @@ -56,3 +56,7 @@ ) auto_scale_lr = dict(enable=False, base_batch_size=train_gpu_size * train_batch_size) + +# Only set if the number of train_gpu_size more than 1 +if train_gpu_size > 1: + sync_bn = "torch" \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py index f0bd87ca4..58192c2de 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py @@ -1,5 +1,5 @@ # learning rate -lr = 1.5e-4 +lr = 1.0e-4 t_max = 15 max_epochs = 50 val_interval = 5 @@ -69,3 +69,7 @@ ) auto_scale_lr = dict(enable=False, base_batch_size=train_gpu_size * train_batch_size) + +# Only set if the number of train_gpu_size more than 1 +if train_gpu_size > 1: + sync_bn = "torch" \ No newline at end of file From 9046b7bb1b3603345dc886903794ea118e9737f4 Mon Sep 17 00:00:00 2001 From: KokSeang Tan Date: Fri, 27 Mar 2026 11:29:07 +0900 Subject: [PATCH 07/68] Update config --- tools/detection3d/train.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/detection3d/train.py b/tools/detection3d/train.py index c379025d1..254783b92 100644 --- a/tools/detection3d/train.py +++ b/tools/detection3d/train.py @@ -123,6 +123,10 @@ def main(): # build customized runner from the registry # if 'runner_type' is set in the cfg runner = RUNNERS.build(cfg) + + # Output all model + print_log(f"Runner model: ", logger="current") + print_log(f"{runner.model}", logger="current") # start training runner.train() From d4d93fa3bab4fbe63c528c2a029bfb8e3a5346db Mon Sep 17 00:00:00 2001 From: KokSeang Tan Date: Sat, 28 Mar 2026 00:39:14 +0900 Subject: [PATCH 08/68] Added --- projects/BEVFusion/bevfusion/__init__.py | 3 ++- projects/BEVFusion/bevfusion/bevfusion_head.py | 2 +- projects/BEVFusion/bevfusion/utils.py | 1 + .../default/models/default_lidar_second_secfpn_120m.py | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/BEVFusion/bevfusion/__init__.py b/projects/BEVFusion/bevfusion/__init__.py index e849db227..947ebab23 100644 --- a/projects/BEVFusion/bevfusion/__init__.py +++ b/projects/BEVFusion/bevfusion/__init__.py @@ -6,7 +6,7 @@ from .sparse_encoder import BEVFusionSparseEncoder from .transformer import TransformerDecoderLayer from .transforms_3d import BEVFusionGlobalRotScaleTrans, BEVFusionRandomFlip3D, GridMask, ImageAug3D -from .utils import BBoxBEVL1Cost, HeuristicAssigner3D, HungarianAssigner3D, IoU3DCost +from .utils import BBoxBEVL1Cost, HeuristicAssigner3D, HungarianAssigner3D, IoU3DCost, TransFusionBBoxCoder __all__ = [ "BEVFusion", @@ -26,4 +26,5 @@ "TransformerDecoderLayer", "BEVFusionRandomFlip3D", "BEVFusionGlobalRotScaleTrans", + "TransFusionBBoxCoder", ] diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index 143c35a14..853523c4f 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -554,7 +554,7 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx): vel = None boxes_dict = self.bbox_coder.decode( - score, rot, dim, center, height, vel + score, rot, dim, center, height, vel, filter=False ) # decode the prediction to real world metric bbox bboxes_tensor = boxes_dict[0]["bboxes"] gt_bboxes_tensor = gt_bboxes_3d.tensor.to(score.device) diff --git a/projects/BEVFusion/bevfusion/utils.py b/projects/BEVFusion/bevfusion/utils.py index c47604dbd..5b7c94877 100644 --- a/projects/BEVFusion/bevfusion/utils.py +++ b/projects/BEVFusion/bevfusion/utils.py @@ -93,6 +93,7 @@ def decode(self, heatmap, rot, dim, center, height, vel, filter=False): predictions_dicts.append(predictions_dict) if filter is False: + print("filter is False") return predictions_dicts # use score threshold diff --git a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py index b5d9a8fdc..a7fac4b37 100644 --- a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py @@ -98,7 +98,7 @@ bbox_coder=dict( type="TransFusionBBoxCoder", post_center_range=[-200.0, -200.0, -10.0, 200.0, 200.0, 10.0], - score_threshold=0.0, + score_threshold=0.1, out_size_factor=8, code_size=10, ), From b2714a87052e441b94bf8cc15793ef12fb39698f Mon Sep 17 00:00:00 2001 From: KokSeang Tan Date: Tue, 31 Mar 2026 10:58:41 +0900 Subject: [PATCH 09/68] Added --- projects/BEVFusion/bevfusion/utils.py | 1 - .../default/models/default_lidar_second_secfpn_120m.py | 2 +- .../t4dataset/default/pipelines/default_lidar_120m.py | 7 +------ .../default/pipelines/default_lidar_intensity_120m.py | 5 ----- .../schedulers/default_20e_8xb8_adamw_linear_cosine.py | 4 ++-- .../default/schedulers/default_30e_8xb8_adamw_cosine.py | 3 ++- .../schedulers/default_30e_8xb8_adamw_linear_cosine.py | 3 ++- .../default/schedulers/default_50e_8xb8_adamw_cosine.py | 3 ++- 8 files changed, 10 insertions(+), 18 deletions(-) diff --git a/projects/BEVFusion/bevfusion/utils.py b/projects/BEVFusion/bevfusion/utils.py index 5b7c94877..c47604dbd 100644 --- a/projects/BEVFusion/bevfusion/utils.py +++ b/projects/BEVFusion/bevfusion/utils.py @@ -93,7 +93,6 @@ def decode(self, heatmap, rot, dim, center, height, vel, filter=False): predictions_dicts.append(predictions_dict) if filter is False: - print("filter is False") return predictions_dicts # use score threshold diff --git a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py index a7fac4b37..b5d9a8fdc 100644 --- a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py @@ -98,7 +98,7 @@ bbox_coder=dict( type="TransFusionBBoxCoder", post_center_range=[-200.0, -200.0, -10.0, 200.0, 200.0, 10.0], - score_threshold=0.1, + score_threshold=0.0, out_size_factor=8, code_size=10, ), diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py index 347ba6452..e79c30710 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py @@ -54,17 +54,12 @@ classes=[ "car", "truck", - # "construction_vehicle", "bus", - # "trailer", - # "barrier", - # "motorcycle", "bicycle", "pedestrian", - # "traffic_cone", ], ), - # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=1), + # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), # dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), dict(type="PointShuffle"), dict( diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py index 8b154901e..ce7985fd8 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py @@ -54,14 +54,9 @@ classes=[ "car", "truck", - "construction_vehicle", "bus", - "trailer", - "barrier", - "motorcycle", "bicycle", "pedestrian", - "traffic_cone", ], ), # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py index a0be6f4ab..d1d11e7c9 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py @@ -1,6 +1,6 @@ # learning rate -# lr = 0.0002 -lr = 1.0e-4 +# 1e-4 * sqrt(2) = 0.0001414 +lr = 1.4141e-4 t_max = 6 max_epochs = 20 val_interval = 1 diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py index edcbd74bf..f4f102170 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py @@ -1,5 +1,6 @@ # learning rate -lr = 1.0e-4 +# 1e-4 * sqrt(2) = 0.0001414 +lr = 1.4141e-4 t_max = 8 max_epochs = 30 val_interval = 5 diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py index 32e8d59fa..44870ccf4 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py @@ -1,5 +1,6 @@ # learning rate -lr = 1.0e-4 +# 1e-4 * sqrt(2) = 0.0001414 +lr = 1.4141e-4 t_max = 8 max_epochs = 30 val_interval = 1 diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py index 58192c2de..542ccdd8e 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py @@ -1,5 +1,6 @@ # learning rate -lr = 1.0e-4 +# 1e-4 * sqrt(2) = 0.0001414 +lr = 1.4141e-4 t_max = 15 max_epochs = 50 val_interval = 5 From 43adb38bf15ea01b0ff81b06a5e4e435a6e490f9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 02:01:59 +0000 Subject: [PATCH 10/68] ci(pre-commit): autofix --- projects/BEVFusion/bevfusion/__init__.py | 2 +- ...ion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py | 2 +- ...on_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py | 2 +- .../schedulers/default_20e_8xb8_adamw_linear_cosine.py | 2 +- .../default/schedulers/default_30e_8xb8_adamw_cosine.py | 2 +- .../schedulers/default_30e_8xb8_adamw_linear_cosine.py | 2 +- .../default/schedulers/default_50e_8xb8_adamw_cosine.py | 2 +- tools/detection3d/train.py | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/projects/BEVFusion/bevfusion/__init__.py b/projects/BEVFusion/bevfusion/__init__.py index 947ebab23..60a64b532 100644 --- a/projects/BEVFusion/bevfusion/__init__.py +++ b/projects/BEVFusion/bevfusion/__init__.py @@ -26,5 +26,5 @@ "TransformerDecoderLayer", "BEVFusionRandomFlip3D", "BEVFusionGlobalRotScaleTrans", - "TransFusionBBoxCoder", + "TransFusionBBoxCoder", ] diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index e43f9c485..d984b5585 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_40.pth" \ No newline at end of file +load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_40.pth" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 8538784f8..0878cef29 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_40.pth" \ No newline at end of file +load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_40.pth" diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py index d1d11e7c9..15ba38878 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_20e_8xb8_adamw_linear_cosine.py @@ -60,4 +60,4 @@ # Only set if the number of train_gpu_size more than 1 if train_gpu_size > 1: - sync_bn = "torch" \ No newline at end of file + sync_bn = "torch" diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py index f4f102170..a2cd2d2e9 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py @@ -73,4 +73,4 @@ # Only set if the number of train_gpu_size more than 1 if train_gpu_size > 1: - sync_bn = "torch" \ No newline at end of file + sync_bn = "torch" diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py index 44870ccf4..264eda921 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py @@ -60,4 +60,4 @@ # Only set if the number of train_gpu_size more than 1 if train_gpu_size > 1: - sync_bn = "torch" \ No newline at end of file + sync_bn = "torch" diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py index 542ccdd8e..87571d0b3 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_50e_8xb8_adamw_cosine.py @@ -73,4 +73,4 @@ # Only set if the number of train_gpu_size more than 1 if train_gpu_size > 1: - sync_bn = "torch" \ No newline at end of file + sync_bn = "torch" diff --git a/tools/detection3d/train.py b/tools/detection3d/train.py index 254783b92..f7e6309fb 100644 --- a/tools/detection3d/train.py +++ b/tools/detection3d/train.py @@ -123,8 +123,8 @@ def main(): # build customized runner from the registry # if 'runner_type' is set in the cfg runner = RUNNERS.build(cfg) - - # Output all model + + # Output all model print_log(f"Runner model: ", logger="current") print_log(f"{runner.model}", logger="current") From 73dd1c40c1100879b3a700fe5e82536019045cb0 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Wed, 8 Apr 2026 19:05:59 +0900 Subject: [PATCH 11/68] Added --- .../bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py | 4 +++- .../configs/t4dataset/default/pipelines/default_lidar_120m.py | 2 +- projects/BEVFusion/setup.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py index a5c72aef0..64bf2208a 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_1/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_2.6.0/base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" @@ -143,3 +143,5 @@ checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), ) log_processor = dict(window_size=50) + +resume = True \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py index e79c30710..a74ad2ea0 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py @@ -1,6 +1,6 @@ # Dataset parameters backend_args = None -num_workers = 32 +num_workers = 16 input_modality = dict(use_lidar=True, use_camera=False) # range setting diff --git a/projects/BEVFusion/setup.py b/projects/BEVFusion/setup.py index 837d1f53e..38f588b20 100644 --- a/projects/BEVFusion/setup.py +++ b/projects/BEVFusion/setup.py @@ -43,7 +43,7 @@ def make_cuda_ext(name, module, sources, sources_cuda=[], extra_args=[], extra_i name="bev_pool", install_requires=[ "onnx_graphsurgeon==0.5.8", - "spconv-cu120==2.3.6", + "spconv-cu126==2.3.8", ], ext_modules=[ make_cuda_ext( From 89e26700d614ab6abc92212ad69083c84019083f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 10:06:34 +0000 Subject: [PATCH 12/68] ci(pre-commit): autofix --- .../bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py index 64bf2208a..0a2a178c6 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -resume = True \ No newline at end of file +resume = True From 380d7aa0d4e85934bc2bdd3bd8e88f7746acd4d4 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Fri, 10 Apr 2026 23:47:24 +0900 Subject: [PATCH 13/68] Added --- ...ion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index d984b5585..605e3cf7c 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_1/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m" @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_40.pth" +load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" From b60e45ae0ca338c30fdb16a7efcc9fb5332bae0e Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Sun, 12 Apr 2026 21:42:53 +0900 Subject: [PATCH 14/68] Update configs --- ..._lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py | 4 ++-- ..._second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py | 2 +- ...evfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 0878cef29..563f71cf9 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_1/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m" @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_40.pth" +load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py index b4d8ddfbf..238054ab5 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py @@ -4,7 +4,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_1/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py index 0a2a178c6..8bf21b1b2 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py @@ -15,7 +15,7 @@ data_root = "data/t4dataset/" info_directory_path = "info/kokseang_2_6_2/" -experiment_group_name = "bevfusion_lidar_2.6.0/base/" + _base_.dataset_type +experiment_group_name = "bevfusion_lidar_2.7.0/base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name @@ -31,6 +31,10 @@ pts_middle_encoder=dict( in_channels=_base_.point_use_dim, sparse_shape=_base_.grid_size, + num_aug_features=4, + # min-max normalization for x, y, z, time_lag, where the max of time lag technically is two seeps (200 ms) here + aug_features_min_values=[_base_.point_cloud_range[0], _base_.point_cloud_range[1], _base_.point_cloud_range[2], 0.0], + aug_features_max_values=[_base_.point_cloud_range[3], _base_.point_cloud_range[4], _base_.point_cloud_range[5], 0.2], ), bbox_head=dict( class_names=_base_.class_names, # Use class names to identify the correct class indices From 9b38a42898e724c57532b5ad6bf94546c870e809 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Mon, 13 Apr 2026 18:34:04 +0900 Subject: [PATCH 15/68] Added --- autoware_ml/configs/detection3d/dataset/t4dataset/base.py | 1 - .../configs/detection3d/dataset/t4dataset/jpntaxi_base.py | 2 +- ...on_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/base.py index c92d58431..d0744a131 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/base.py @@ -48,7 +48,6 @@ "j6gen2_base": ("t4dataset_j6gen2_base_infos_test.pkl", False), "j6gen2": ("t4dataset_j6gen2_infos_test.pkl", False), "largebus": ("t4dataset_largebus_infos_test.pkl", False), - "jpntaxi_base": ("t4dataset_jpntaxi_base_infos_test.pkl", False), "jpntaxi_gen2": ("t4dataset_jpntaxi_gen2_infos_test.pkl", False), "base": ("t4dataset_base_infos_test.pkl", True), } diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py index a50cf8852..b7ddb799a 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py @@ -18,7 +18,7 @@ # dataset scene setting dataset_test_groups = { - "jpntaxi_base": ("t4dataset_jpntaxi_base_infos_test.pkl", True), + "jpntaxi_gen2": ("t4dataset_jpntaxi_gen2_infos_test.pkl", True), } dataset_version_list = [ diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 0878cef29..563f71cf9 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_1/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m" @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_40.pth" +load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" From f39b5841db399a9ebd60bf4d40396c83cadd5089 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Fri, 17 Apr 2026 12:08:05 +0900 Subject: [PATCH 16/68] Updated --- ...idar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 563f71cf9..b6677ff05 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -15,7 +15,7 @@ data_root = "data/t4dataset/" info_directory_path = "info/kokseang_2_6_2/" -experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type +experiment_group_name = "bevfusion_lidar_intensity_2.7.1/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name @@ -31,6 +31,10 @@ pts_middle_encoder=dict( in_channels=_base_.point_use_dim, sparse_shape=_base_.grid_size, + num_aug_features=5, + # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here + aug_features_min_values=[_base_.point_cloud_range[0], _base_.point_cloud_range[1], _base_.point_cloud_range[2], 0.0, 0.0], + aug_features_max_values=[_base_.point_cloud_range[3], _base_.point_cloud_range[4], _base_.point_cloud_range[5], 255.0, 0.2], ), bbox_head=dict( class_names=_base_.class_names, # Use class names to identify the correct class indices @@ -144,4 +148,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" +load_from = "work_dirs/bevfusion_lidar_2.7.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_48.pth" From 24a88adf1e782379104d6d7ff64d408b3c263d8e Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Fri, 17 Apr 2026 12:08:56 +0900 Subject: [PATCH 17/68] Added --- ...on_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py | 2 +- ...el_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py | 2 +- ...n_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py | 5 +++-- ...l_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py | 2 +- ...dar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index 605e3cf7c..41a2152cf 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" +load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py index f048ab1a8..7dfc7e0f8 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py @@ -4,7 +4,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_1/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 563f71cf9..998e5a22e 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -16,7 +16,7 @@ info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m" +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_no_bicycle_pooling" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter @@ -48,6 +48,7 @@ pc_range=_base_.point_cloud_range[0:2], voxel_size=_base_.voxel_size[0:2], ), + dense_heatmap_pooling_classes=["car", "truck", "bus"], # Use class indices for pooling ), ) @@ -144,4 +145,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" +load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py index b4d8ddfbf..238054ab5 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py @@ -4,7 +4,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_1/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py index 7a0215139..4f9fb7b65 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py @@ -4,7 +4,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_1/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_2.6.0/base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2" From c637420d5e6e9f2fa898c581184a45098ce6469b Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Fri, 17 Apr 2026 12:10:58 +0900 Subject: [PATCH 18/68] Added --- ..._lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py | 4 ++-- ..._second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py | 2 +- ...lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py | 7 +++---- ...second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py | 2 +- ...vfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py | 4 +--- ...r_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py | 2 +- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index 41a2152cf..8c02ca112 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_2/" +info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m" @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" \ No newline at end of file +load_from "" \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py index 7dfc7e0f8..afb150284 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py @@ -4,7 +4,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_2/" +info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 998e5a22e..3dda36c3a 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -13,10 +13,10 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_2/" +info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_no_bicycle_pooling" +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter @@ -48,7 +48,6 @@ pc_range=_base_.point_cloud_range[0:2], voxel_size=_base_.voxel_size[0:2], ), - dense_heatmap_pooling_classes=["car", "truck", "bus"], # Use class indices for pooling ), ) @@ -145,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.6.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_50.pth" \ No newline at end of file +load_from "" \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py index 238054ab5..3320d2b08 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py @@ -4,7 +4,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_2/" +info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py index 0a2a178c6..38f3e369a 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_2/" +info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_2.6.0/base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" @@ -143,5 +143,3 @@ checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), ) log_processor = dict(window_size=50) - -resume = True diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py index 4f9fb7b65..c9a0050c0 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py @@ -4,7 +4,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_6_2/" +info_directory_path = "info/user_name/" experiment_group_name = "bevfusion_lidar_2.6.0/base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2" From 48879b8cb6540d0e07124a81bf13aa4b67ecb51e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 03:11:22 +0000 Subject: [PATCH 19/68] ci(pre-commit): autofix --- ...usion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py | 2 +- ...sion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index 8c02ca112..264f0da77 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from "" \ No newline at end of file +load_from "" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 3dda36c3a..f505ac5dc 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from "" \ No newline at end of file +load_from "" From 82457ab52003421646cf2c15070c60314eaabe6e Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Fri, 17 Apr 2026 12:12:18 +0900 Subject: [PATCH 20/68] Added --- .../default/pipelines/default_camera_lidar_intensity_120m.py | 2 -- .../configs/t4dataset/default/pipelines/default_lidar_120m.py | 2 -- .../t4dataset/default/pipelines/default_lidar_intensity_120m.py | 2 -- 3 files changed, 6 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_camera_lidar_intensity_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_camera_lidar_intensity_120m.py index 9d1910dab..963a218e1 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_camera_lidar_intensity_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_camera_lidar_intensity_120m.py @@ -84,8 +84,6 @@ "traffic_cone", ], ), - # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), - # dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), dict(type="PointShuffle"), dict( type="Pack3DDetInputs", diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py index a74ad2ea0..06d95be16 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py @@ -59,8 +59,6 @@ "pedestrian", ], ), - # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), - # dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), dict(type="PointShuffle"), dict( type="Pack3DDetInputs", diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py index ce7985fd8..4e74d3616 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py @@ -59,8 +59,6 @@ "pedestrian", ], ), - # dict(type="ObjectRangeMinPointsFilter", range_radius=[0, 60], min_num_points=2), - # dict(type="ObjectRangeMinPointsFilter", range_radius=[60, 130], min_num_points=1), dict(type="PointShuffle"), dict( type="Pack3DDetInputs", From 827bbb24c66e04e2d6c38f53423305de0010c075 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Fri, 17 Apr 2026 15:50:30 +0900 Subject: [PATCH 21/68] Updated --- ...ion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index 264f0da77..be535c560 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -15,7 +15,7 @@ data_root = "data/t4dataset/" info_directory_path = "info/user_name/" -experiment_group_name = "bevfusion_lidar_intensity_2.6.1/j6gen2_base/" + _base_.dataset_type +experiment_group_name = "bevfusion_lidar_intensity_2.7.1/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name @@ -144,4 +144,4 @@ ) log_processor = dict(window_size=50) -load_from "" +load_from = "work_dirs/bevfusion_lidar_2.7.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_48.pth" From 5f9a4a55156ee29a689a2e08b12064d208d8118d Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Fri, 17 Apr 2026 16:01:35 +0900 Subject: [PATCH 22/68] Updated --- ...n_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index be535c560..3e615b504 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_intensity_2.7.1/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m" @@ -31,6 +31,10 @@ pts_middle_encoder=dict( in_channels=_base_.point_use_dim, sparse_shape=_base_.grid_size, + num_aug_features=5, + # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here + aug_features_min_values=[_base_.point_cloud_range[0], _base_.point_cloud_range[1], _base_.point_cloud_range[2], 0.0, 0.0], + aug_features_max_values=[_base_.point_cloud_range[3], _base_.point_cloud_range[4], _base_.point_cloud_range[5], 255.0, 0.2], ), bbox_head=dict( class_names=_base_.class_names, # Use class names to identify the correct class indices From a26782abfb7c9b088845d9d778ab0babd520ed74 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Sat, 18 Apr 2026 17:24:44 +0900 Subject: [PATCH 23/68] Updated --- ...l_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py | 4 ++-- ..._lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py | 6 +----- ..._second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py index afb150284..62ea479fb 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py @@ -42,7 +42,7 @@ testing_statistics_parquet_path=testing_statistics_parquet_path, validation_statistics_parquet_path=validation_statistics_parquet_path, output_dir="validation", - dataset_name="base", + dataset_name="j6gen2_base", perception_evaluator_configs=perception_evaluator_configs, critical_object_filter_config=None, frame_pass_fail_config=frame_pass_fail_config, @@ -64,7 +64,7 @@ testing_statistics_parquet_path=testing_statistics_parquet_path, validation_statistics_parquet_path=validation_statistics_parquet_path, output_dir="testing", - dataset_name="base", + dataset_name="j6gen2_base", perception_evaluator_configs=perception_evaluator_configs, critical_object_filter_config=None, frame_pass_fail_config=frame_pass_fail_config, diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 0eb440472..73c1e4671 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -148,8 +148,4 @@ ) log_processor = dict(window_size=50) -<<<<<<< HEAD -load_from = "work_dirs/bevfusion_lidar_2.7.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_48.pth" -======= -load_from "" ->>>>>>> feat/releave_bevfusion_2_6 +# load_from = "" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py index 3320d2b08..0109e96d9 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py @@ -42,7 +42,7 @@ testing_statistics_parquet_path=testing_statistics_parquet_path, validation_statistics_parquet_path=validation_statistics_parquet_path, output_dir="validation", - dataset_name="base", + dataset_name="jpntaxi_base", perception_evaluator_configs=perception_evaluator_configs, critical_object_filter_config=None, frame_pass_fail_config=frame_pass_fail_config, @@ -64,7 +64,7 @@ testing_statistics_parquet_path=testing_statistics_parquet_path, validation_statistics_parquet_path=validation_statistics_parquet_path, output_dir="testing", - dataset_name="base", + dataset_name="jpntaxi_base", perception_evaluator_configs=perception_evaluator_configs, critical_object_filter_config=None, frame_pass_fail_config=frame_pass_fail_config, From f4c01a542618b3c592ddf1cd6e2b9d1657abccbf Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Sat, 18 Apr 2026 17:51:58 +0900 Subject: [PATCH 24/68] Updated --- autoware_ml/detection3d/datasets/t4dataset.py | 2 +- ..._second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py | 7 ++----- ...lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py | 2 +- ...second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py | 3 --- ...r_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py | 3 --- 5 files changed, 4 insertions(+), 13 deletions(-) diff --git a/autoware_ml/detection3d/datasets/t4dataset.py b/autoware_ml/detection3d/datasets/t4dataset.py index ce1c78f31..74d274b87 100644 --- a/autoware_ml/detection3d/datasets/t4dataset.py +++ b/autoware_ml/detection3d/datasets/t4dataset.py @@ -64,7 +64,7 @@ def filter_data(self) -> List[dict]: break if entry["images"][camera_order]["img_path"] is None or not osp.exists( - entry["images"][camera_order]["img_path"] + self.data_root + entry["images"][camera_order]["img_path"] ): filtered = True break diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py index 62ea479fb..3476011ff 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py @@ -3,9 +3,6 @@ ] # user setting -data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" - experiment_group_name = "bevfusion_lidar_intensity_2.6.1/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name @@ -42,7 +39,7 @@ testing_statistics_parquet_path=testing_statistics_parquet_path, validation_statistics_parquet_path=validation_statistics_parquet_path, output_dir="validation", - dataset_name="j6gen2_base", + dataset_name="base", perception_evaluator_configs=perception_evaluator_configs, critical_object_filter_config=None, frame_pass_fail_config=frame_pass_fail_config, @@ -64,7 +61,7 @@ testing_statistics_parquet_path=testing_statistics_parquet_path, validation_statistics_parquet_path=validation_statistics_parquet_path, output_dir="testing", - dataset_name="j6gen2_base", + dataset_name="base", perception_evaluator_configs=perception_evaluator_configs, critical_object_filter_config=None, frame_pass_fail_config=frame_pass_fail_config, diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 73c1e4671..4eea4c2aa 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_intensity_2.7.1/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py index 0109e96d9..49d91e05d 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py @@ -3,9 +3,6 @@ ] # user setting -data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" - experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py index c9a0050c0..3d976d970 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py @@ -3,9 +3,6 @@ ] # user setting -data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" - experiment_group_name = "bevfusion_lidar_2.6.0/base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name From 15371af9539e84c46d844efa5007d565acb80878 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Sat, 18 Apr 2026 17:52:51 +0900 Subject: [PATCH 25/68] Update dataset name --- ...xel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py index 3476011ff..0748008ba 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py @@ -39,7 +39,7 @@ testing_statistics_parquet_path=testing_statistics_parquet_path, validation_statistics_parquet_path=validation_statistics_parquet_path, output_dir="validation", - dataset_name="base", + dataset_name="j6gen2_base", perception_evaluator_configs=perception_evaluator_configs, critical_object_filter_config=None, frame_pass_fail_config=frame_pass_fail_config, @@ -61,7 +61,7 @@ testing_statistics_parquet_path=testing_statistics_parquet_path, validation_statistics_parquet_path=validation_statistics_parquet_path, output_dir="testing", - dataset_name="base", + dataset_name="j6gen2_base", perception_evaluator_configs=perception_evaluator_configs, critical_object_filter_config=None, frame_pass_fail_config=frame_pass_fail_config, From 4977b332437c647cd617c66a88f1f109129ec9a2 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Mon, 20 Apr 2026 06:46:48 +0900 Subject: [PATCH 26/68] Update dataset name --- ...voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py | 2 +- ...oxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py | 2 +- .../bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py | 2 +- ..._lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py index 0748008ba..d1950d39a 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py @@ -3,7 +3,7 @@ ] # user setting -experiment_group_name = "bevfusion_lidar_intensity_2.6.1/j6gen2_base/" + _base_.dataset_type +experiment_group_name = "bevfusion_lidar_intensity_2.7.1/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py index 49d91e05d..6bd285ce1 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py @@ -3,7 +3,7 @@ ] # user setting -experiment_group_name = "bevfusion_lidar_intensity_2.6.1/jpntaxi_base/" + _base_.dataset_type +experiment_group_name = "bevfusion_lidar_intensity_2.7.1/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py index d33b33c56..78d287af6 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" +info_directory_path = "info/kokseang_2_6_2/" experiment_group_name = "bevfusion_lidar_2.7.0/base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py index 3d976d970..fbcfe2dce 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2.py @@ -3,7 +3,7 @@ ] # user setting -experiment_group_name = "bevfusion_lidar_2.6.0/base/" + _base_.dataset_type +experiment_group_name = "bevfusion_lidar_2.7.0/base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m_t4metric_v2" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name From f85a8e906b887d56d67a4e7f88673c1032432a0c Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Mon, 20 Apr 2026 13:04:20 +0900 Subject: [PATCH 27/68] Update dataset name --- ...usion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index 3e615b504..4f220cbcb 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -148,4 +148,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.7.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_48.pth" +# load_from = "" From 0f5b5888148efcd2aac5af2315befd9301907745 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 21 Apr 2026 15:06:00 +0900 Subject: [PATCH 28/68] Update configs --- autoware_ml/detection3d/datasets/t4dataset.py | 2 +- .../default/schedulers/default_30e_8xb8_adamw_linear_cosine.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/autoware_ml/detection3d/datasets/t4dataset.py b/autoware_ml/detection3d/datasets/t4dataset.py index 74d274b87..ce1c78f31 100644 --- a/autoware_ml/detection3d/datasets/t4dataset.py +++ b/autoware_ml/detection3d/datasets/t4dataset.py @@ -64,7 +64,7 @@ def filter_data(self) -> List[dict]: break if entry["images"][camera_order]["img_path"] is None or not osp.exists( - self.data_root + entry["images"][camera_order]["img_path"] + entry["images"][camera_order]["img_path"] ): filtered = True break diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py index 264eda921..23d29acc1 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_linear_cosine.py @@ -1,6 +1,5 @@ # learning rate -# 1e-4 * sqrt(2) = 0.0001414 -lr = 1.4141e-4 +lr = 1e-4 t_max = 8 max_epochs = 30 val_interval = 1 From caecca60228a1468c1f139d331b096884da19a4b Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 21 Apr 2026 17:38:51 +0900 Subject: [PATCH 29/68] Update base docstring --- .../BEVFusion/docs/BEVFusion-L/v2/base.md | 288 +++++++++++++++++- 1 file changed, 272 insertions(+), 16 deletions(-) diff --git a/projects/BEVFusion/docs/BEVFusion-L/v2/base.md b/projects/BEVFusion/docs/BEVFusion-L/v2/base.md index 9de8a2e34..72d47c4b3 100644 --- a/projects/BEVFusion/docs/BEVFusion-L/v2/base.md +++ b/projects/BEVFusion/docs/BEVFusion-L/v2/base.md @@ -70,18 +70,20 @@
Eval Range: 0.0 - 50.0m - | Model version | mAP | car
(107,309) | truck
(24,206) | bus
(5,712) | bicycle
(4,060) | pedestrian
(77,369) | - | :---- | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.8774 | 0.9049 | 0.8514 | 0.8824 | 0.8543 | 0.8941 | + | Model version | mAP | mAPH | car
(107,309) | truck
(24,206) | bus
(5,712) | bicycle
(4,060) | pedestrian
(77,369) | + | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR base/2.7.0 | 0.8817 | 0.8496 | 0.9131 | 0.8552 | 0.9081 | 0.8357 | 0.8966 | + | BEVFusion-LiDAR base/2.6.0 | 0.8774 | 0.8443 | 0.9049 | 0.8514 | 0.8824 | 0.8543 | 0.8941 | -
+
Eval Range: 50.0 - 90.0m | Model version | mAP | mAPH | car
(94,080) | truck
(27,651) | bus
(4,761) | bicycle
(2,365) | pedestrian
(37,523) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.6824 | 0.6437 | 0.8005 | 0.6567 | 0.5783 | 0.6322 | 0.7445 | + | BEVFusion-LiDAR base/2.7.0 | 0.7002 | 0.6621 | 0.8174 | 0.6660 | 0.6414 | 0.6430 | 0.7331 | + | BEVFusion-LiDAR base/2.6.0 | 0.6824 | 0.6437 | 0.8005 | 0.6567 | 0.5783 | 0.6322 | 0.7445 |
@@ -90,7 +92,8 @@ | Model version | mAP | mAPH | car
(36,895) | truck
(17,759) | bus
(2,852) | bicycle
(519) | pedestrian
(17,091) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.5136 | 0.4788 | 0.6552 | 0.5023 | 0.2849 | 0.4369 | 0.6887 | + | BEVFusion-LiDAR base/2.7.0 | 0.5600 | 0.5254 | 0.6578 | 0.5131 | 0.5178 | 0.4296 | 0.6815 | + | BEVFusion-LiDAR base/2.6.0 | 0.5136 | 0.4788 | 0.6552 | 0.5023 | 0.2849 | 0.4369 | 0.6887 | @@ -99,7 +102,8 @@ | Model version | mAP | mAPH | car
(238,284) | truck
(69,616) | bus
(13,325) | bicycle
(6,944) | pedestrian
(131,983) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.7592 | 0.7227 | 0.8398 | 0.6994 | 0.6621 | 0.7595 | 0.8351 | + | BEVFusion-LiDAR base/2.7.0 | 0.7777 | 0.7420 | 0.8504 | 0.7065 | 0.7443 | 0.7538 | 0.8332 | + | BEVFusion-LiDAR base/2.6.0 | 0.7592 | 0.7227 | 0.8398 | 0.6994 | 0.6621 | 0.7595 | 0.8351 | @@ -119,7 +123,8 @@ | Model version | mAP | mAPH | car
(42,789) | truck
(17,259) | bus
(3,437) | bicycle
(2,681) | pedestrian
(57,948) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.8784 | 0.8487 | 0.9436 | 0.8531 | 0.8284 | 0.8546 | 0.9123 | + | BEVFusion-LiDAR base/2.7.0 | 0.8837 | 0.8562 | 0.9393 | 0.8587 | 0.8802 | 0.8268 | 0.9135 | + | BEVFusion-LiDAR base/2.6.0 | 0.8784 | 0.8487 | 0.9436 | 0.8531 | 0.8284 | 0.8546 | 0.9123 | @@ -128,7 +133,8 @@ | Model version | mAP | mAPH | car
(35,518) | truck
(22,550) | bus
(2,683) | bicycle
(1,607) | pedestrian
(27,240) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.6692 | 0.6414 | 0.8323 | 0.6571 | 0.4033 | 0.6721 | 0.7812 | + | BEVFusion-LiDAR base/2.7.0 | 0.6901 | 0.6630 | 0.8382 | 0.6676 | 0.5007 | 0.6794 | 0.7645 | + | BEVFusion-LiDAR base/2.6.0 | 0.6692 | 0.6414 | 0.8323 | 0.6571 | 0.4033 | 0.6721 | 0.7812 | @@ -137,7 +143,8 @@ | Model version | mAP | mAPH | car
(16,524) | truck
(14,587) | bus
(2,476) | bicycle
(364) | pedestrian
(14,297) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.5300 | 0.5010 | 0.6692 | 0.5020 | 0.2822 | 0.4586 | 0.7380 | + | BEVFusion-LiDAR base/2.7.0 | 0.5750 | 0.5466 | 0.6601 | 0.5131 | 0.5145 | 0.4541 | 0.7331 | + | BEVFusion-LiDAR base/2.6.0 | 0.5300 | 0.5010 | 0.6692 | 0.5020 | 0.2822 | 0.4586 | 0.7380 | @@ -146,6 +153,7 @@ | Model version | mAP | mAPH | car
(94,831) | truck
(54,396) | bus
(8,596) | bicycle
(4,652) | pedestrian
(99,485) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR base/2.7.0 | 0.7715 | 0.7432 | 0.8661 | 0.7010 | 0.6721 | 0.7611 | 0.8573 | | BEVFusion-LiDAR base/2.6.0 | 0.7471 | 0.7176 | 0.8667 | 0.6928 | 0.5446 | 0.7710 | 0.8606 | @@ -167,7 +175,8 @@ | Model version | mAP | mAPH | car
(14,883) | truck
(1,193) | bus
(336) | bicycle
(740) | pedestrian
(5,059) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.8882 | 0.8475 | 0.9045 | 0.8793 | 0.9482 | 0.8489 | 0.8598 | + | BEVFusion-LiDAR base/2.7.0 | 0.8876 | 0.8447 | 0.9176 | 0.8727 | 0.9443 | 0.8396 | 0.8639 | + | BEVFusion-LiDAR base/2.6.0 | 0.8882 | 0.8475 | 0.9045 | 0.8793 | 0.9482 | 0.8489 | 0.8598 | @@ -176,7 +185,8 @@ | Model version | mAP | mAPH | car
(10,994) | truck
(1,011) | bus
(143) | bicycle
(463) | pedestrian
(3,754) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.7132 | 0.6586 | 0.8237 | 0.7245 | 0.7811 | 0.5497 | 0.6871 | + | BEVFusion-LiDAR base/2.7.0 | 0.7392 | 0.6842 | 0.8425 | 0.7288 | 0.8580 | 0.5826 | 0.6839 | + | BEVFusion-LiDAR base/2.6.0 | 0.7132 | 0.6586 | 0.8237 | 0.7245 | 0.7811 | 0.5497 | 0.6871 | @@ -185,7 +195,8 @@ | Model version | mAP | mAPH | car
(3,018) | truck
(602) | bus
(60) | bicycle
(85) | pedestrian
(1,121) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.5202 | 0.4736 | 0.6989 | 0.6297 | 0.4058 | 0.3609 | 0.5056 | + | BEVFusion-LiDAR base/2.7.0 | 0.5572 | 0.5118 | 0.7091 | 0.6393 | 0.6121 | 0.3386 | 0.4870 | + | BEVFusion-LiDAR base/2.6.0 | 0.5202 | 0.4736 | 0.6989 | 0.6297 | 0.4058 | 0.3609 | 0.5056 | @@ -194,6 +205,7 @@ | Model version | mAP | mAPH | car
(28,895) | truck
(2,806) | bus
(539) | bicycle
(1,288) | pedestrian
(9,934) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR base/2.7.0 | 0.8086 | 0.7594 | 0.8789 | 0.7783 | 0.8898 | 0.7288 | 0.7670 | | BEVFusion-LiDAR base/2.6.0 | 0.7995 | 0.7514 | 0.8640 | 0.7788 | 0.8608 | 0.7272 | 0.7669 | @@ -221,7 +233,8 @@ | Model version | mAP | mAPH | car
(49,637) | truck
(5,754) | bus
(1,939) | bicycle
(639) | pedestrian
(14,362) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.8702 | 0.8284 | 0.8758 | 0.8410 | 0.9408 | 0.8590 | 0.8344 | + | BEVFusion-LiDAR base/2.7.0 | 0.8776 | 0.8370 | 0.8907 | 0.8438 | 0.9473 | 0.8665 | 0.8397 | + | BEVFusion-LiDAR base/2.6.0 | 0.8702 | 0.8284 | 0.8758 | 0.8410 | 0.9408 | 0.8590 | 0.8344 | @@ -230,7 +243,8 @@ | Model version | mAP | mAPH | car
(47,568) | truck
(4,090) | bus
(1,935) | bicycle
(295) | pedestrian
(6,529) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.6708 | 0.6165 | 0.7721 | 0.6421 | 0.7731 | 0.5472 | 0.6192 | + | BEVFusion-LiDAR base/2.7.0 | 0.6805 | 0.6279 | 0.7957 | 0.6451 | 0.7955 | 0.5394 | 0.6266 | + | BEVFusion-LiDAR base/2.6.0 | 0.6708 | 0.6165 | 0.7721 | 0.6421 | 0.7731 | 0.5472 | 0.6192 | @@ -239,6 +253,7 @@ | Model version | mAP | mAPH | car
(17,353) | truck
(2,570) | bus
(316) | bicycle
(70) | pedestrian
(1,673) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR base/2.7.0 | 0.4902 | 0.4491 | 0.6483 | 0.4871 | 0.5172 | 0.4406 | 0.3578 | | BEVFusion-LiDAR base/2.6.0 | 0.4462 | 0.4042 | 0.6346 | 0.4758 | 0.3215 | 0.4303 | 0.3688 | @@ -248,7 +263,8 @@ | Model version | mAP | mAPH | car
(114,558) | truck
(12,414) | bus
(4,190) | bicycle
(1,004) | pedestrian
(22,564) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR base/2.6.0 | 0.7712 | 0.7223 | 0.8110 | 0.7129 | 0.8348 | 0.7458 | 0.7515 | + | BEVFusion-LiDAR base/2.7.0 | 0.7822 | 0.7349 | 0.8292 | 0.7169 | 0.8590 | 0.7505 | 0.7556 | + | BEVFusion-LiDAR base/2.6.0 | 0.7712 | 0.7223 | 0.8110 | 0.7129 | 0.8348 | 0.7458 | 0.7515 | @@ -256,6 +272,246 @@ ## Release +### BEVFusion-LiDAR base/2.7.0 + +
+ Changes + +- Train by min-max normalizing (x, y, z, intensity, time_lag) into [0, 1], and then mapping it to fourier features [[1]](https://arxiv.org/pdf/2006.10739). +
+ +
+ Artifacts + +- Deployed onnx and ROS parameter files (for internal) + - [WebAuto](https://evaluation.tier4.jp/evaluation/mlpackages/46f8188d-e3be-4f2f-b989-fd27002610d7/releases/51628f64-9c15-4029-b3c5-5bf501d879e2?project_id=zWhWRzei) + - [model-zoo](https://download.autoware-ml-model-zoo.tier4.jp/autoware-ml/models/bevfusion/bevfusion-l/t4base/v2.7.0/deployment.zip) + - [Google drive](https://drive.google.com/file/d/1zopj68qxLmI244qi3NgxB0ELT997V4W3/view?usp=drive_link) +- Logs (for internal) + - [model-zoo](https://download.autoware-ml-model-zoo.tier4.jp/autoware-ml/models/bevfusion/bevfusion-l/t4base/v2.7.0/logs.zip) + - [Google drive](https://drive.google.com/file/d/1-OIvsmsB69a5L_4sqjOSJ9IOltRWFDIv/view?usp=drive_link) +- Pytorch Best checkpoints: + - [model-zoo](https://download.autoware-ml-model-zoo.tier4.jp/autoware-ml/models/bevfusion/bevfusion-l/t4base/v2.7.0/best_epoch_48.pth) + - [Google drive](https://drive.google.com/file/d/1b8iwwLBLAmn0NwqRaTJOWHMINfS9p_fc/view?usp=drive_link) + +
+ +
+ Training configs + +- [Config file path](https://github.com/KSeangTan/AWML/blob/0f5b5888148efcd2aac5af2315befd9301907745/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py) +- Train time: NVIDIA H100 80GB * 8 * 50 epochs ~= 4 days +- Batch size: 8*8 = 64 +- Training Dataset (frames: 142,196): + - jpntaxi: db_jpntaxi_v1 + db_jpntaxi_v2 + db_jpntaxi_v4 (28,161 frames) + - j6: db_gsm8_v1 + db_j6_v1 + db_j6_v2 + db_j6_v3 + db_j6_v5 (29,336 frames) + - j6gen2: db_j6gen2_v1 + db_j6gen2_v2 + db_j6gen2_v3 + db_j6gen2_v4 + db_j6gen2_v5 + db_j6gen2_v6 + db_j6gen2_v7 + db_j6gen2_v8 + db_j6gen2_v9 (43,968 frames) + - largebus: db_largebus_v1 + db_largebus_v2 (12,605 frames) + - jpntaxi_gen2: db_jpntaxigen2_v1 + db_jpntaxigen2_v2 (28,126 frames) + +
+ +
+ Evaluation + +**Base Datasets (15,154 frames)**: + + - j6gen2 (3,951 frames): db_j6gen2_v1 + db_j6gen2_v2 + db_j6gen2_v3 + db_j6gen2_v4 + db_j6gen2_v5 + db_j6gen2_v6 + db_j6gen2_v7 + db_j6gen2_v8 + db_j6gen2_v9 + - largebus (1,228 frames): db_largebus_v1 + db_largebus_v2 + db_largebus_v3 + - jpntaxi_gen2 (9,975 frames): db_jpntaxigen2_v1 + db_jpntaxigen2_v2 + +**Total BEV Center Distance mAP (eval range = 0.0 - 50.0m): 0.8817** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 107,309 | 0.9131 | 0.862 / 0.914 / 0.933 / 0.943 | 0.905 / 0.935 / 0.942 / 0.945 | 0.233 / 0.192 / 0.159 / 0.142 | +| truck | 24,206 | 0.8552 | 0.711 / 0.843 / 0.919 / 0.948 | 0.795 / 0.877 / 0.918 / 0.934 | 0.297 / 0.225 / 0.192 / 0.180 | +| bus | 5,712 | 0.9081 | 0.829 / 0.912 / 0.945 / 0.947 | 0.876 / 0.916 / 0.931 / 0.932 | 0.312 / 0.146 / 0.146 / 0.146 | +| bicycle | 4,060 | 0.8357 | 0.813 / 0.840 / 0.844 / 0.846 | 0.857 / 0.868 / 0.869 / 0.870 | 0.210 / 0.194 / 0.194 / 0.194 | +| pedestrian | 77,369 | 0.8966 | 0.877 / 0.895 / 0.903 / 0.911 | 0.857 / 0.867 / 0.874 / 0.878 | 0.148 / 0.148 / 0.148 / 0.147 | +| **ALL** | 218,656 | 0.8817 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 50.0 - 90.0m): 0.7002** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 94,080 | 0.8174 | 0.708 / 0.817 / 0.864 / 0.881 | 0.782 / 0.844 / 0.867 / 0.872 | 0.212 / 0.166 / 0.164 / 0.161 | +| truck | 27,651 | 0.6660 | 0.463 / 0.626 / 0.759 / 0.815 | 0.612 / 0.714 / 0.787 / 0.812 | 0.229 / 0.190 / 0.154 / 0.130 | +| bus | 4,761 | 0.6414 | 0.393 / 0.602 / 0.775 / 0.795 | 0.554 / 0.691 / 0.798 / 0.807 | 0.324 / 0.219 / 0.181 / 0.138 | +| bicycle | 2,365 | 0.6430 | 0.586 / 0.658 / 0.663 / 0.666 | 0.683 / 0.715 / 0.716 / 0.717 | 0.141 / 0.141 / 0.141 / 0.141 | +| pedestrian | 37,523 | 0.7331 | 0.711 / 0.730 / 0.741 / 0.750 | 0.732 / 0.742 / 0.748 / 0.753 | 0.145 / 0.145 / 0.145 / 0.144 | +| **ALL** | 166,380 | 0.7002 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 90.0 - 121.0m): 0.5600** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 36,895 | 0.6578 | 0.498 / 0.656 / 0.726 / 0.751 | 0.626 / 0.714 / 0.750 / 0.760 | 0.168 / 0.143 / 0.137 / 0.132 | +| truck | 17,759 | 0.5131 | 0.206 / 0.450 / 0.648 / 0.749 | 0.439 / 0.611 / 0.720 / 0.775 | 0.240 / 0.193 / 0.134 / 0.124 | +| bus | 2,852 | 0.5178 | 0.313 / 0.520 / 0.608 / 0.630 | 0.534 / 0.659 / 0.704 / 0.714 | 0.244 / 0.166 / 0.140 / 0.140 | +| bicycle | 519 | 0.4296 | 0.315 / 0.421 / 0.491 / 0.491 | 0.503 / 0.563 / 0.592 / 0.592 | 0.180 / 0.180 / 0.180 / 0.180 | +| pedestrian | 17,091 | 0.6815 | 0.660 / 0.678 / 0.687 / 0.700 | 0.698 / 0.708 / 0.712 / 0.719 | 0.126 / 0.126 / 0.126 / 0.126 | +| **ALL** | 75,116 | 0.5600 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 0.0 - 121.0m): 0.7777** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 238,284 | 0.8504 | 0.760 / 0.851 / 0.888 / 0.903 | 0.818 / 0.868 / 0.886 / 0.890 | 0.219 / 0.184 / 0.161 / 0.158 | +| truck | 69,616 | 0.7065 | 0.492 / 0.671 / 0.802 / 0.861 | 0.641 / 0.752 / 0.822 / 0.851 | 0.251 / 0.216 / 0.173 / 0.136 | +| bus | 13,325 | 0.7443 | 0.575 / 0.735 / 0.827 / 0.840 | 0.703 / 0.791 / 0.843 / 0.849 | 0.345 / 0.181 / 0.181 / 0.146 | +| bicycle | 6,944 | 0.7538 | 0.714 / 0.761 / 0.769 / 0.771 | 0.776 / 0.797 / 0.800 / 0.801 | 0.186 / 0.176 / 0.176 / 0.176 | +| pedestrian | 131,983 | 0.8332 | 0.813 / 0.831 / 0.840 / 0.849 | 0.802 / 0.812 / 0.818 / 0.824 | 0.144 / 0.145 / 0.145 / 0.145 | +| **ALL** | 460,152 | 0.7777 | — | — | — | + +--- + +**LargeBus**: db_largebus_v1 + db_largebus_v2 + db_largebus_v3 (1,228 frames) + +**Total BEV Center Distance mAP (eval range = 0.0 - 50.0m): 0.8876** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 14,883 | 0.9176 | 0.876 / 0.916 / 0.934 / 0.944 | 0.917 / 0.943 / 0.947 / 0.949 | 0.245 / 0.154 / 0.154 / 0.154 | +| truck | 1,193 | 0.8727 | 0.747 / 0.873 / 0.926 / 0.944 | 0.829 / 0.900 / 0.924 / 0.928 | 0.269 / 0.206 / 0.157 / 0.157 | +| bus | 336 | 0.9443 | 0.824 / 0.975 / 0.989 / 0.989 | 0.878 / 0.974 / 0.984 / 0.984 | 0.439 / 0.338 / 0.269 / 0.269 | +| bicycle | 740 | 0.8396 | 0.764 / 0.848 / 0.869 / 0.877 | 0.833 / 0.862 / 0.866 / 0.871 | 0.194 / 0.194 / 0.182 / 0.182 | +| pedestrian | 5,059 | 0.8639 | 0.848 / 0.863 / 0.869 / 0.876 | 0.837 / 0.845 / 0.850 / 0.853 | 0.167 / 0.167 / 0.167 / 0.154 | +| **ALL** | 22,211 | 0.8876 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 50.0 - 90.0m): 0.7392** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 10,994 | 0.8425 | 0.745 / 0.846 / 0.883 / 0.896 | 0.810 / 0.869 / 0.886 / 0.891 | 0.210 / 0.170 / 0.153 / 0.153 | +| truck | 1,011 | 0.7288 | 0.537 / 0.722 / 0.818 / 0.838 | 0.670 / 0.784 / 0.834 / 0.840 | 0.184 / 0.158 / 0.113 / 0.113 | +| bus | 143 | 0.8580 | 0.589 / 0.944 / 0.944 / 0.956 | 0.730 / 0.929 / 0.929 / 0.929 | 0.510 / 0.463 / 0.463 / 0.463 | +| bicycle | 463 | 0.5826 | 0.477 / 0.607 / 0.622 / 0.625 | 0.606 / 0.667 / 0.671 / 0.673 | 0.118 / 0.112 / 0.102 / 0.102 | +| pedestrian | 3,754 | 0.6839 | 0.664 / 0.681 / 0.690 / 0.702 | 0.698 / 0.705 / 0.711 / 0.717 | 0.121 / 0.117 / 0.117 / 0.117 | +| **ALL** | 16,365 | 0.7392 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 90.0 - 121.0m): 0.5572** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 3,018 | 0.7091 | 0.556 / 0.712 / 0.776 / 0.792 | 0.665 / 0.747 / 0.778 / 0.786 | 0.205 / 0.181 / 0.181 / 0.181 | +| truck | 602 | 0.6393 | 0.365 / 0.651 / 0.760 / 0.781 | 0.553 / 0.730 / 0.789 / 0.798 | 0.208 / 0.208 / 0.152 / 0.152 | +| bus | 60 | 0.6121 | 0.420 / 0.637 / 0.696 / 0.696 | 0.583 / 0.725 / 0.765 / 0.765 | 0.275 / 0.197 / 0.197 / 0.197 | +| bicycle | 85 | 0.3386 | 0.244 / 0.355 / 0.378 / 0.378 | 0.446 / 0.514 / 0.524 / 0.524 | 0.181 / 0.181 / 0.137 / 0.137 | +| pedestrian | 1,121 | 0.4870 | 0.473 / 0.483 / 0.490 / 0.502 | 0.579 / 0.586 / 0.591 / 0.593 | 0.137 / 0.137 / 0.137 / 0.137 | +| **ALL** | 4,886 | 0.5572 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 0.0 - 121.0m): 0.8086** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 28,895 | 0.8789 | 0.806 / 0.881 / 0.909 / 0.919 | 0.853 / 0.896 / 0.908 / 0.911 | 0.245 / 0.185 / 0.176 / 0.170 | +| truck | 2,806 | 0.7783 | 0.597 / 0.778 / 0.859 / 0.880 | 0.714 / 0.824 / 0.865 / 0.870 | 0.206 / 0.206 / 0.157 / 0.155 | +| bus | 539 | 0.8898 | 0.718 / 0.931 / 0.952 / 0.958 | 0.808 / 0.931 / 0.937 / 0.937 | 0.382 / 0.354 / 0.354 / 0.354 | +| bicycle | 1,288 | 0.7288 | 0.641 / 0.744 / 0.762 / 0.768 | 0.729 / 0.769 / 0.773 / 0.776 | 0.176 / 0.176 / 0.176 / 0.172 | +| pedestrian | 9,934 | 0.7670 | 0.749 / 0.765 / 0.772 / 0.782 | 0.757 / 0.765 / 0.771 / 0.775 | 0.137 / 0.137 / 0.137 / 0.137 | +| **ALL** | 43,462 | 0.8086 | — | — | — | + +--- + +**J6Gen2**: db_j6gen2_v1 + db_j6gen2_v2 + db_j6gen2_v3 + db_j6gen2_v4 + db_j6gen2_v5 + db_j6gen2_v6 + db_j6gen2_v7 + db_j6gen2_v8 + db_j6gen2_v9 (3,951 frames) + +**Total BEV Center Distance mAP (eval range = 0.0 - 50.0m): 0.8776** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 49,637 | 0.8907 | 0.841 / 0.890 / 0.909 / 0.922 | 0.896 / 0.924 / 0.931 / 0.934 | 0.269 / 0.199 / 0.159 / 0.135 | +| truck | 5,754 | 0.8438 | 0.718 / 0.833 / 0.894 / 0.930 | 0.794 / 0.862 / 0.893 / 0.915 | 0.222 / 0.194 / 0.171 / 0.171 | +| bus | 1,939 | 0.9473 | 0.878 / 0.942 / 0.983 / 0.986 | 0.925 / 0.963 / 0.981 / 0.982 | 0.206 / 0.140 / 0.140 / 0.140 | +| bicycle | 639 | 0.8665 | 0.854 / 0.871 / 0.871 / 0.871 | 0.867 / 0.875 / 0.875 / 0.875 | 0.176 / 0.176 / 0.176 / 0.176 | +| pedestrian | 14,362 | 0.8397 | 0.813 / 0.836 / 0.849 / 0.861 | 0.806 / 0.817 / 0.824 / 0.831 | 0.169 / 0.151 / 0.151 / 0.165 | +| **ALL** | 72,331 | 0.8776 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 50.0 - 90.0m): 0.6805** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 47,568 | 0.7957 | 0.662 / 0.795 / 0.851 / 0.875 | 0.760 / 0.838 / 0.866 / 0.874 | 0.212 / 0.184 / 0.164 / 0.164 | +| truck | 4,090 | 0.6451 | 0.451 / 0.622 / 0.729 / 0.778 | 0.606 / 0.711 / 0.768 / 0.789 | 0.234 / 0.205 / 0.176 / 0.165 | +| bus | 1,935 | 0.7955 | 0.571 / 0.760 / 0.912 / 0.938 | 0.694 / 0.815 / 0.906 / 0.916 | 0.345 / 0.240 / 0.182 / 0.168 | +| bicycle | 295 | 0.5394 | 0.494 / 0.552 / 0.554 / 0.557 | 0.628 / 0.669 / 0.669 / 0.669 | 0.137 / 0.138 / 0.138 / 0.138 | +| pedestrian | 6,529 | 0.6266 | 0.591 / 0.622 / 0.639 / 0.654 | 0.661 / 0.676 / 0.682 / 0.689 | 0.140 / 0.140 / 0.140 / 0.140 | +| **ALL** | 60,417 | 0.6805 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 90.0 - 121.0m): 0.4902** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 17,353 | 0.6483 | 0.452 / 0.639 / 0.734 / 0.768 | 0.608 / 0.712 / 0.760 / 0.774 | 0.168 / 0.153 / 0.143 / 0.132 | +| truck | 2,570 | 0.4871 | 0.209 / 0.419 / 0.619 / 0.702 | 0.425 / 0.578 / 0.700 / 0.746 | 0.199 / 0.127 / 0.126 / 0.124 | +| bus | 316 | 0.5172 | 0.246 / 0.532 / 0.626 / 0.665 | 0.433 / 0.640 / 0.701 / 0.721 | 0.173 / 0.100 / 0.100 / 0.089 | +| bicycle | 70 | 0.4406 | 0.382 / 0.438 / 0.471 / 0.471 | 0.584 / 0.619 / 0.637 / 0.637 | 0.193 / 0.193 / 0.193 / 0.193 | +| pedestrian | 1,673 | 0.3578 | 0.344 / 0.354 / 0.362 / 0.371 | 0.492 / 0.496 / 0.500 / 0.505 | 0.137 / 0.107 / 0.107 / 0.111 | +| **ALL** | 21,982 | 0.4902 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 0.0 - 121.0m): 0.7822** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 114,558 | 0.8292 | 0.725 / 0.826 / 0.872 / 0.894 | 0.800 / 0.859 / 0.881 / 0.888 | 0.232 / 0.194 / 0.164 / 0.158 | +| truck | 12,414 | 0.7169 | 0.534 / 0.691 / 0.795 / 0.847 | 0.665 / 0.760 / 0.816 / 0.843 | 0.251 / 0.194 / 0.166 / 0.151 | +| bus | 4,190 | 0.8590 | 0.703 / 0.840 / 0.938 / 0.955 | 0.790 / 0.874 / 0.929 / 0.936 | 0.345 / 0.186 / 0.182 / 0.168 | +| bicycle | 1,004 | 0.7505 | 0.724 / 0.758 / 0.760 / 0.760 | 0.781 / 0.798 / 0.799 / 0.799 | 0.176 / 0.176 / 0.176 / 0.176 | +| pedestrian | 22,564 | 0.7556 | 0.727 / 0.752 / 0.766 / 0.778 | 0.744 / 0.756 / 0.763 / 0.770 | 0.152 / 0.151 / 0.151 / 0.151 | +| **ALL** | 154,730 | 0.7822 | — | — | — | + +--- + +**JPNTaxi_Gen2**: db_jpntaxigen2_v1 + db_jpntaxigen2_v2 (9,975 frames) + +**Total BEV Center Distance mAP (eval range = 0.0 - 50.0m): 0.8837** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 42,789 | 0.9393 | 0.882 / 0.945 / 0.964 / 0.967 | 0.911 / 0.946 / 0.954 / 0.955 | 0.211 / 0.168 / 0.142 / 0.142 | +| truck | 17,259 | 0.8587 | 0.709 / 0.846 / 0.926 / 0.954 | 0.795 / 0.881 / 0.926 / 0.941 | 0.371 / 0.243 / 0.234 / 0.189 | +| bus | 3,437 | 0.8802 | 0.798 / 0.889 / 0.916 / 0.918 | 0.850 / 0.886 / 0.898 / 0.899 | 0.369 / 0.146 / 0.128 / 0.128 | +| bicycle | 2,681 | 0.8268 | 0.816 / 0.830 / 0.831 / 0.831 | 0.865 / 0.871 / 0.872 / 0.872 | 0.219 / 0.219 / 0.219 / 0.219 | +| pedestrian | 57,948 | 0.9135 | 0.896 / 0.912 / 0.919 / 0.926 | 0.872 / 0.882 / 0.889 / 0.893 | 0.148 / 0.140 / 0.143 / 0.140 | +| **ALL** | 124,114 | 0.8837 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 50.0 - 90.0m): 0.6901** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 35,518 | 0.8382 | 0.757 / 0.838 / 0.874 / 0.885 | 0.803 / 0.847 / 0.862 / 0.865 | 0.212 / 0.165 / 0.162 / 0.161 | +| truck | 22,550 | 0.6676 | 0.462 / 0.623 / 0.762 / 0.823 | 0.611 / 0.711 / 0.788 / 0.816 | 0.247 / 0.193 / 0.154 / 0.130 | +| bus | 2,683 | 0.5007 | 0.240 / 0.447 / 0.649 / 0.667 | 0.421 / 0.581 / 0.708 / 0.717 | 0.242 / 0.151 / 0.144 / 0.144 | +| bicycle | 1,607 | 0.6794 | 0.635 / 0.692 / 0.695 / 0.697 | 0.719 / 0.740 / 0.742 / 0.743 | 0.146 / 0.141 / 0.141 / 0.141 | +| pedestrian | 27,240 | 0.7645 | 0.745 / 0.762 / 0.772 / 0.780 | 0.753 / 0.764 / 0.769 / 0.773 | 0.156 / 0.144 / 0.145 / 0.145 | +| **ALL** | 89,598 | 0.6901 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 90.0 - 121.0m): 0.5750** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 16,524 | 0.6601 | 0.539 / 0.665 / 0.710 / 0.727 | 0.643 / 0.715 / 0.740 / 0.745 | 0.138 / 0.108 / 0.108 / 0.109 | +| truck | 14,587 | 0.5131 | 0.200 / 0.448 / 0.649 / 0.756 | 0.438 / 0.613 / 0.721 / 0.779 | 0.248 / 0.193 / 0.134 / 0.124 | +| bus | 2,476 | 0.5145 | 0.318 / 0.515 / 0.602 / 0.623 | 0.547 / 0.661 / 0.704 / 0.714 | 0.244 / 0.163 / 0.152 / 0.148 | +| bicycle | 364 | 0.4541 | 0.324 / 0.439 / 0.527 / 0.527 | 0.504 / 0.567 / 0.604 / 0.604 | 0.174 / 0.171 / 0.171 / 0.171 | +| pedestrian | 14,297 | 0.7331 | 0.711 / 0.730 / 0.739 / 0.753 | 0.731 / 0.742 / 0.746 / 0.754 | 0.126 / 0.126 / 0.126 / 0.126 | +| **ALL** | 48,248 | 0.5750 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 0.0 - 121.0m): 0.7715** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 94,831 | 0.8661 | 0.785 / 0.869 / 0.900 / 0.910 | 0.828 / 0.871 / 0.884 / 0.887 | 0.198 / 0.165 / 0.150 / 0.141 | +| truck | 54,396 | 0.7010 | 0.478 / 0.662 / 0.800 / 0.864 | 0.632 / 0.747 / 0.821 / 0.852 | 0.273 / 0.216 / 0.173 / 0.134 | +| bus | 8,596 | 0.6721 | 0.500 / 0.665 / 0.756 / 0.768 | 0.648 / 0.737 / 0.792 / 0.798 | 0.326 / 0.151 / 0.146 / 0.146 | +| bicycle | 4,652 | 0.7611 | 0.731 / 0.766 / 0.773 / 0.775 | 0.790 / 0.805 / 0.809 / 0.809 | 0.186 / 0.187 / 0.187 / 0.187 | +| pedestrian | 99,485 | 0.8573 | 0.838 / 0.855 / 0.864 / 0.872 | 0.820 / 0.830 / 0.836 / 0.841 | 0.145 / 0.143 / 0.145 / 0.143 | +| **ALL** | 261,960 | 0.7715 | — | — | — | + +
+ +--- + ### BEVFusion-LiDAR base/2.6.0
From 07c2e110802ec2537d4c620d9af7f7e1b8120b97 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 21 Apr 2026 17:39:32 +0900 Subject: [PATCH 30/68] Update base docstring --- projects/BEVFusion/docs/BEVFusion-L/v2/base.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/BEVFusion/docs/BEVFusion-L/v2/base.md b/projects/BEVFusion/docs/BEVFusion-L/v2/base.md index 72d47c4b3..ecdd1e9a8 100644 --- a/projects/BEVFusion/docs/BEVFusion-L/v2/base.md +++ b/projects/BEVFusion/docs/BEVFusion-L/v2/base.md @@ -277,7 +277,7 @@
Changes -- Train by min-max normalizing (x, y, z, intensity, time_lag) into [0, 1], and then mapping it to fourier features [[1]](https://arxiv.org/pdf/2006.10739). +- Train by min-max normalization (x, y, z, intensity, time_lag) into [0, 1], and then mapping it to fourier features [[1]](https://arxiv.org/pdf/2006.10739).
From 2665b277bda7865a10f04daa37b8eaa8ea6c5606 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 21 Apr 2026 19:15:35 +0900 Subject: [PATCH 31/68] Update j6gen2_base and jpntaxi_base docstring --- .../v2/{j6gen2.md => j6gen2_base.md} | 220 +++++++++++++++++- .../docs/BEVFusion-L/v2/jpntaxi_base.md | 153 ++++++++++++ 2 files changed, 363 insertions(+), 10 deletions(-) rename projects/BEVFusion/docs/BEVFusion-L/v2/{j6gen2.md => j6gen2_base.md} (54%) create mode 100644 projects/BEVFusion/docs/BEVFusion-L/v2/jpntaxi_base.md diff --git a/projects/BEVFusion/docs/BEVFusion-L/v2/j6gen2.md b/projects/BEVFusion/docs/BEVFusion-L/v2/j6gen2_base.md similarity index 54% rename from projects/BEVFusion/docs/BEVFusion-L/v2/j6gen2.md rename to projects/BEVFusion/docs/BEVFusion-L/v2/j6gen2_base.md index 8ad986677..54e994313 100644 --- a/projects/BEVFusion/docs/BEVFusion-L/v2/j6gen2.md +++ b/projects/BEVFusion/docs/BEVFusion-L/v2/j6gen2_base.md @@ -64,7 +64,8 @@ | Model version | mAP | mAPH | car
(64,520) | truck
(6,947) | bus
(2,275) | bicycle
(1,379) | pedestrian
(19,421) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.8810 | 0.8380 | 0.8873 | 0.8586 | 0.9476 | 0.8583 | 0.8534 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.8828 | 0.8387 | 0.9022 | 0.8627 | 0.9440 | 0.8483 | 0.8569 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.8810 | 0.8380 | 0.8873 | 0.8586 | 0.9476 | 0.8583 | 0.8534 |
@@ -73,7 +74,8 @@ | Model version | mAP | mAPH | car
(58,562) | truck
(5,101) | bus
(2,078) | bicycle
(758) | pedestrian
(10,283) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.7032 | 0.6483 | 0.7876 | 0.6830 | 0.7911 | 0.5802 | 0.6741 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.7193 | 0.6620 | 0.8197 | 0.6856 | 0.8249 | 0.5862 | 0.6801 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.7032 | 0.6483 | 0.7876 | 0.6830 | 0.7911 | 0.5802 | 0.6741 |
@@ -82,7 +84,8 @@ | Model version | mAP | mAPH | car
(20,371) | truck
(3,172) | bus
(376) | bicycle
(155) | pedestrian
(2,794) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.4938 | 0.4494 | 0.6564 | 0.5192 | 0.3777 | 0.4406 | 0.4752 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.5223 | 0.4757 | 0.6814 | 0.5181 | 0.5381 | 0.4165 | 0.4573 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.4938 | 0.4494 | 0.6564 | 0.5192 | 0.3777 | 0.4406 | 0.4752 | @@ -91,6 +94,7 @@ | Model version | mAP | mAPH | car
(143,453) | truck
(15,220) | bus
(4,729) | bicycle
(2,292) | pedestrian
(32,498) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.7990 | 0.7487 | 0.8508 | 0.7435 | 0.8711 | 0.7487 | 0.7809 | | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.7903 | 0.7413 | 0.8266 | 0.7409 | 0.8510 | 0.7541 | 0.7790 | @@ -112,6 +116,7 @@ | Model version | mAP | mAPH | car
(14,883) | truck
(1,193) | bus
(336) | bicycle
(740) | pedestrian
(5,059) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.8947 | 0.8393 | 0.9231 | 0.8893 | 0.9564 | 0.8264 | 0.8782 | | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.8985 | 0.8484 | 0.9087 | 0.8974 | 0.9636 | 0.8447 | 0.8780 | @@ -121,7 +126,8 @@ | Model version | mAP | mAPH | car
(10,994) | truck
(1,011) | bus
(143) | bicycle
(463) | pedestrian
(3,754) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.7475 | 0.6925 | 0.8317 | 0.7758 | 0.7910 | 0.5959 | 0.7433 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.7679 | 0.7089 | 0.8567 | 0.7666 | 0.8723 | 0.5955 | 0.7485 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.7475 | 0.6925 | 0.8317 | 0.7758 | 0.7910 | 0.5959 | 0.7433 | @@ -130,7 +136,8 @@ | Model version | mAP | mAPH | car
(3,018) | truck
(602) | bus
(60) | bicycle
(85) | pedestrian
(1,121) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.5636 | 0.5191 | 0.7125 | 0.6383 | 0.4781 | 0.4293 | 0.5595 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.5924 | 0.5370 | 0.7238 | 0.6616 | 0.6305 | 0.3964 | 0.5497 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.5636 | 0.5191 | 0.7125 | 0.6383 | 0.4781 | 0.4293 | 0.5595 | @@ -139,7 +146,8 @@ | Model version | mAP | mAPH | car
(28,895) | truck
(2,806) | bus
(539) | bicycle
(1,288) | pedestrian
(9,934) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.8198 | 0.7666 | 0.8690 | 0.8052 | 0.8756 | 0.7455 | 0.8036 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.8267 | 0.7675 | 0.8888 | 0.8055 | 0.9009 | 0.7334 | 0.8051 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.8198 | 0.7666 | 0.8690 | 0.8052 | 0.8756 | 0.7455 | 0.8036 | @@ -166,7 +174,8 @@ | Model version | mAP | mAPH | car
(49,637) | truck
(5,754) | bus
(1,939) | bicycle
(639) | pedestrian
(14,362) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.8788 | 0.8368 | 0.8813 | 0.8505 | 0.9427 | 0.8749 | 0.8448 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.8836 | 0.8431 | 0.8942 | 0.8569 | 0.9393 | 0.8780 | 0.8494 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.8788 | 0.8368 | 0.8813 | 0.8505 | 0.9427 | 0.8749 | 0.8448 | @@ -175,7 +184,8 @@ | Model version | mAP | mAPH | car
(47,568) | truck
(4,090) | bus
(1,935) | bicycle
(295) | pedestrian
(6,529) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.6864 | 0.6344 | 0.7772 | 0.6609 | 0.7913 | 0.5671 | 0.6357 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.7040 | 0.6488 | 0.8118 | 0.6662 | 0.8221 | 0.5781 | 0.6417 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.6864 | 0.6344 | 0.7772 | 0.6609 | 0.7913 | 0.5671 | 0.6357 | @@ -184,7 +194,8 @@ | Model version | mAP | mAPH | car
(17,353) | truck
(2,570) | bus
(316) | bicycle
(70) | pedestrian
(1,673) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.4766 | 0.4309 | 0.6465 | 0.4903 | 0.3618 | 0.4627 | 0.4214 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.5030 | 0.4572 | 0.6739 | 0.4847 | 0.5186 | 0.4430 | 0.3948 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.4766 | 0.4309 | 0.6465 | 0.4903 | 0.3618 | 0.4627 | 0.4214 | @@ -193,7 +204,8 @@ | Model version | mAP | mAPH | car
(114,558) | truck
(12,414) | bus
(4,190) | bicycle
(1,004) | pedestrian
(22,564) | | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | - | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.7851 | 0.7375 | 0.8166 | 0.7262 | 0.8481 | 0.7661 | 0.7687 | + | BEVFusion-LiDAR j6gen2_base/2.7.1 | 0.7958 | 0.7472 | 0.8408 | 0.7294 | 0.8673 | 0.7710 | 0.7706 | + | BEVFusion-LiDAR j6gen2_base/2.6.1 | 0.7851 | 0.7375 | 0.8166 | 0.7262 | 0.8481 | 0.7661 | 0.7687 | @@ -201,6 +213,194 @@ ## Release +### BEVFusion-LiDAR J6Gen2_base/2.7.1 + +
+ Changes + +- Finetune from `BEVFusion-LiDAR base/2.7.0` with j6gen2 base dataset and intensity. +
+ +
+ Artifacts + +- Deployed onnx and ROS parameter files (for internal) + - [WebAuto](https://evaluation.tier4.jp/evaluation/mlpackages/46f8188d-e3be-4f2f-b989-fd27002610d7/releases/ab0f33f5-2c8e-4adf-b122-f8f0c229c91e?project_id=zWhWRzei) + - [model-zoo](https://download.autoware-ml-model-zoo.tier4.jp/autoware-ml/models/bevfusion/bevfusion-l/j6gen2_base/v2.7.1/deployment.zip) + - [Google drive](https://drive.google.com/file/d/1Sw2UkqsoOP_YhoPpLqaBvHFnBapBV1kw/view?usp=drive_link) +- Logs (for internal) + - [model-zoo](https://download.autoware-ml-model-zoo.tier4.jp/autoware-ml/models/bevfusion/bevfusion-l/j6gen2_base/v2.7.1/logs.zip) + - [Google drive](https://drive.google.com/file/d/1M_Ae0rQ9L1I4NbzSL9tlJ8D0KVGvunKF/view?usp=drive_link) +- Pytorch Best checkpoints: + - [model-zoo](https://download.autoware-ml-model-zoo.tier4.jp/autoware-ml/models/bevfusion/bevfusion-l/j6gen2_base/v2.7.1/best_epoch_28.pth) + - [Google drive](https://drive.google.com/file/d/1xsFKCIkqVnt273o2SKjjCayuh_4IV-Vd/view?usp=drive_link) + +
+ +
+ Training configs + +- [Config file path](https://github.com/KSeangTan/AWML/blob/07c2e110802ec2537d4c620d9af7f7e1b8120b97/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py) +- Train time: NVIDIA H100 80GB * 8 * 30 epochs = 20 hours +- Batch size: 8*8 = 64 +- Training Dataset (frames: 55,714): + - j6gen2: db_j6gen2_v1 + db_j6gen2_v2 + db_j6gen2_v3 + db_j6gen2_v4 + db_j6gen2_v5 + db_j6gen2_v6 + db_j6gen2_v7 + db_j6gen2_v8 (43,109 frames) + - largebus: db_largebus_v1 + db_largebus_v2 + db_largebus_v3 (12,605 frames) + +
+ +
+ Evaluation + +**J6Gen2_base Datasets (5,179 frames)**: + + - j6gen2 (3,951 frames): db_j6gen2_v1 + db_j6gen2_v2 + db_j6gen2_v3 + db_j6gen2_v4 + db_j6gen2_v5 + db_j6gen2_v6 + db_j6gen2_v7 + db_j6gen2_v8 + db_j6gen2_v9 + - largebus (1,228 frames): db_largebus_v1 + db_largebus_v2 + db_largebus_v3 + +**Total BEV Center Distance mAP (eval range = 0.0 - 50.0m): 0.8828** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 64,520 | 0.9022 | 0.853 / 0.901 / 0.921 / 0.933 | 0.904 / 0.931 / 0.937 / 0.939 | 0.260 / 0.193 / 0.180 / 0.172 | +| truck | 6,947 | 0.8627 | 0.736 / 0.863 / 0.910 / 0.942 | 0.800 / 0.877 / 0.903 / 0.920 | 0.244 / 0.191 / 0.188 / 0.166 | +| bus | 2,275 | 0.9440 | 0.866 / 0.940 / 0.983 / 0.986 | 0.912 / 0.958 / 0.978 / 0.980 | 0.203 / 0.177 / 0.163 / 0.138 | +| bicycle | 1,379 | 0.8483 | 0.802 / 0.849 / 0.869 / 0.874 | 0.847 / 0.867 / 0.876 / 0.879 | 0.205 / 0.191 / 0.172 / 0.172 | +| pedestrian | 19,421 | 0.8569 | 0.834 / 0.854 / 0.865 / 0.875 | 0.822 / 0.833 / 0.838 / 0.844 | 0.163 / 0.152 / 0.152 / 0.152 | +| **ALL** | 94,542 | 0.8828 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 50.0 - 90.0m): 0.7193** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 58,562 | 0.8197 | 0.694 / 0.818 / 0.873 / 0.893 | 0.782 / 0.853 / 0.879 / 0.886 | 0.228 / 0.173 / 0.164 / 0.164 | +| truck | 5,101 | 0.6856 | 0.484 / 0.670 / 0.773 / 0.815 | 0.633 / 0.743 / 0.798 / 0.816 | 0.213 / 0.206 / 0.184 / 0.164 | +| bus | 2,078 | 0.8249 | 0.626 / 0.815 / 0.918 / 0.941 | 0.730 / 0.846 / 0.904 / 0.919 | 0.342 / 0.211 / 0.210 / 0.160 | +| bicycle | 758 | 0.5862 | 0.495 / 0.603 / 0.622 / 0.624 | 0.637 / 0.679 / 0.683 / 0.683 | 0.183 / 0.155 / 0.155 / 0.183 | +| pedestrian | 10,283 | 0.6801 | 0.650 / 0.676 / 0.691 / 0.703 | 0.692 / 0.705 / 0.713 / 0.720 | 0.136 / 0.136 / 0.136 / 0.136 | +| **ALL** | 76,782 | 0.7193 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 90.0 - 121.0m): 0.5223** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 20,371 | 0.6814 | 0.493 / 0.674 / 0.763 / 0.796 | 0.638 / 0.737 / 0.781 / 0.795 | 0.193 / 0.159 / 0.151 / 0.151 | +| truck | 3,172 | 0.5181 | 0.227 / 0.454 / 0.652 / 0.738 | 0.447 / 0.601 / 0.715 / 0.762 | 0.206 / 0.206 / 0.162 / 0.140 | +| bus | 376 | 0.5381 | 0.272 / 0.557 / 0.643 / 0.680 | 0.462 / 0.669 / 0.714 / 0.731 | 0.217 / 0.151 / 0.115 / 0.115 | +| bicycle | 155 | 0.4165 | 0.316 / 0.419 / 0.466 / 0.466 | 0.487 / 0.553 / 0.589 / 0.589 | 0.199 / 0.166 / 0.190 / 0.190 | +| pedestrian | 2,794 | 0.4573 | 0.443 / 0.452 / 0.462 / 0.472 | 0.564 / 0.569 / 0.573 / 0.578 | 0.120 / 0.120 / 0.120 / 0.120 | +| **ALL** | 26,868 | 0.5223 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 0.0 - 121.0m): 0.7990** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 143,453 | 0.8508 | 0.752 / 0.849 / 0.891 / 0.910 | 0.820 / 0.874 / 0.894 / 0.900 | 0.232 / 0.189 / 0.174 / 0.164 | +| truck | 15,220 | 0.7435 | 0.555 / 0.725 / 0.824 / 0.871 | 0.677 / 0.780 / 0.834 / 0.858 | 0.234 / 0.206 / 0.186 / 0.165 | +| bus | 4,729 | 0.8711 | 0.726 / 0.865 / 0.939 / 0.954 | 0.804 / 0.890 / 0.928 / 0.937 | 0.408 / 0.211 / 0.177 / 0.161 | +| bicycle | 2,292 | 0.7487 | 0.682 / 0.754 / 0.777 / 0.781 | 0.760 / 0.789 / 0.799 / 0.801 | 0.191 / 0.189 / 0.189 / 0.190 | +| pedestrian | 32,498 | 0.7809 | 0.756 / 0.777 / 0.790 / 0.801 | 0.760 / 0.772 / 0.778 / 0.784 | 0.151 / 0.136 / 0.136 / 0.136 | +| **ALL** | 198,192 | 0.7990 | — | — | — | + +--- + +**LargeBus**: db_largebus_v1 + db_largebus_v2 + db_largebus_v3 (1,228 frames) + +**Total BEV Center Distance mAP (eval range = 0.0 - 50.0m): 0.8947** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 14,883 | 0.9231 | 0.884 / 0.925 / 0.937 / 0.946 | 0.923 / 0.947 / 0.952 / 0.953 | 0.234 / 0.178 / 0.178 / 0.178 | +| truck | 1,193 | 0.8893 | 0.754 / 0.905 / 0.938 / 0.961 | 0.832 / 0.922 / 0.939 / 0.945 | 0.269 / 0.201 / 0.188 / 0.116 | +| bus | 336 | 0.9564 | 0.872 / 0.983 / 0.985 / 0.986 | 0.904 / 0.962 / 0.965 / 0.965 | 0.419 / 0.174 / 0.174 / 0.174 | +| bicycle | 740 | 0.8264 | 0.749 / 0.825 / 0.862 / 0.870 | 0.824 / 0.854 / 0.867 / 0.872 | 0.249 / 0.247 / 0.198 / 0.198 | +| pedestrian | 5,059 | 0.8782 | 0.862 / 0.876 / 0.883 / 0.891 | 0.849 / 0.857 / 0.861 / 0.866 | 0.148 / 0.148 / 0.139 / 0.140 | +| **ALL** | 22,211 | 0.8947 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 50.0 - 90.0m): 0.7679** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 10,994 | 0.8567 | 0.759 / 0.860 / 0.897 / 0.911 | 0.824 / 0.881 / 0.898 / 0.901 | 0.210 / 0.164 / 0.160 / 0.160 | +| truck | 1,011 | 0.7666 | 0.593 / 0.770 / 0.843 / 0.860 | 0.710 / 0.818 / 0.851 / 0.854 | 0.234 / 0.219 / 0.166 / 0.150 | +| bus | 143 | 0.8723 | 0.698 / 0.921 / 0.932 / 0.939 | 0.788 / 0.904 / 0.911 / 0.911 | 0.294 / 0.498 / 0.498 / 0.498 | +| bicycle | 463 | 0.5955 | 0.472 / 0.616 / 0.647 / 0.648 | 0.625 / 0.685 / 0.692 / 0.692 | 0.151 / 0.151 / 0.151 / 0.151 | +| pedestrian | 3,754 | 0.7485 | 0.726 / 0.747 / 0.755 / 0.766 | 0.740 / 0.749 / 0.755 / 0.761 | 0.124 / 0.124 / 0.121 / 0.121 | +| **ALL** | 16,365 | 0.7679 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 90.0 - 121.0m): 0.5924** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 3,018 | 0.7238 | 0.573 / 0.728 / 0.789 / 0.806 | 0.688 / 0.765 / 0.792 / 0.801 | 0.221 / 0.228 / 0.158 / 0.158 | +| truck | 602 | 0.6616 | 0.381 / 0.676 / 0.780 / 0.809 | 0.575 / 0.756 / 0.811 / 0.822 | 0.216 / 0.208 / 0.176 / 0.176 | +| bus | 60 | 0.6305 | 0.434 / 0.626 / 0.730 / 0.732 | 0.608 / 0.745 / 0.793 / 0.793 | 0.217 / 0.217 / 0.087 / 0.087 | +| bicycle | 85 | 0.3964 | 0.298 / 0.382 / 0.452 / 0.453 | 0.468 / 0.544 / 0.595 / 0.595 | 0.166 / 0.166 / 0.166 / 0.166 | +| pedestrian | 1,121 | 0.5497 | 0.536 / 0.546 / 0.552 / 0.565 | 0.624 / 0.629 / 0.633 / 0.638 | 0.120 / 0.118 / 0.118 / 0.118 | +| **ALL** | 4,886 | 0.5924 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 0.0 - 121.0m): 0.8267** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 28,895 | 0.8888 | 0.815 / 0.891 / 0.919 / 0.930 | 0.864 / 0.905 / 0.917 / 0.919 | 0.230 / 0.180 / 0.180 / 0.176 | +| truck | 2,806 | 0.8055 | 0.623 / 0.816 / 0.879 / 0.903 | 0.736 / 0.851 / 0.882 / 0.888 | 0.233 / 0.207 / 0.183 / 0.169 | +| bus | 539 | 0.9009 | 0.783 / 0.929 / 0.945 / 0.948 | 0.838 / 0.921 / 0.929 / 0.929 | 0.430 / 0.208 / 0.208 / 0.208 | +| bicycle | 1,288 | 0.7334 | 0.637 / 0.738 / 0.776 / 0.783 | 0.730 / 0.774 / 0.793 / 0.796 | 0.186 / 0.161 / 0.161 / 0.161 | +| pedestrian | 9,934 | 0.8051 | 0.787 / 0.803 / 0.811 / 0.820 | 0.782 / 0.790 / 0.796 / 0.801 | 0.149 / 0.135 / 0.128 / 0.135 | +| **ALL** | 43,462 | 0.8267 | — | — | — | + +--- + +**J6Gen2**: db_j6gen2_v1 + db_j6gen2_v2 + db_j6gen2_v3 + db_j6gen2_v4 + db_j6gen2_v5 + db_j6gen2_v6 + db_j6gen2_v7 + db_j6gen2_v8 + db_j6gen2_v9 (3,951 frames) + +**Total BEV Center Distance mAP (eval range = 0.0 - 50.0m): 0.8836** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 49,637 | 0.8942 | 0.843 / 0.891 / 0.912 / 0.931 | 0.899 / 0.926 / 0.933 / 0.935 | 0.277 / 0.202 / 0.189 / 0.172 | +| truck | 5,754 | 0.8569 | 0.732 / 0.854 / 0.905 / 0.937 | 0.794 / 0.867 / 0.896 / 0.915 | 0.244 / 0.191 / 0.189 / 0.180 | +| bus | 1,939 | 0.9393 | 0.864 / 0.932 / 0.975 / 0.986 | 0.916 / 0.958 / 0.981 / 0.984 | 0.203 / 0.187 / 0.139 / 0.138 | +| bicycle | 639 | 0.8780 | 0.868 / 0.881 / 0.881 / 0.882 | 0.881 / 0.888 / 0.888 / 0.888 | 0.172 / 0.172 / 0.172 / 0.172 | +| pedestrian | 14,362 | 0.8494 | 0.824 / 0.846 / 0.858 / 0.869 | 0.813 / 0.825 / 0.831 / 0.837 | 0.163 / 0.161 / 0.155 / 0.155 | +| **ALL** | 72,331 | 0.8836 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 50.0 - 90.0m): 0.7040** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 47,568 | 0.8118 | 0.679 / 0.810 / 0.868 / 0.890 | 0.772 / 0.846 / 0.874 / 0.883 | 0.228 / 0.173 / 0.164 / 0.163 | +| truck | 4,090 | 0.6662 | 0.459 / 0.645 / 0.757 / 0.804 | 0.614 / 0.724 / 0.785 / 0.807 | 0.213 / 0.206 / 0.184 / 0.164 | +| bus | 1,935 | 0.8221 | 0.621 / 0.806 / 0.919 / 0.943 | 0.727 / 0.842 / 0.904 / 0.921 | 0.413 / 0.211 / 0.206 / 0.160 | +| bicycle | 295 | 0.5781 | 0.542 / 0.588 / 0.590 / 0.592 | 0.674 / 0.686 / 0.686 / 0.690 | 0.215 / 0.206 / 0.206 / 0.206 | +| pedestrian | 6,529 | 0.6417 | 0.608 / 0.636 / 0.655 / 0.668 | 0.666 / 0.682 / 0.692 / 0.699 | 0.136 / 0.136 / 0.136 / 0.136 | +| **ALL** | 60,417 | 0.7040 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 90.0 - 121.0m): 0.5030** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 17,353 | 0.6739 | 0.479 / 0.664 / 0.759 / 0.794 | 0.631 / 0.732 / 0.780 / 0.794 | 0.193 / 0.159 / 0.146 / 0.146 | +| truck | 2,570 | 0.4847 | 0.194 / 0.401 / 0.621 / 0.723 | 0.414 / 0.562 / 0.692 / 0.751 | 0.206 / 0.179 / 0.130 / 0.128 | +| bus | 316 | 0.5186 | 0.238 / 0.541 / 0.625 / 0.670 | 0.433 / 0.657 / 0.703 / 0.724 | 0.218 / 0.151 / 0.115 / 0.115 | +| bicycle | 70 | 0.4430 | 0.340 / 0.465 / 0.483 / 0.483 | 0.513 / 0.584 / 0.602 / 0.602 | 0.199 / 0.199 / 0.199 / 0.199 | +| pedestrian | 1,673 | 0.3948 | 0.381 / 0.389 / 0.401 / 0.408 | 0.524 / 0.528 / 0.532 / 0.535 | 0.125 / 0.125 / 0.125 / 0.125 | +| **ALL** | 21,982 | 0.5030 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 0.0 - 121.0m): 0.7958** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 114,558 | 0.8408 | 0.737 / 0.837 / 0.882 / 0.906 | 0.809 / 0.866 / 0.888 / 0.895 | 0.236 / 0.189 / 0.164 / 0.164 | +| truck | 12,414 | 0.7294 | 0.539 / 0.704 / 0.811 / 0.863 | 0.664 / 0.764 / 0.823 / 0.851 | 0.244 / 0.206 / 0.183 / 0.164 | +| bus | 4,190 | 0.8673 | 0.719 / 0.856 / 0.939 / 0.956 | 0.800 / 0.886 / 0.928 / 0.939 | 0.342 / 0.211 / 0.161 / 0.161 | +| bicycle | 1,004 | 0.7710 | 0.747 / 0.778 / 0.780 / 0.780 | 0.801 / 0.813 / 0.814 / 0.815 | 0.191 / 0.191 / 0.191 / 0.191 | +| pedestrian | 22,564 | 0.7706 | 0.743 / 0.766 / 0.781 / 0.792 | 0.751 / 0.764 / 0.771 / 0.778 | 0.152 / 0.146 / 0.136 / 0.146 | +| **ALL** | 154,730 | 0.7958 | — | — | — | + +
+ +--- + ### BEVFusion-LiDAR J6Gen2_base/2.6.1
diff --git a/projects/BEVFusion/docs/BEVFusion-L/v2/jpntaxi_base.md b/projects/BEVFusion/docs/BEVFusion-L/v2/jpntaxi_base.md new file mode 100644 index 000000000..fc9e2677d --- /dev/null +++ b/projects/BEVFusion/docs/BEVFusion-L/v2/jpntaxi_base.md @@ -0,0 +1,153 @@ +# Deployed model for BEVFusion-LiDAR JPNTaxi_base/2.X +## Summary + +### Main Parameters + + - **Range:** [122.40m, 122.40m, 8.0m] + - **Voxel Size:** [0.17, 0.17, 0.2] + - **Grid Size:** [1440, 1440, 40] + - **With Intensity** + +### Testing Datasets + +- **Total Frames: 5,179** + +
+ jpntaxi_gen2 (9,975 frames) + - `db_jpntaxigen2_v1` + - `db_jpntaxigen2_v2` + +
+ +### mAP -JPNTaxi_gen2 + +- **Class mAP for BEV Center Distance: 0.5m, 1.0m, 2.0m, 4.0m** + +
+ Eval Range: 0.0 - 50.0m + + | Model version | mAP | mAPH | car
(42,789) | truck
(17,259) | bus
(3,437) | bicycle
(2,681) | pedestrian
(57,948) | + | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR jpntaxi_base/2.7.1 | 0.8862 | 0.8586 | 0.9397 | 0.8591 | 0.8839 | 0.8264 | 0.9218 | + +
+ +
+ Eval Range: 50.0 - 90.0m + + | Model version | mAP | mAPH | car
(35,518) | truck
(22,550) | bus
(2,683) | bicycle
(1,607) | pedestrian
(27,240) | + | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR jpntaxi_base/2.7.1 | 0.7125 | 0.6854 | 0.8453 | 0.6838 | 0.5362 | 0.6969 | 0.8003 | + +
+ +
+ Eval Range: 90.0 - 121.0m + + | Model version | mAP | mAPH | car
(16,524) | truck
(14,587) | bus
(2,476) | bicycle
(364) | pedestrian
(14,297) | + | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR jpntaxi_base/2.7.1 | 0.6030 | 0.5762 | 0.6947 | 0.5260 | 0.5030 | 0.5321 | 0.7591 | + +
+ +
+ Eval Range: 0.0 - 121.0m + + | Model version | mAP | mAPH | car
(94,831) | truck
(54,396) | bus
(8,596) | bicycle
(4,652) | pedestrian
(99,485) | + | :---- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | + | BEVFusion-LiDAR jpntaxi_base/2.7.1 | 0.7805 | 0.7527 | 0.8730 | 0.7118 | 0.6785 | 0.7655 | 0.8739 | + +
+ +## Release + +### BEVFusion-LiDAR JPNTaxi_base/2.7.1 + +
+ Changes + +- Finetune from `BEVFusion-LiDAR base/2.7.0` with JPNTaxi_base dataset and intensity. +
+ +
+ Artifacts + +- Deployed onnx and ROS parameter files (for internal) + - [WebAuto](https://evaluation.tier4.jp/evaluation/mlpackages/46f8188d-e3be-4f2f-b989-fd27002610d7/releases/47abcab3-34e1-4971-9bdf-5a2af5d2b2e6?project_id=zWhWRzei) + - [model-zoo](https://download.autoware-ml-model-zoo.tier4.jp/autoware-ml/models/bevfusion/bevfusion-l/jpntaxi_base/v2.7.1/deployment.zip) + - [Google drive](https://drive.google.com/file/d/1nQlYrnCjlxXbUamEj7MCL_sKxojoU_wk/view?usp=drive_link) +- Logs (for internal) + - [model-zoo](https://download.autoware-ml-model-zoo.tier4.jp/autoware-ml/models/bevfusion/bevfusion-l/jpntaxi_base/v2.7.1/logs.zip) + - [Google drive](https://drive.google.com/file/d/1q_3zj9nF6mnA5IgyO1QRswS7XqnXqvUH/view?usp=drive_link) +- Pytorch Best checkpoints: + - [model-zoo](https://download.autoware-ml-model-zoo.tier4.jp/autoware-ml/models/bevfusion/bevfusion-l/jpntaxi_base/v2.7.1/best_epoch_30.pth) + - [Google drive](https://drive.google.com/file/d/1K7rDv7fb8T2haXHxttbZN7FUEoLYESTr/view?usp=drive_link) + +
+ +
+ Training configs + +- [Config file path](https://github.com/KSeangTan/AWML/blob/07c2e110802ec2537d4c620d9af7f7e1b8120b97/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py) +- Train time: NVIDIA H100 80GB * 8 * 30 epochs = 20 hours +- Batch size: 8*8 = 64 +- Training Dataset (frames: 56,287): + - jpntaxi: db_jpntaxi_v1 + db_jpntaxi_v2 + db_jpntaxi_v4 (28,161 frames) + - jpntaxi_gen2: db_jpntaxigen2_v1 + db_jpntaxigen2_v2 (28,126 frames) + +
+ +
+ Evaluation + +**JPNTaxi_gen2 Datasets (9,975 frames)**: + + - jpntaxi_gen2 (9,975 frames): db_jpntaxigen2_v1 + db_jpntaxigen2_v2 + +**Total BEV Center Distance mAP (eval range = 0.0 - 50.0m): 0.8862** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 42,789 | 0.9397 | 0.891 / 0.943 / 0.960 / 0.965 | 0.918 / 0.946 / 0.953 / 0.954 | 0.284 / 0.175 / 0.175 / 0.164 | +| truck | 17,259 | 0.8591 | 0.701 / 0.842 / 0.935 / 0.958 | 0.792 / 0.882 / 0.932 / 0.946 | 0.409 / 0.321 / 0.241 / 0.241 | +| bus | 3,437 | 0.8839 | 0.796 / 0.888 / 0.925 / 0.927 | 0.853 / 0.897 / 0.910 / 0.910 | 0.296 / 0.184 / 0.104 / 0.104 | +| bicycle | 2,681 | 0.8264 | 0.819 / 0.829 / 0.829 / 0.829 | 0.866 / 0.871 / 0.871 / 0.871 | 0.223 / 0.223 / 0.223 / 0.223 | +| pedestrian | 57,948 | 0.9218 | 0.906 / 0.921 / 0.927 / 0.933 | 0.883 / 0.893 / 0.899 / 0.903 | 0.135 / 0.129 / 0.125 / 0.132 | +| **ALL** | 124,114 | 0.8862 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 50.0 - 90.0m): 0.7125** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 35,518 | 0.8453 | 0.763 / 0.846 / 0.881 / 0.891 | 0.819 / 0.860 / 0.875 / 0.879 | 0.227 / 0.180 / 0.166 / 0.166 | +| truck | 22,550 | 0.6838 | 0.475 / 0.640 / 0.782 / 0.838 | 0.632 / 0.730 / 0.808 / 0.831 | 0.286 / 0.195 / 0.167 / 0.128 | +| bus | 2,683 | 0.5362 | 0.263 / 0.524 / 0.668 / 0.689 | 0.465 / 0.660 / 0.742 / 0.751 | 0.241 / 0.180 / 0.174 / 0.171 | +| bicycle | 1,607 | 0.6969 | 0.656 / 0.709 / 0.710 / 0.713 | 0.745 / 0.770 / 0.771 / 0.772 | 0.145 / 0.138 / 0.138 / 0.138 | +| pedestrian | 27,240 | 0.8003 | 0.782 / 0.798 / 0.807 / 0.814 | 0.782 / 0.790 / 0.795 / 0.799 | 0.163 / 0.163 / 0.163 / 0.164 | +| **ALL** | 89,598 | 0.7125 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 90.0 - 121.0m): 0.6030** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 16,524 | 0.6947 | 0.580 / 0.698 / 0.744 / 0.757 | 0.692 / 0.755 / 0.778 / 0.781 | 0.202 / 0.154 / 0.151 / 0.144 | +| truck | 14,587 | 0.5260 | 0.229 / 0.469 / 0.639 / 0.767 | 0.464 / 0.630 / 0.726 / 0.793 | 0.288 / 0.185 / 0.169 / 0.130 | +| bus | 2,476 | 0.5030 | 0.305 / 0.486 / 0.597 / 0.624 | 0.530 / 0.636 / 0.703 / 0.719 | 0.297 / 0.201 / 0.149 / 0.156 | +| bicycle | 364 | 0.5321 | 0.381 / 0.521 / 0.613 / 0.613 | 0.563 / 0.631 / 0.670 / 0.670 | 0.219 / 0.219 / 0.219 / 0.219 | +| pedestrian | 14,297 | 0.7591 | 0.737 / 0.756 / 0.766 / 0.778 | 0.750 / 0.760 / 0.765 / 0.771 | 0.134 / 0.127 / 0.129 / 0.132 | +| **ALL** | 48,248 | 0.6030 | — | — | — | + +**Total BEV Center Distance mAP (eval range = 0.0 - 121.0m): 0.7805** + +| class_name | GTs | mAP | AP@0.5/1.0/2.0/4.0 | max_f1@0.5/1.0/2.0/4.0 | optimal_conf@0.5/1.0/2.0/4.0 | +| :---- | ---: | ---: | :---- | :---- | :---- | +| car | 94,831 | 0.8730 | 0.799 / 0.875 / 0.905 / 0.914 | 0.845 / 0.884 / 0.896 / 0.899 | 0.235 / 0.189 / 0.165 / 0.165 | +| truck | 54,396 | 0.7118 | 0.490 / 0.674 / 0.809 / 0.875 | 0.645 / 0.757 / 0.831 / 0.862 | 0.314 / 0.240 / 0.178 / 0.153 | +| bus | 8,596 | 0.6785 | 0.504 / 0.674 / 0.761 / 0.775 | 0.655 / 0.761 / 0.807 / 0.813 | 0.285 / 0.180 / 0.168 / 0.168 | +| bicycle | 4,652 | 0.7655 | 0.736 / 0.770 / 0.778 / 0.778 | 0.800 / 0.816 / 0.819 / 0.820 | 0.194 / 0.159 / 0.159 / 0.159 | +| pedestrian | 99,485 | 0.8739 | 0.857 / 0.872 / 0.880 / 0.887 | 0.835 / 0.845 / 0.850 / 0.854 | 0.142 / 0.137 / 0.135 / 0.137 | +| **ALL** | 261,960 | 0.7805 | — | — | — | + +
+ +--- From 24d780bb788fd25813481007d898c85051c944cb Mon Sep 17 00:00:00 2001 From: KokSeang Date: Fri, 24 Apr 2026 16:31:47 +0900 Subject: [PATCH 32/68] Added --- tools/detection3d/t4dataset_converters/t4converter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/detection3d/t4dataset_converters/t4converter.py b/tools/detection3d/t4dataset_converters/t4converter.py index 842b0f458..5dfd1dc1f 100644 --- a/tools/detection3d/t4dataset_converters/t4converter.py +++ b/tools/detection3d/t4dataset_converters/t4converter.py @@ -626,6 +626,10 @@ def get_lidarseg_annotations( ) -> dict: if not hasattr(t4, "lidarseg") or not t4.lidarseg: return dict() + + if sd_record.info_filename is None: + print(f"sample {lidar_token} doesn't have lidar info_filename") + return dict() assert i < len(t4.lidarseg), "Index exceeds number of lidarseg records!" assert t4.lidarseg[i].sample_data_token == lidar_token, "Sample data token mismatch!" From 8175419ca1604a9fe25b39ab3715616f3c8fc07f Mon Sep 17 00:00:00 2001 From: KokSeang Date: Fri, 24 Apr 2026 16:54:00 +0900 Subject: [PATCH 33/68] Added --- .../configs/detection3d/dataset/t4dataset/base.py | 13 +++++++++---- .../detection3d/dataset/t4dataset/j6gen2.py | 13 +++++++++---- .../detection3d/dataset/t4dataset/j6gen2_base.py | 14 ++++++++++---- .../detection3d/dataset/t4dataset/jpntaxi_base.py | 14 ++++++++++---- .../detection3d/dataset/t4dataset/jpntaxi_gen2.py | 14 ++++++++++---- .../detection3d/dataset/t4dataset/largebus.py | 14 ++++++++++---- 6 files changed, 58 insertions(+), 24 deletions(-) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/base.py index d0744a131..3f90e7e0c 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/base.py @@ -91,8 +91,8 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "movable_object.barrier": "barrier", - "movable_object.debris": "debris", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.debris": "barrier", + "movable_object.pushable_pullable": "barrier", "movable_object.trafficcone": "traffic_cone", "movable_object.traffic_cone": "traffic_cone", "animal": "animal", @@ -113,7 +113,7 @@ # DBv2.0 and DBv3.0 "animal": "animal", "movable_object.barrier": "barrier", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.pushable_pullable": "barrier", "movable_object.traffic_cone": "traffic_cone", "pedestrian.adult": "pedestrian", "pedestrian.child": "pedestrian", @@ -123,7 +123,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "bollard", + "static_object.bollard": "barrier", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -143,6 +143,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -151,6 +154,8 @@ "bus", "bicycle", "pedestrian", + "traffic_cone", + "barrier" ] num_class = len(class_names) metainfo = dict(classes=class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2.py b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2.py index 3c8675c13..e737994aa 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2.py @@ -72,8 +72,8 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "movable_object.barrier": "barrier", - "movable_object.debris": "debris", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.debris": "barrier", + "movable_object.pushable_pullable": "barrier", "movable_object.trafficcone": "traffic_cone", "movable_object.traffic_cone": "traffic_cone", "animal": "animal", @@ -94,7 +94,7 @@ # DBv2.0 and DBv3.0 "animal": "animal", "movable_object.barrier": "barrier", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.pushable_pullable": "barrier", "movable_object.traffic_cone": "traffic_cone", "pedestrian.adult": "pedestrian", "pedestrian.child": "pedestrian", @@ -104,7 +104,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "bollard", + "static_object.bollard": "barrier", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -124,6 +124,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -132,6 +135,8 @@ "bus", "bicycle", "pedestrian", + "traffic_cone", + "barrier", ] num_class = len(class_names) metainfo = dict(classes=class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py index cc3a86d3e..a8f6c6e7d 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py @@ -78,8 +78,8 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "movable_object.barrier": "barrier", - "movable_object.debris": "debris", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.debris": "barrier", + "movable_object.pushable_pullable": "barrier", "movable_object.trafficcone": "traffic_cone", "movable_object.traffic_cone": "traffic_cone", "animal": "animal", @@ -100,7 +100,7 @@ # DBv2.0 and DBv3.0 "animal": "animal", "movable_object.barrier": "barrier", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.pushable_pullable": "barrier", "movable_object.traffic_cone": "traffic_cone", "pedestrian.adult": "pedestrian", "pedestrian.child": "pedestrian", @@ -110,7 +110,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "bollard", + "static_object.bollard": "barrier", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -130,14 +130,20 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } + class_names = [ "car", "truck", "bus", "bicycle", "pedestrian", + "traffic_cone", + "barrier", ] num_class = len(class_names) metainfo = dict(classes=class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py index b7ddb799a..229ff7604 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py @@ -68,8 +68,8 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "movable_object.barrier": "barrier", - "movable_object.debris": "debris", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.debris": "barrier", + "movable_object.pushable_pullable": "barrier", "movable_object.trafficcone": "traffic_cone", "movable_object.traffic_cone": "traffic_cone", "animal": "animal", @@ -90,7 +90,7 @@ # DBv2.0 and DBv3.0 "animal": "animal", "movable_object.barrier": "barrier", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.pushable_pullable": "barrier", "movable_object.traffic_cone": "traffic_cone", "pedestrian.adult": "pedestrian", "pedestrian.child": "pedestrian", @@ -100,7 +100,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "bollard", + "static_object.bollard": "barrier", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -120,6 +120,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -128,7 +131,10 @@ "bus", "bicycle", "pedestrian", + "traffic_cone", + "barrier", ] + num_class = len(class_names) metainfo = dict(classes=class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py index f91bbc22f..411cabe7e 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py @@ -65,8 +65,8 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "movable_object.barrier": "barrier", - "movable_object.debris": "debris", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.debris": "barrier", + "movable_object.pushable_pullable": "barrier", "movable_object.trafficcone": "traffic_cone", "movable_object.traffic_cone": "traffic_cone", "animal": "animal", @@ -87,7 +87,7 @@ # DBv2.0 and DBv3.0 "animal": "animal", "movable_object.barrier": "barrier", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.pushable_pullable": "barrier", "movable_object.traffic_cone": "traffic_cone", "pedestrian.adult": "pedestrian", "pedestrian.child": "pedestrian", @@ -97,7 +97,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "bollard", + "static_object.bollard": "barrier", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -117,6 +117,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -125,7 +128,10 @@ "bus", "bicycle", "pedestrian", + "traffic_cone", + "barrier", ] + num_class = len(class_names) metainfo = dict(classes=class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py b/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py index b117c3798..a611750d3 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py @@ -67,8 +67,8 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "movable_object.barrier": "barrier", - "movable_object.debris": "debris", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.debris": "barrier", + "movable_object.pushable_pullable": "barrier", "movable_object.trafficcone": "traffic_cone", "movable_object.traffic_cone": "traffic_cone", "animal": "animal", @@ -89,7 +89,7 @@ # DBv2.0 and DBv3.0 "animal": "animal", "movable_object.barrier": "barrier", - "movable_object.pushable_pullable": "pushable_pullable", + "movable_object.pushable_pullable": "barrier", "movable_object.traffic_cone": "traffic_cone", "pedestrian.adult": "pedestrian", "pedestrian.child": "pedestrian", @@ -99,7 +99,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "bollard", + "static_object.bollard": "barrier", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -119,6 +119,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -127,7 +130,10 @@ "bus", "bicycle", "pedestrian", + "traffic_cone", + "barrier", ] + num_class = len(class_names) metainfo = dict(classes=class_names) From 33f11cd5db171246654950d2a0afc22a757dcce5 Mon Sep 17 00:00:00 2001 From: KokSeang Date: Sat, 25 Apr 2026 14:08:04 +0900 Subject: [PATCH 34/68] Added --- .../download_t4dataset/download_t4dataset.py | 4 ++-- tools/detection3d/create_data_t4dataset.py | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pipelines/webauto/download_t4dataset/download_t4dataset.py b/pipelines/webauto/download_t4dataset/download_t4dataset.py index f06f6979d..d06b85717 100644 --- a/pipelines/webauto/download_t4dataset/download_t4dataset.py +++ b/pipelines/webauto/download_t4dataset/download_t4dataset.py @@ -68,8 +68,8 @@ def get_t4dataset_ids(config_path: str) -> list[str]: for key in required_keys: for t4dataset_ids in data_splits[key]: t4dataset_ids = t4dataset_ids.split("/") - if len(t4dataset_ids) == 4: - t4dataset_id, t4dataset_version_id, city, vehicle_type = t4dataset_ids + if len(t4dataset_ids) == 5: + t4dataset_id, t4dataset_version_id, city, vehicle_type, traffic_cone_barrier_status = t4dataset_ids elif len(t4dataset_ids) == 2: t4dataset_id, t4dataset_version_id = t4dataset_ids elif len(t4dataset_ids) == 1: diff --git a/tools/detection3d/create_data_t4dataset.py b/tools/detection3d/create_data_t4dataset.py index 1e61af9d8..e75a36a04 100644 --- a/tools/detection3d/create_data_t4dataset.py +++ b/tools/detection3d/create_data_t4dataset.py @@ -104,6 +104,7 @@ def get_info( max_sweeps: int, city: Optional[str] = None, vehicle_type: Optional[str] = None, + traffic_cone_barrier_status: Optional[str] = None, ) -> Dict[str, Any]: lidar_token = get_lidar_token(sample) if lidar_token is None: @@ -129,6 +130,11 @@ def get_info( sd_record: SampleData = t4.get("sample_data", lidar_token) info = get_empty_standard_data_info(cfg.camera_types) + + if traffic_cone_barrier_status is not None and traffic_cone_barrier_status == "true": + traffic_cone_barrier_status = True + else: + traffic_cone_barrier_status = False basic_info = dict( sample_idx=i, @@ -139,6 +145,7 @@ def get_info( scene_name=scene_record.name, city=city, vehicle_type=vehicle_type, + traffic_cone_barrier_status=traffic_cone_barrier_status, ) for new_info in [ @@ -302,8 +309,8 @@ def main(): f"Creating data info for scene: {scene_id}, steps: {sample_steps}, sweeps: {args.max_sweeps}" ) dataset_scene_info = scene_id.split("/") - if len(dataset_scene_info) == 4: - t4_dataset_id, t4_dataset_version_id, city, vehicle_type = dataset_scene_info + if len(dataset_scene_info) == 5: + t4_dataset_id, t4_dataset_version_id, city, vehicle_type, traffic_cone_barrier_status = dataset_scene_info elif len(dataset_scene_info) == 2: t4_dataset_id, t4_dataset_version_id = dataset_scene_info city = vehicle_type = None @@ -326,7 +333,7 @@ def main(): infos = [] for i in range(0, len(t4.sample), sample_steps): sample = t4.sample[i] - info = get_info(cfg, t4, sample, i, args.max_sweeps, city, vehicle_type) + info = get_info(cfg, t4, sample, i, args.max_sweeps, city, vehicle_type, traffic_cone_barrier_status) if info is None: continue # info["version"] = dataset_version # used for visualizations during debugging. From 2237522607f97186e9900c4b4884159684ba9fad Mon Sep 17 00:00:00 2001 From: KokSeang Date: Sat, 25 Apr 2026 14:36:45 +0900 Subject: [PATCH 35/68] Added --- .../configs/detection3d/dataset/t4dataset/base.py | 12 ++++++------ .../configs/detection3d/dataset/t4dataset/j6gen2.py | 12 ++++++------ .../detection3d/dataset/t4dataset/j6gen2_base.py | 12 ++++++------ .../detection3d/dataset/t4dataset/jpntaxi_base.py | 12 ++++++------ .../detection3d/dataset/t4dataset/jpntaxi_gen2.py | 12 ++++++------ .../detection3d/dataset/t4dataset/largebus.py | 12 ++++++------ 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/base.py index 3f90e7e0c..4248c90e6 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/base.py @@ -123,7 +123,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "barrier", + "static_object.bollard": "bollard", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -143,9 +143,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", - "barrier": "barrier", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -154,8 +154,8 @@ "bus", "bicycle", "pedestrian", - "traffic_cone", - "barrier" + "traffic_cone", + "barrier" ] num_class = len(class_names) metainfo = dict(classes=class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2.py b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2.py index e737994aa..0324e7207 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2.py @@ -104,7 +104,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "barrier", + "static_object.bollard": "bollard", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -124,9 +124,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", - "barrier": "barrier", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -135,8 +135,8 @@ "bus", "bicycle", "pedestrian", - "traffic_cone", - "barrier", + "traffic_cone", + "barrier", ] num_class = len(class_names) metainfo = dict(classes=class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py index a8f6c6e7d..b9ec03f27 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py @@ -110,7 +110,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "barrier", + "static_object.bollard": "bollard", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -130,9 +130,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", - "barrier": "barrier", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } @@ -142,8 +142,8 @@ "bus", "bicycle", "pedestrian", - "traffic_cone", - "barrier", + "traffic_cone", + "barrier", ] num_class = len(class_names) metainfo = dict(classes=class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py index 229ff7604..c08decfa1 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base.py @@ -100,7 +100,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "barrier", + "static_object.bollard": "bollard", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -120,9 +120,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", - "barrier": "barrier", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -131,8 +131,8 @@ "bus", "bicycle", "pedestrian", - "traffic_cone", - "barrier", + "traffic_cone", + "barrier", ] num_class = len(class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py index 411cabe7e..6b7250673 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py @@ -97,7 +97,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "barrier", + "static_object.bollard": "bollard", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -117,9 +117,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", - "barrier": "barrier", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -128,8 +128,8 @@ "bus", "bicycle", "pedestrian", - "traffic_cone", - "barrier", + "traffic_cone", + "barrier", ] num_class = len(class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py b/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py index a611750d3..2b54629eb 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py @@ -99,7 +99,7 @@ "pedestrian.stroller": "pedestrian", "pedestrian.wheelchair": "pedestrian", "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "barrier", + "static_object.bollard": "bollard", "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car "vehicle.bicycle": "bicycle", "vehicle.bus": "bus", @@ -119,9 +119,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", - "barrier": "barrier", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ @@ -130,8 +130,8 @@ "bus", "bicycle", "pedestrian", - "traffic_cone", - "barrier", + "traffic_cone", + "barrier", ] num_class = len(class_names) From 60df4c0911f1559db0e917a2f2d9045ab07f83f3 Mon Sep 17 00:00:00 2001 From: KokSeang Date: Sat, 25 Apr 2026 23:16:34 +0900 Subject: [PATCH 36/68] Added --- tools/detection3d/create_data_t4dataset.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/detection3d/create_data_t4dataset.py b/tools/detection3d/create_data_t4dataset.py index e75a36a04..62169bc7a 100644 --- a/tools/detection3d/create_data_t4dataset.py +++ b/tools/detection3d/create_data_t4dataset.py @@ -102,9 +102,9 @@ def get_info( sample: Sample, i: int, max_sweeps: int, + traffic_cone_barrier_status: str, city: Optional[str] = None, vehicle_type: Optional[str] = None, - traffic_cone_barrier_status: Optional[str] = None, ) -> Dict[str, Any]: lidar_token = get_lidar_token(sample) if lidar_token is None: @@ -130,8 +130,7 @@ def get_info( sd_record: SampleData = t4.get("sample_data", lidar_token) info = get_empty_standard_data_info(cfg.camera_types) - - if traffic_cone_barrier_status is not None and traffic_cone_barrier_status == "true": + if traffic_cone_barrier_status == "true": traffic_cone_barrier_status = True else: traffic_cone_barrier_status = False @@ -333,7 +332,7 @@ def main(): infos = [] for i in range(0, len(t4.sample), sample_steps): sample = t4.sample[i] - info = get_info(cfg, t4, sample, i, args.max_sweeps, city, vehicle_type, traffic_cone_barrier_status) + info = get_info(cfg, t4, sample, i, args.max_sweeps, traffic_cone_barrier_status, city, vehicle_type) if info is None: continue # info["version"] = dataset_version # used for visualizations during debugging. From b5dabf2d53e4cde87b994c723f5233dadb267ec6 Mon Sep 17 00:00:00 2001 From: KokSeang Date: Mon, 27 Apr 2026 14:27:49 +0900 Subject: [PATCH 37/68] Added --- .../BEVFusion/bevfusion/bevfusion_head.py | 79 +++++++++++++++---- projects/BEVFusion/bevfusion/utils.py | 11 ++- .../default_lidar_second_secfpn_120m.py | 5 +- .../default/pipelines/default_lidar_120m.py | 2 + .../pipelines/default_lidar_intensity_120m.py | 2 + 5 files changed, 81 insertions(+), 18 deletions(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index 853523c4f..9bbc6469c 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -69,6 +69,7 @@ def __init__( train_cfg=None, test_cfg=None, bbox_coder=None, + partial_traffic_cone_barrier=False, ): super().__init__() self.class_names = class_names @@ -82,7 +83,8 @@ def __init__( self.nms_kernel_size = nms_kernel_size self.train_cfg = train_cfg self.test_cfg = test_cfg - + # If true, only compute loss for traffic cone and barrier when it's available in the frame + self.partial_traffic_cone_barrier = partial_traffic_cone_barrier self.use_sigmoid_cls = loss_cls.get("use_sigmoid", False) if not self.use_sigmoid_cls: self.num_classes += 1 @@ -185,6 +187,13 @@ def __init__( cluster["class_indices"] = sorted( [self.class_name_to_indices[class_name] for class_name in cluster["class_names"]] ) + + if self.partial_traffic_cone_barrier: + assert loss_heatmap['reduction'] == 'none', "Loss reduction must be 'none' for partial traffic cone and barrier" + self.ignore_labels = [self.class_name_to_indices["traffic_cone"], self.class_name_to_indices["barrier"]] + else: + self.ignore_labels = None + def create_2D_grid(self, x_size, y_size): meshgrid = [[0, x_size - 1, x_size], [0, y_size - 1, y_size]] @@ -456,7 +465,7 @@ def predict_by_feat(self, preds_dicts, metas, img=None, rescale=False, for_roi=F return rets[0] - def get_targets(self, batch_gt_instances_3d: List[InstanceData], preds_dict: List[dict]): + def get_targets(self, batch_gt_instances_3d: List[InstanceData], preds_dict: List[dict], batch_metadata: List[dict]): """Generate training targets. Args: batch_gt_instances_3d (List[InstanceData]): @@ -500,6 +509,7 @@ def get_targets(self, batch_gt_instances_3d: List[InstanceData], preds_dict: Lis batch_gt_instances_3d, list_of_pred_dict, np.arange(len(batch_gt_instances_3d)), + batch_metadata, ) labels = torch.cat(res_tuple[0], dim=0) label_weights = torch.cat(res_tuple[1], dim=0) @@ -509,6 +519,7 @@ def get_targets(self, batch_gt_instances_3d: List[InstanceData], preds_dict: Lis num_pos = np.sum(res_tuple[5]) matched_ious = np.mean(res_tuple[6]) heatmap = torch.cat(res_tuple[7], dim=0) + heatmap_weights = torch.cat(res_tuple[8], dim=0) return ( labels, label_weights, @@ -518,9 +529,10 @@ def get_targets(self, batch_gt_instances_3d: List[InstanceData], preds_dict: Lis num_pos, matched_ious, heatmap, + heatmap_weights, ) - def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx): + def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, batch_metadata): """Generate training targets for a single sample. Args: gt_instances_3d (:obj:`InstanceData`): ground truth of instances. @@ -563,6 +575,12 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx): num_layer = self.num_decoder_layers else: num_layer = 1 + + traffic_cone_barrier_status = batch_metadata[batch_idx].get("traffic_cone_barrier_status", True) + if self.ignore_labels is not None and not traffic_cone_barrier_status: + ignore_labels = self.ignore_labels + else: + ignore_labels = None assign_result_list = [] for idx_layer in range(num_layer): @@ -581,6 +599,7 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx): gt_labels_3d, score_layer, self.train_cfg, + ignore_labels, ) elif self.train_cfg.assigner.type == "HeuristicAssigner": assign_result = self.bbox_assigner.assign( @@ -637,10 +656,10 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx): label_weights[pos_inds] = 1.0 else: label_weights[pos_inds] = self.train_cfg.pos_weight - + if len(neg_inds) > 0: label_weights[neg_inds] = 1.0 - + # # compute dense heatmap targets device = labels.device gt_bboxes_3d = torch.cat([gt_bboxes_3d.gravity_center, gt_bboxes_3d.tensor[:, 3:]], dim=1).to(device) @@ -671,6 +690,15 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx): draw_heatmap_gaussian(heatmap[gt_labels_3d[idx]], center_int[[1, 0]], radius) mean_iou = ious[pos_inds].sum() / max(len(pos_inds), 1) + heatmap_weights = torch.ones_like(heatmap) + + # Ignore labels for traffic cone and barrier + if self.ignore_labels is not None and not traffic_cone_barrier_status: + pred_labels = pred_instances.scores.argmax(dim=1, keepdim=False) + ignore_preds_masks = pred_labels.isin(self.ignore_labels) + label_weights[ignore_preds_masks] = 0.0 # Set to 0 to ignore these proposals + heatmap_weights[self.ignore_labels] = 0.0 # Set to 0 to ignore these proposals + return ( labels[None], label_weights[None], @@ -680,6 +708,7 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx): int(pos_inds.shape[0]), float(mean_iou), heatmap[None], + heatmap_weights[None], ) def loss(self, batch_feats, batch_data_samples): @@ -698,11 +727,11 @@ def loss(self, batch_feats, batch_data_samples): batch_input_metas.append(data_sample.metainfo) batch_gt_instances_3d.append(data_sample.gt_instances_3d) preds_dicts = self(batch_feats, batch_input_metas) - loss = self.loss_by_feat(preds_dicts, batch_gt_instances_3d) + loss = self.loss_by_feat(preds_dicts, batch_gt_instances_3d, batch_input_metas) return loss - def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: List[InstanceData], *args, **kwargs): + def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: List[InstanceData], batch_input_metas): ( labels, label_weights, @@ -712,7 +741,8 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li num_pos, matched_ious, heatmap, - ) = self.get_targets(batch_gt_instances_3d, preds_dicts[0]) + heatmap_weights, + ) = self.get_targets(batch_gt_instances_3d, preds_dicts[0], batch_input_metas) if hasattr(self, "on_the_image_mask"): label_weights = label_weights * self.on_the_image_mask bbox_weights = bbox_weights * self.on_the_image_mask[:, :, None] @@ -721,13 +751,32 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li loss_dict = dict() # compute heatmap loss - loss_heatmap = self.loss_heatmap( - clip_sigmoid(preds_dict["dense_heatmap"]).float(), - heatmap.float(), - avg_factor=max(heatmap.eq(1).float().sum().item(), 1), - ) - loss_dict["loss_heatmap"] = loss_heatmap - + preds_dense_heatmap = clip_sigmoid(preds_dict["dense_heatmap"].float()) + num_pos_dense_heatmap = max(heatmap.eq(1).float().sum().item(), 1) + if self.ignore_labels is not None: + loss_heatmap = self.loss_heatmap( + preds_dense_heatmap, + heatmap.float(), + avg_factor=num_pos_dense_heatmap, + ) + loss_dict["loss_heatmap"] = loss_heatmap + else: + # When ignore labels is found, we compute the loss for each class + # heatmap focal loss + loss_heatmap_cls: torch.Tensor = self.loss_heatmap( + preds_dense_heatmap, + heatmap.float(), + ) + # (Batch, num_classes, height, width) * (Batch, num_classes, height, width) + loss_heatmap_cls = loss_heatmap_cls * heatmap_weights.float() + loss_heatmap_cls = loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap + # (Batch, num_classes) + for cls_i, class_name in enumerate(self.class_names): + loss_dict[f"loss_heatmap_{class_name}"] = loss_heatmap_cls[cls_i] + + # Prevent loss item to avoid computing gradients twice. This is for logging. + loss_dict["total_dense_heatmap"] = loss_heatmap_cls.sum() + # compute loss for each layer for idx_layer in range(self.num_decoder_layers if self.auxiliary else 1): if idx_layer == self.num_decoder_layers - 1 or (idx_layer == 0 and self.auxiliary is False): diff --git a/projects/BEVFusion/bevfusion/utils.py b/projects/BEVFusion/bevfusion/utils.py index c47604dbd..b27d9e681 100644 --- a/projects/BEVFusion/bevfusion/utils.py +++ b/projects/BEVFusion/bevfusion/utils.py @@ -238,7 +238,7 @@ def __init__( self.iou_cost = TASK_UTILS.build(iou_cost) self.iou_calculator = TASK_UTILS.build(iou_calculator) - def assign(self, bboxes, gt_bboxes, gt_labels, cls_pred, train_cfg): + def assign(self, bboxes, gt_bboxes, gt_labels, cls_pred, train_cfg, ignore_labels=None): num_gts, num_bboxes = gt_bboxes.size(0), bboxes.size(0) # 1. assign -1 by default @@ -259,9 +259,16 @@ def assign(self, bboxes, gt_bboxes, gt_labels, cls_pred, train_cfg): reg_cost = self.reg_cost(bboxes, gt_bboxes, train_cfg) iou = self.iou_calculator(bboxes, gt_bboxes) iou_cost = self.iou_cost(iou) - + # weighted sum of above three costs cost = cls_cost + reg_cost + iou_cost + + if ignore_labels is not None: + preds_labels = pred_instances.scores.argmax(dim=1, keepdim=False) + print("shape of pred_instances.scores, preds_labels", pred_instances.scores.shape, preds_labels.shape) + ignore_preds_masks = preds_labels.isin(ignore_labels) + cost[ignore_preds_masks] = 10000 + print("shape of ignore_preds_masks, cost", ignore_preds_masks.shape, cost.shape) # 3. do Hungarian matching on CPU using linear_sum_assignment cost = cost.detach().cpu() diff --git a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py index b5d9a8fdc..94fca2829 100644 --- a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py @@ -91,9 +91,11 @@ dict(class_names=["car", "truck", "bus"], nms_threshold=0.5), # It's radius if using circle_nms dict(class_names=["bicycle"], nms_threshold=0.5), dict(class_names=["pedestrian"], nms_threshold=0.175), + dict(class_names=["barrier"], nms_threshold=0.25), + dict(class_names=["traffic_cone"], nms_threshold=0.175), ], ), - dense_heatmap_pooling_classes=["car", "truck", "bus", "bicycle"], # Use class indices for pooling + dense_heatmap_pooling_classes=["car", "truck", "bus", "bicycle", "barrier"], # Use class indices for pooling common_heads=dict(center=[2, 2], height=[1, 2], dim=[3, 2], rot=[2, 2], vel=[2, 2]), bbox_coder=dict( type="TransFusionBBoxCoder", @@ -112,5 +114,6 @@ ), loss_heatmap=dict(type="mmdet.GaussianFocalLoss", reduction="mean", loss_weight=1.0), loss_bbox=dict(type="mmdet.L1Loss", reduction="mean", loss_weight=0.25), + partial_traffic_cone_barrier=True ), ) diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py index 06d95be16..c3e8e18ee 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py @@ -84,6 +84,7 @@ "timestamp", "vehicle_type", "city", + "traffic_cone_barrier_status", ], ), ] @@ -127,6 +128,7 @@ "timestamp", "vehicle_type", "city", + "traffic_cone_barrier_status", ], ), ] diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py index 4e74d3616..a9032fcdc 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py @@ -84,6 +84,7 @@ "timestamp", "vehicle_type", "city", + "traffic_cone_barrier_status", ], ), ] @@ -127,6 +128,7 @@ "timestamp", "vehicle_type", "city", + "traffic_cone_barrier_status", ], ), ] From 79024cf9f861e086d77b7b1362b62be6c81f6bc5 Mon Sep 17 00:00:00 2001 From: KokSeang Date: Mon, 27 Apr 2026 14:41:33 +0900 Subject: [PATCH 38/68] Added --- projects/BEVFusion/bevfusion/bevfusion_head.py | 3 +++ .../default/models/default_lidar_second_secfpn_120m.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index 9bbc6469c..d616725d2 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -15,6 +15,7 @@ from mmdet.models.utils import multi_apply from mmengine.structures import InstanceData from torch import nn +from mmengine.logging import print_log def clip_sigmoid(x, eps=1e-4): @@ -194,6 +195,8 @@ def __init__( else: self.ignore_labels = None + print_log(f"BEVFusionHead Ignore labels: {self.ignore_labels}, dense heatmap pooling classes: \ + {self.dense_heatmap_pooling_classes}, class_names: {self.class_names}", logger="current") def create_2D_grid(self, x_size, y_size): meshgrid = [[0, x_size - 1, x_size], [0, y_size - 1, y_size]] diff --git a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py index 94fca2829..ec37de42a 100644 --- a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py @@ -91,7 +91,7 @@ dict(class_names=["car", "truck", "bus"], nms_threshold=0.5), # It's radius if using circle_nms dict(class_names=["bicycle"], nms_threshold=0.5), dict(class_names=["pedestrian"], nms_threshold=0.175), - dict(class_names=["barrier"], nms_threshold=0.25), + dict(class_names=["barrier"], nms_threshold=0.5), dict(class_names=["traffic_cone"], nms_threshold=0.175), ], ), From e771a69cb77196e16263b0049919837d0edb275e Mon Sep 17 00:00:00 2001 From: KokSeang Date: Mon, 27 Apr 2026 18:18:08 +0900 Subject: [PATCH 39/68] Added --- .../BEVFusion/bevfusion/bevfusion_head.py | 21 +++++++++++-------- projects/BEVFusion/bevfusion/utils.py | 12 +++++------ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index d616725d2..7e62d21a4 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -579,12 +579,6 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, batch_metad else: num_layer = 1 - traffic_cone_barrier_status = batch_metadata[batch_idx].get("traffic_cone_barrier_status", True) - if self.ignore_labels is not None and not traffic_cone_barrier_status: - ignore_labels = self.ignore_labels - else: - ignore_labels = None - assign_result_list = [] for idx_layer in range(num_layer): bboxes_tensor_layer = bboxes_tensor[ @@ -638,7 +632,8 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, batch_metad ious = assign_result_ensemble.max_overlaps ious = torch.clamp(ious, min=0.0, max=1.0) labels = bboxes_tensor.new_zeros(num_proposals, dtype=torch.long) - label_weights = bboxes_tensor.new_zeros(num_proposals, dtype=torch.long) + label_weights = bboxes_tensor.new_zeros([num_proposals, self.num_classes], dtype=torch.long) + # label_weights = bboxes_tensor.new_zeros(num_proposals, dtype=torch.long) if gt_labels_3d is not None: # default label is -1 labels += self.num_classes @@ -696,11 +691,12 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, batch_metad heatmap_weights = torch.ones_like(heatmap) # Ignore labels for traffic cone and barrier + traffic_cone_barrier_status = batch_metadata[batch_idx].get("traffic_cone_barrier_status", True) if self.ignore_labels is not None and not traffic_cone_barrier_status: pred_labels = pred_instances.scores.argmax(dim=1, keepdim=False) ignore_preds_masks = pred_labels.isin(self.ignore_labels) - label_weights[ignore_preds_masks] = 0.0 # Set to 0 to ignore these proposals heatmap_weights[self.ignore_labels] = 0.0 # Set to 0 to ignore these proposals + label_weights[:, self.ignore_labels] = 0.0 # Set to 0 to ignore traffic_cone and barrier return ( labels[None], @@ -791,10 +787,17 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li ..., idx_layer * self.num_proposals : (idx_layer + 1) * self.num_proposals, ].reshape(-1) + # layer_label_weights = label_weights[ + # ..., + # idx_layer * self.num_proposals : (idx_layer + 1) * self.num_proposals, + # ].reshape(-1) layer_label_weights = label_weights[ ..., idx_layer * self.num_proposals : (idx_layer + 1) * self.num_proposals, - ].reshape(-1) + ] + # (Batch*num_proposals, num_classes) + layer_label_weights = layer_label_weights.reshape(-1, self.num_classes) + print_log(f"layer_label_weights: {layer_label_weights.shape}", logger="current") layer_score = preds_dict["heatmap"][ ..., idx_layer * self.num_proposals : (idx_layer + 1) * self.num_proposals, diff --git a/projects/BEVFusion/bevfusion/utils.py b/projects/BEVFusion/bevfusion/utils.py index b27d9e681..b6bd2be41 100644 --- a/projects/BEVFusion/bevfusion/utils.py +++ b/projects/BEVFusion/bevfusion/utils.py @@ -263,12 +263,12 @@ def assign(self, bboxes, gt_bboxes, gt_labels, cls_pred, train_cfg, ignore_label # weighted sum of above three costs cost = cls_cost + reg_cost + iou_cost - if ignore_labels is not None: - preds_labels = pred_instances.scores.argmax(dim=1, keepdim=False) - print("shape of pred_instances.scores, preds_labels", pred_instances.scores.shape, preds_labels.shape) - ignore_preds_masks = preds_labels.isin(ignore_labels) - cost[ignore_preds_masks] = 10000 - print("shape of ignore_preds_masks, cost", ignore_preds_masks.shape, cost.shape) + # if ignore_labels is not None: + # preds_labels = pred_instances.scores.argmax(dim=1, keepdim=False) + # print("shape of pred_instances.scores, preds_labels", pred_instances.scores.shape, preds_labels.shape) + # ignore_preds_masks = preds_labels.isin(ignore_labels) + # cost[ignore_preds_masks] = 10000 + # print("shape of ignore_preds_masks, cost", ignore_preds_masks.shape, cost.shape) # 3. do Hungarian matching on CPU using linear_sum_assignment cost = cost.detach().cpu() From 05703cbad1bf353279c4feff7af59ae6926c6281 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Mon, 27 Apr 2026 20:07:18 +0900 Subject: [PATCH 40/68] Update configs --- .../BEVFusion/bevfusion/bevfusion_head.py | 30 ++-- ..._secfpn_50e_8xb8_base_120m_traffic_cone.py | 163 ++++++++++++++++++ .../default_lidar_second_secfpn_120m.py | 2 +- .../default/pipelines/default_lidar_120m.py | 2 + 4 files changed, 179 insertions(+), 18 deletions(-) create mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone.py diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index 7e62d21a4..ace7f26b8 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -70,7 +70,7 @@ def __init__( train_cfg=None, test_cfg=None, bbox_coder=None, - partial_traffic_cone_barrier=False, + partial_ignore_labels=None ): super().__init__() self.class_names = class_names @@ -84,8 +84,6 @@ def __init__( self.nms_kernel_size = nms_kernel_size self.train_cfg = train_cfg self.test_cfg = test_cfg - # If true, only compute loss for traffic cone and barrier when it's available in the frame - self.partial_traffic_cone_barrier = partial_traffic_cone_barrier self.use_sigmoid_cls = loss_cls.get("use_sigmoid", False) if not self.use_sigmoid_cls: self.num_classes += 1 @@ -189,13 +187,14 @@ def __init__( [self.class_name_to_indices[class_name] for class_name in cluster["class_names"]] ) - if self.partial_traffic_cone_barrier: + # If true, only compute loss for traffic cone and barrier when it's available in the frame + if partial_ignore_labels is not None: assert loss_heatmap['reduction'] == 'none', "Loss reduction must be 'none' for partial traffic cone and barrier" - self.ignore_labels = [self.class_name_to_indices["traffic_cone"], self.class_name_to_indices["barrier"]] + self.partial_ignore_labels = [self.class_name_to_indices[class_name] for class_name in partial_ignore_labels] else: - self.ignore_labels = None + self.partial_ignore_labels = None - print_log(f"BEVFusionHead Ignore labels: {self.ignore_labels}, dense heatmap pooling classes: \ + print_log(f"BEVFusionHead Partial ignore labels: {self.partial_ignore_labels}, dense heatmap pooling classes: \ {self.dense_heatmap_pooling_classes}, class_names: {self.class_names}", logger="current") def create_2D_grid(self, x_size, y_size): @@ -535,7 +534,7 @@ def get_targets(self, batch_gt_instances_3d: List[InstanceData], preds_dict: Lis heatmap_weights, ) - def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, batch_metadata): + def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): """Generate training targets for a single sample. Args: gt_instances_3d (:obj:`InstanceData`): ground truth of instances. @@ -596,7 +595,6 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, batch_metad gt_labels_3d, score_layer, self.train_cfg, - ignore_labels, ) elif self.train_cfg.assigner.type == "HeuristicAssigner": assign_result = self.bbox_assigner.assign( @@ -691,12 +689,10 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, batch_metad heatmap_weights = torch.ones_like(heatmap) # Ignore labels for traffic cone and barrier - traffic_cone_barrier_status = batch_metadata[batch_idx].get("traffic_cone_barrier_status", True) - if self.ignore_labels is not None and not traffic_cone_barrier_status: - pred_labels = pred_instances.scores.argmax(dim=1, keepdim=False) - ignore_preds_masks = pred_labels.isin(self.ignore_labels) - heatmap_weights[self.ignore_labels] = 0.0 # Set to 0 to ignore these proposals - label_weights[:, self.ignore_labels] = 0.0 # Set to 0 to ignore traffic_cone and barrier + traffic_cone_barrier_status = metadata.get("traffic_cone_barrier_status", True) + if self.partial_ignore_labels is not None and not traffic_cone_barrier_status: + heatmap_weights[self.partial_ignore_labels] = 0.0 # Set to 0 to ignore these proposals + label_weights[:, self.partial_ignore_labels] = 0.0 # Set to 0 to ignore traffic_cone and barrier return ( labels[None], @@ -752,7 +748,7 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li # compute heatmap loss preds_dense_heatmap = clip_sigmoid(preds_dict["dense_heatmap"].float()) num_pos_dense_heatmap = max(heatmap.eq(1).float().sum().item(), 1) - if self.ignore_labels is not None: + if self.partial_ignore_labels is not None: loss_heatmap = self.loss_heatmap( preds_dense_heatmap, heatmap.float(), @@ -797,12 +793,12 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li ] # (Batch*num_proposals, num_classes) layer_label_weights = layer_label_weights.reshape(-1, self.num_classes) - print_log(f"layer_label_weights: {layer_label_weights.shape}", logger="current") layer_score = preds_dict["heatmap"][ ..., idx_layer * self.num_proposals : (idx_layer + 1) * self.num_proposals, ] layer_cls_score = layer_score.permute(0, 2, 1).reshape(-1, self.num_classes) + print_log(f"layer_label_weights: {layer_label_weights.shape}, layer_score: {layer_score.shape}, layer_labels: {layer_labels.shape}", logger="current") layer_loss_cls = self.loss_cls( layer_cls_score.float(), layer_labels, diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone.py new file mode 100644 index 000000000..39c6ddf54 --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone.py @@ -0,0 +1,163 @@ +_base_ = [ + "../../../../../autoware_ml/configs/detection3d/default_runtime.py", + "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/base.py", + "../default/pipelines/default_lidar_120m.py", + "../default/models/default_lidar_second_secfpn_120m.py", + "../default/schedulers/default_50e_8xb8_adamw_cosine.py", + "../default/default_misc.py", +] + +custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) +custom_imports["imports"] += _base_.custom_imports["imports"] +custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] + +# user setting +data_root = "data/t4dataset/" +info_directory_path = "info/kokseang_2_8/" + +experiment_group_name = "bevfusion_lidar_traffic_cone/base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" +work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name + +# model parameter +model = dict( + type="BEVFusion", + voxelize_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + voxel_size=_base_.voxel_size, + voxelize_reduce=True, + ), + pts_voxel_encoder=dict(num_features=_base_.point_use_dim), + pts_middle_encoder=dict( + in_channels=_base_.point_use_dim, + sparse_shape=_base_.grid_size, + num_aug_features=4, + # min-max normalization for x, y, z, time_lag, where the max of time lag technically is two seeps (200 ms) here + aug_features_min_values=[ + _base_.point_cloud_range[0], + _base_.point_cloud_range[1], + _base_.point_cloud_range[2], + 0.0, + ], + aug_features_max_values=[ + _base_.point_cloud_range[3], + _base_.point_cloud_range[4], + _base_.point_cloud_range[5], + 0.2, + ], + ), + bbox_head=dict( + class_names=_base_.class_names, # Use class names to identify the correct class indices + train_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size, + ), + test_cfg=dict( + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size[0:2], + pc_range=_base_.point_cloud_range[0:2], + ), + bbox_coder=dict( + pc_range=_base_.point_cloud_range[0:2], + voxel_size=_base_.voxel_size[0:2], + ), + partial_ignore_labels=["traffic_cone", "barrier"], + loss_heatmap=dict( + reduction="none", + ), + ), +) + +# Dataset parameters +train_dataloader = dict( + batch_size=_base_.train_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=True), + dataset=dict( + type=_base_.dataset_type, + pipeline=_base_.train_pipeline, + modality=_base_.input_modality, + backend_args=_base_.backend_args, + data_root=data_root, + ann_file=info_directory_path + _base_.info_train_file_name, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + test_mode=False, + data_prefix=_base_.data_prefix, + box_type_3d="LiDAR", + filter_cfg=_base_.filter_cfg, + ), +) + +val_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_val_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +test_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_test_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +val_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_val_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, +) + +test_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_test_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, + save_csv=True, +) + +default_hooks = dict( + logger=dict(type="LoggerHook", interval=50), + checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), +) +log_processor = dict(window_size=50) diff --git a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py index ec37de42a..023c6774d 100644 --- a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py @@ -114,6 +114,6 @@ ), loss_heatmap=dict(type="mmdet.GaussianFocalLoss", reduction="mean", loss_weight=1.0), loss_bbox=dict(type="mmdet.L1Loss", reduction="mean", loss_weight=0.25), - partial_traffic_cone_barrier=True + partial_ignore_labels=None ), ) diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py index c3e8e18ee..455c2761a 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py @@ -13,6 +13,8 @@ "bus": 120, "bicycle": 120, "pedestrian": 120, + "traffic_cone": 120, + "barrier": 120, } # LiDAR parameters From 06ae9c2f75fc2060d102a1731d6365001bd91de8 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Mon, 27 Apr 2026 20:53:07 +0900 Subject: [PATCH 41/68] Update configs --- projects/BEVFusion/bevfusion/bevfusion_head.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index ace7f26b8..c58a04dca 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -748,7 +748,7 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li # compute heatmap loss preds_dense_heatmap = clip_sigmoid(preds_dict["dense_heatmap"].float()) num_pos_dense_heatmap = max(heatmap.eq(1).float().sum().item(), 1) - if self.partial_ignore_labels is not None: + if self.partial_ignore_labels is None: loss_heatmap = self.loss_heatmap( preds_dense_heatmap, heatmap.float(), @@ -798,7 +798,6 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li idx_layer * self.num_proposals : (idx_layer + 1) * self.num_proposals, ] layer_cls_score = layer_score.permute(0, 2, 1).reshape(-1, self.num_classes) - print_log(f"layer_label_weights: {layer_label_weights.shape}, layer_score: {layer_score.shape}, layer_labels: {layer_labels.shape}", logger="current") layer_loss_cls = self.loss_cls( layer_cls_score.float(), layer_labels, From d8c19749f3d54dd9a437b02ce58b2b0ca1af755d Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 09:52:10 +0900 Subject: [PATCH 42/68] Update configs --- projects/BEVFusion/bevfusion/bevfusion_head.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index c58a04dca..adbd64835 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -762,6 +762,10 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li preds_dense_heatmap, heatmap.float(), ) + loss_heatmap_cls_before_reduction = (loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap).clone().detach() + for cls_i, class_name in enumerate(self.class_names): + loss_dict[f"heatmap_{class_name}_before_reduction"] = loss_heatmap_cls_before_reduction[cls_i] + # (Batch, num_classes, height, width) * (Batch, num_classes, height, width) loss_heatmap_cls = loss_heatmap_cls * heatmap_weights.float() loss_heatmap_cls = loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap From 25e581c902b3ad907da44a5bcbd41d9d249a65d3 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 10:02:59 +0900 Subject: [PATCH 43/68] Update configs --- tools/detection3d/create_data_t4dataset.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/detection3d/create_data_t4dataset.py b/tools/detection3d/create_data_t4dataset.py index 62169bc7a..9550b2872 100644 --- a/tools/detection3d/create_data_t4dataset.py +++ b/tools/detection3d/create_data_t4dataset.py @@ -273,7 +273,8 @@ def main(): if cfg.filter_attributes is None: print_log("No attribute filtering is applied!") - + + remove_non_traffic_cone_barrier = cfg.get("remove_non_traffic_cone_barrier", False) # Get every pair of min-max distance filtering thresholds bev_distance_ranges = [] if hasattr(cfg, "evaluator_metric_configs"): @@ -310,6 +311,9 @@ def main(): dataset_scene_info = scene_id.split("/") if len(dataset_scene_info) == 5: t4_dataset_id, t4_dataset_version_id, city, vehicle_type, traffic_cone_barrier_status = dataset_scene_info + if remove_non_traffic_cone_barrier and traffic_cone_barrier_status == "false": + print_log(f"Skipping scene: {scene_id} because it does not have traffic cone or barrier", logger="current") + continue elif len(dataset_scene_info) == 2: t4_dataset_id, t4_dataset_version_id = dataset_scene_info city = vehicle_type = None From 9ba440a640eb8f9742cc47425e3e4d6977f58705 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 10:05:29 +0900 Subject: [PATCH 44/68] Update configs --- .../t4dataset/j6gen2_base_traffic_cone.py | 211 ++++++++++++++++++ .../t4dataset/jpntaxi_base_traffic_cone.py | 202 +++++++++++++++++ 2 files changed, 413 insertions(+) create mode 100644 autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py create mode 100644 autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py new file mode 100644 index 000000000..8c57cf4fa --- /dev/null +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py @@ -0,0 +1,211 @@ +custom_imports = dict( + imports=[ + "autoware_ml.detection3d.datasets.t4dataset", + "autoware_ml.detection3d.evaluation.t4metric.t4metric", + "autoware_ml.detection3d.evaluation.t4metric.t4metric_v2", + ] +) + +# dataset type setting +dataset_type = "T4Dataset" +info_train_file_name = "t4dataset_j6gen2_base_traffic_cone_infos_train.pkl" +info_val_file_name = "t4dataset_j6gen2_base_traffic_cone_infos_val.pkl" +info_test_file_name = "t4dataset_j6gen2_base_traffic_cone_infos_test.pkl" + +info_train_statistics_file_name = "t4dataset_j6gen2_base_traffic_cone_statistics_train.parquet" +info_val_statistics_file_name = "t4dataset_j6gen2_base_traffic_cone_statistics_val.parquet" +info_test_statistics_file_name = "t4dataset_j6gen2_base_traffic_cone_statistics_test.parquet" + +# dataset scene setting +dataset_version_list = [ + "db_j6gen2_v1", + "db_j6gen2_v2", + "db_j6gen2_v3", + "db_j6gen2_v4", + "db_j6gen2_v5", + "db_j6gen2_v6", + "db_j6gen2_v7", + "db_j6gen2_v8", + "db_j6gen2_v9", + "db_largebus_v1", + "db_largebus_v2", + "db_largebus_v3", +] + +dataset_test_groups = { + "largebus": ("t4dataset_largebus_traffic_cone_infos_test.pkl", False), + "j6gen2": ("t4dataset_j6gen2_traffic_cone_infos_test.pkl", False), + "j6gen2_base": ("t4dataset_j6gen2_base_traffic_cone_infos_test.pkl", True), +} + +# dataset format setting +data_prefix = dict( + pts="", + CAM_FRONT="", + CAM_FRONT_LEFT="", + CAM_FRONT_RIGHT="", + CAM_BACK="", + CAM_BACK_RIGHT="", + CAM_BACK_LEFT="", + sweeps="", +) + +camera_types = { + "CAM_FRONT", + "CAM_FRONT_RIGHT", + "CAM_FRONT_LEFT", + "CAM_BACK", + "CAM_BACK_LEFT", + "CAM_BACK_RIGHT", +} + +# class setting +name_mapping = { + # DBv1.0 + "vehicle.car": "car", + "vehicle.construction": "truck", + "vehicle.emergency (ambulance & police)": "car", + "vehicle.motorcycle": "bicycle", + "vehicle.trailer": "trailer", + "vehicle.truck": "truck", + "vehicle.bicycle": "bicycle", + "vehicle.bus (bendy & rigid)": "bus", + "pedestrian.adult": "pedestrian", + "pedestrian.child": "pedestrian", + "pedestrian.construction_worker": "pedestrian", + "pedestrian.personal_mobility": "pedestrian", + "pedestrian.police_officer": "pedestrian", + "pedestrian.stroller": "pedestrian", + "pedestrian.wheelchair": "pedestrian", + "movable_object.barrier": "barrier", + "movable_object.debris": "barrier", + "movable_object.pushable_pullable": "barrier", + "movable_object.trafficcone": "traffic_cone", + "movable_object.traffic_cone": "traffic_cone", + "animal": "animal", + "static_object.bicycle_rack": "bicycle_rack", + # DBv1.1 and UCv2.0 + "car": "car", + "truck": "truck", + "bus": "bus", + "trailer": "trailer", + "motorcycle": "bicycle", + "bicycle": "bicycle", + "police_car": "car", + "pedestrian": "pedestrian", + "police_officer": "pedestrian", + "forklift": "car", + "construction_worker": "pedestrian", + "stroller": "pedestrian", + # DBv2.0 and DBv3.0 + "animal": "animal", + "movable_object.barrier": "barrier", + "movable_object.pushable_pullable": "barrier", + "movable_object.traffic_cone": "traffic_cone", + "pedestrian.adult": "pedestrian", + "pedestrian.child": "pedestrian", + "pedestrian.construction_worker": "pedestrian", + "pedestrian.personal_mobility": "pedestrian", + "pedestrian.police_officer": "pedestrian", + "pedestrian.stroller": "pedestrian", + "pedestrian.wheelchair": "pedestrian", + "static_object.bicycle rack": "bicycle rack", + "static_object.bollard": "bollard", + "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car + "vehicle.bicycle": "bicycle", + "vehicle.bus": "bus", + "vehicle.car": "car", + "vehicle.construction": "truck", + "vehicle.fire": "truck", + "vehicle.motorcycle": "bicycle", + "vehicle.police": "car", + "vehicle.trailer": "trailer", + "vehicle.truck": "truck", + # DBv1.3 + "ambulance": "car", + "kart": "car", + "wheelchair": "pedestrian", + "personal_mobility": "pedestrian", + "fire_truck": "truck", + "semi_trailer": "trailer", + "tractor_unit": "truck", + "construction_vehicle": "truck", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", +} + + +class_names = [ + "car", + "truck", + "bus", + "bicycle", + "pedestrian", + "traffic_cone", + "barrier", +] +num_class = len(class_names) +metainfo = dict(classes=class_names) + +merge_objects = [ + ("truck", ["truck", "trailer"]), +] +merge_type = "extend_longer" # One of ["extend_longer","union", None] + +# visualization +class_colors = { + "car": (30, 144, 255), + "truck": (140, 0, 255), + "construction_vehicle": (255, 255, 0), + "bus": (111, 255, 111), + "trailer": (0, 255, 255), + "barrier": (0, 0, 0), + "motorcycle": (100, 0, 30), + "bicycle": (255, 0, 30), + "pedestrian": (255, 200, 200), + "traffic_cone": (120, 120, 120), +} +camera_panels = [ + "data/CAM_FRONT_LEFT", + "data/CAM_FRONT", + "data/CAM_FRONT_RIGHT", + "data/CAM_BACK_LEFT", + "data/CAM_BACK", + "data/CAM_BACK_RIGHT", +] + +filter_attributes = [ + ("vehicle.bicycle", "vehicle_state.parked"), + ("vehicle.bicycle", "cycle_state.without_rider"), + ("vehicle.bicycle", "motorcycle_state.without_rider"), + ("vehicle.motorcycle", "vehicle_state.parked"), + ("vehicle.motorcycle", "cycle_state.without_rider"), + ("vehicle.motorcycle", "motorcycle_state.without_rider"), + ("bicycle", "vehicle_state.parked"), + ("bicycle", "cycle_state.without_rider"), + ("bicycle", "motorcycle_state.without_rider"), + ("motorcycle", "vehicle_state.parked"), + ("motorcycle", "cycle_state.without_rider"), + ("motorcycle", "motorcycle_state.without_rider"), +] + +evaluator_metric_configs = dict( + evaluation_task="detection", + target_labels=class_names, + center_distance_bev_thresholds=[0.5, 1.0, 2.0, 4.0], + # plane_distance_thresholds is required for the pass fail evaluation + plane_distance_thresholds=[2.0, 4.0], + iou_2d_thresholds=None, + iou_3d_thresholds=None, + label_prefix="autoware", + # bev minimum distance ranges for each range bucket, must be the same length as max_distance, + # they will form bev distance ranges in [(min_distance[0], max_distance[0]), (min_distance[1], max_distance[1]), ...] when filtering + min_distance=[0.0, 50.0, 90.0, 0.0], + # bev maximum distance ranges for each range bucket, must be the same length as min_distance + max_distance=[50.0, 90.0, 121.0, 121.0], + min_point_numbers=0, + matching_class_agnostic_fps=False, +) + +remove_non_traffic_cone_barrier = True \ No newline at end of file diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py new file mode 100644 index 000000000..3643b4475 --- /dev/null +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py @@ -0,0 +1,202 @@ +custom_imports = dict( + imports=[ + "autoware_ml.detection3d.datasets.t4dataset", + "autoware_ml.detection3d.evaluation.t4metric.t4metric", + "autoware_ml.detection3d.evaluation.t4metric.t4metric_v2", + ] +) + +# dataset type setting +dataset_type = "T4Dataset" +info_train_file_name = "t4dataset_jpntaxi_base_traffic_cone_infos_train.pkl" +info_val_file_name = "t4dataset_jpntaxi_base_traffic_cone_infos_val.pkl" +info_test_file_name = "t4dataset_jpntaxi_base_traffic_cone_infos_test.pkl" + +info_train_statistics_file_name = "t4dataset_jpntaxi_base_traffic_cone_statistics_train.parquet" +info_val_statistics_file_name = "t4dataset_jpntaxi_base_traffic_cone_statistics_val.parquet" +info_test_statistics_file_name = "t4dataset_jpntaxi_base_traffic_cone_statistics_test.parquet" + +# dataset scene setting +dataset_test_groups = { + "jpntaxi_gen2": ("t4dataset_jpntaxi_gen2_traffic_cone_infos_test.pkl", True), +} + +dataset_version_list = [ + "db_jpntaxigen2_v1", + "db_jpntaxigen2_v2", + "db_jpntaxi_v1", + "db_jpntaxi_v2", + "db_jpntaxi_v4", +] + +# dataset format setting +data_prefix = dict( + pts="", + CAM_FRONT="", + CAM_FRONT_LEFT="", + CAM_FRONT_RIGHT="", + CAM_BACK="", + CAM_BACK_RIGHT="", + CAM_BACK_LEFT="", + sweeps="", +) +camera_types = { + "CAM_FRONT", + "CAM_FRONT_RIGHT", + "CAM_FRONT_LEFT", + "CAM_BACK", + "CAM_BACK_LEFT", + "CAM_BACK_RIGHT", +} + +# class setting +name_mapping = { + # DBv1.0 + "vehicle.car": "car", + "vehicle.construction": "truck", + "vehicle.emergency (ambulance & police)": "car", + "vehicle.motorcycle": "bicycle", + "vehicle.trailer": "trailer", + "vehicle.truck": "truck", + "vehicle.bicycle": "bicycle", + "vehicle.bus (bendy & rigid)": "bus", + "pedestrian.adult": "pedestrian", + "pedestrian.child": "pedestrian", + "pedestrian.construction_worker": "pedestrian", + "pedestrian.personal_mobility": "pedestrian", + "pedestrian.police_officer": "pedestrian", + "pedestrian.stroller": "pedestrian", + "pedestrian.wheelchair": "pedestrian", + "movable_object.barrier": "barrier", + "movable_object.debris": "barrier", + "movable_object.pushable_pullable": "barrier", + "movable_object.trafficcone": "traffic_cone", + "movable_object.traffic_cone": "traffic_cone", + "animal": "animal", + "static_object.bicycle_rack": "bicycle_rack", + # DBv1.1 and UCv2.0 + "car": "car", + "truck": "truck", + "bus": "bus", + "trailer": "trailer", + "motorcycle": "bicycle", + "bicycle": "bicycle", + "police_car": "car", + "pedestrian": "pedestrian", + "police_officer": "pedestrian", + "forklift": "car", + "construction_worker": "pedestrian", + "stroller": "pedestrian", + # DBv2.0 and DBv3.0 + "animal": "animal", + "movable_object.barrier": "barrier", + "movable_object.pushable_pullable": "barrier", + "movable_object.traffic_cone": "traffic_cone", + "pedestrian.adult": "pedestrian", + "pedestrian.child": "pedestrian", + "pedestrian.construction_worker": "pedestrian", + "pedestrian.personal_mobility": "pedestrian", + "pedestrian.police_officer": "pedestrian", + "pedestrian.stroller": "pedestrian", + "pedestrian.wheelchair": "pedestrian", + "static_object.bicycle rack": "bicycle rack", + "static_object.bollard": "bollard", + "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car + "vehicle.bicycle": "bicycle", + "vehicle.bus": "bus", + "vehicle.car": "car", + "vehicle.construction": "truck", + "vehicle.fire": "truck", + "vehicle.motorcycle": "bicycle", + "vehicle.police": "car", + "vehicle.trailer": "trailer", + "vehicle.truck": "truck", + # DBv1.3 + "ambulance": "car", + "kart": "car", + "wheelchair": "pedestrian", + "personal_mobility": "pedestrian", + "fire_truck": "truck", + "semi_trailer": "trailer", + "tractor_unit": "truck", + "construction_vehicle": "truck", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", +} + +class_names = [ + "car", + "truck", + "bus", + "bicycle", + "pedestrian", + "traffic_cone", + "barrier", +] + +num_class = len(class_names) +metainfo = dict(classes=class_names) + +merge_objects = [ + ("truck", ["truck", "trailer"]), +] +merge_type = "extend_longer" # One of ["extend_longer","union", None] + +# visualization +class_colors = { + "car": (30, 144, 255), + "truck": (140, 0, 255), + "construction_vehicle": (255, 255, 0), + "bus": (111, 255, 111), + "trailer": (0, 255, 255), + "barrier": (0, 0, 0), + "motorcycle": (100, 0, 30), + "bicycle": (255, 0, 30), + "pedestrian": (255, 200, 200), + "traffic_cone": (120, 120, 120), +} +camera_panels = [ + "data/CAM_FRONT_LEFT", + "data/CAM_FRONT", + "data/CAM_FRONT_RIGHT", + "data/CAM_BACK_LEFT", + "data/CAM_BACK", + "data/CAM_BACK_RIGHT", +] + +# Add filter attributes +filter_attributes = [ + ("vehicle.bicycle", "vehicle_state.parked"), + ("vehicle.bicycle", "cycle_state.without_rider"), + ("vehicle.bicycle", "motorcycle_state.without_rider"), + ("vehicle.motorcycle", "vehicle_state.parked"), + ("vehicle.motorcycle", "cycle_state.without_rider"), + ("vehicle.motorcycle", "motorcycle_state.without_rider"), + ("bicycle", "vehicle_state.parked"), + ("bicycle", "cycle_state.without_rider"), + ("bicycle", "motorcycle_state.without_rider"), + ("motorcycle", "vehicle_state.parked"), + ("motorcycle", "cycle_state.without_rider"), + ("motorcycle", "motorcycle_state.without_rider"), +] + +evaluator_metric_configs = dict( + evaluation_task="detection", + target_labels=class_names, + center_distance_bev_thresholds=[0.5, 1.0, 2.0, 4.0], + # plane_distance_thresholds is required for the pass fail evaluation + plane_distance_thresholds=[2.0, 4.0], + iou_2d_thresholds=None, + iou_3d_thresholds=None, + label_prefix="autoware", + # bev minimum distance ranges for each range bucket, must be the same length as max_distance, + # they will form bev distance ranges in [(min_distance[0], max_distance[0]), (min_distance[1], max_distance[1]), ...] when filtering + min_distance=[0.0, 50.0, 90.0, 0.0], + # bev maximum distance ranges for each range bucket, must be the same length as min_distance + max_distance=[50.0, 90.0, 121.0, 121.0], + min_point_numbers=0, + matching_class_agnostic_fps=False, +) + +remove_non_traffic_cone_barrier = True \ No newline at end of file From aac1e1d3fa8c342d628ccaf723fe7a2419cf0a8a Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 10:14:25 +0900 Subject: [PATCH 45/68] Update configs --- projects/BEVFusion/bevfusion/bevfusion_head.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index adbd64835..b0a42249a 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -692,7 +692,7 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): traffic_cone_barrier_status = metadata.get("traffic_cone_barrier_status", True) if self.partial_ignore_labels is not None and not traffic_cone_barrier_status: heatmap_weights[self.partial_ignore_labels] = 0.0 # Set to 0 to ignore these proposals - label_weights[:, self.partial_ignore_labels] = 0.0 # Set to 0 to ignore traffic_cone and barrier + label_weights[neg_inds, self.partial_ignore_labels] = 0.0 # Set to 0 to ignore traffic_cone and barrier return ( labels[None], From 09c06d79ee992ef0479876b374271b6276aa632c Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 10:17:53 +0900 Subject: [PATCH 46/68] Update configs --- projects/BEVFusion/bevfusion/bevfusion_head.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index b0a42249a..226237ff3 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -762,7 +762,7 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li preds_dense_heatmap, heatmap.float(), ) - loss_heatmap_cls_before_reduction = (loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap).clone().detach() + loss_heatmap_cls_before_reduction = (loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap).detach() for cls_i, class_name in enumerate(self.class_names): loss_dict[f"heatmap_{class_name}_before_reduction"] = loss_heatmap_cls_before_reduction[cls_i] From 5279b178195f4a8aa7290eb7cec905aeb354576c Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 12:18:52 +0900 Subject: [PATCH 47/68] Update configs --- projects/BEVFusion/bevfusion/bevfusion_head.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index 226237ff3..3f857e22d 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -692,7 +692,12 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): traffic_cone_barrier_status = metadata.get("traffic_cone_barrier_status", True) if self.partial_ignore_labels is not None and not traffic_cone_barrier_status: heatmap_weights[self.partial_ignore_labels] = 0.0 # Set to 0 to ignore these proposals - label_weights[neg_inds, self.partial_ignore_labels] = 0.0 # Set to 0 to ignore traffic_cone and barrier + if len(neg_inds) > 0: + # neg_inds [N] and column indices [K] must broadcast (not pair); see IndexError N vs K. + _cols = torch.as_tensor( + self.partial_ignore_labels, device=label_weights.device, dtype=torch.long + ) + label_weights[neg_inds.unsqueeze(1), _cols.unsqueeze(0)] = 0.0 return ( labels[None], From 9b4c2f292c10bc3561110541089c3c7bb0d0dcb9 Mon Sep 17 00:00:00 2001 From: KokSeang Date: Tue, 28 Apr 2026 12:48:58 +0900 Subject: [PATCH 48/68] Added --- .../detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py index 3643b4475..c7e631458 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py @@ -18,7 +18,7 @@ # dataset scene setting dataset_test_groups = { - "jpntaxi_gen2": ("t4dataset_jpntaxi_gen2_traffic_cone_infos_test.pkl", True), + "jpntaxi_base_traffic_cone": ("t4dataset_jpntaxi_base_traffic_cone_infos_test.pkl", True), } dataset_version_list = [ From 5c0ada87126561c3483253ebd0a684ece02b332c Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 12:49:32 +0900 Subject: [PATCH 49/68] Add the script --- .../BEVFusion/bevfusion/bevfusion_head.py | 71 ++++++++++++------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index 3f857e22d..a1819b309 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -753,34 +753,53 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li # compute heatmap loss preds_dense_heatmap = clip_sigmoid(preds_dict["dense_heatmap"].float()) num_pos_dense_heatmap = max(heatmap.eq(1).float().sum().item(), 1) - if self.partial_ignore_labels is None: - loss_heatmap = self.loss_heatmap( - preds_dense_heatmap, - heatmap.float(), - avg_factor=num_pos_dense_heatmap, - ) - loss_dict["loss_heatmap"] = loss_heatmap - else: - # When ignore labels is found, we compute the loss for each class - # heatmap focal loss - loss_heatmap_cls: torch.Tensor = self.loss_heatmap( - preds_dense_heatmap, - heatmap.float(), - ) - loss_heatmap_cls_before_reduction = (loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap).detach() - for cls_i, class_name in enumerate(self.class_names): - loss_dict[f"heatmap_{class_name}_before_reduction"] = loss_heatmap_cls_before_reduction[cls_i] - - # (Batch, num_classes, height, width) * (Batch, num_classes, height, width) - loss_heatmap_cls = loss_heatmap_cls * heatmap_weights.float() - loss_heatmap_cls = loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap - # (Batch, num_classes) - for cls_i, class_name in enumerate(self.class_names): - loss_dict[f"loss_heatmap_{class_name}"] = loss_heatmap_cls[cls_i] + # if self.partial_ignore_labels is None: + # loss_heatmap = self.loss_heatmap( + # preds_dense_heatmap, + # heatmap.float(), + # avg_factor=num_pos_dense_heatmap, + # ) + # loss_dict["loss_heatmap"] = loss_heatmap + # else: + # # When ignore labels is found, we compute the loss for each class + # # heatmap focal loss + # loss_heatmap_cls: torch.Tensor = self.loss_heatmap( + # preds_dense_heatmap, + # heatmap.float(), + # ) + # # loss_heatmap_cls_before_reduction = (loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap).detach() + # # for cls_i, class_name in enumerate(self.class_names): + # # loss_dict[f"heatmap_{class_name}_before_reduction"] = loss_heatmap_cls_before_reduction[cls_i] + + # # (Batch, num_classes, height, width) * (Batch, num_classes, height, width) + # loss_heatmap_cls = loss_heatmap_cls * heatmap_weights.float() + # loss_heatmap_cls = loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap + # # (Batch, num_classes) + # for cls_i, class_name in enumerate(self.class_names): + # loss_dict[f"loss_heatmap_{class_name}"] = loss_heatmap_cls[cls_i] - # Prevent loss item to avoid computing gradients twice. This is for logging. - loss_dict["total_dense_heatmap"] = loss_heatmap_cls.sum() + # # Prevent loss item to avoid computing gradients twice. This is for logging. + # loss_dict["total_dense_heatmap"] = loss_heatmap_cls.sum() + + # # When ignore labels is found, we compute the loss for each class + # # heatmap focal loss + loss_heatmap_cls: torch.Tensor = self.loss_heatmap( + preds_dense_heatmap, + heatmap.float(), + ) + # loss_heatmap_cls_before_reduction = (loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap).detach() + # for cls_i, class_name in enumerate(self.class_names): + # loss_dict[f"heatmap_{class_name}_before_reduction"] = loss_heatmap_cls_before_reduction[cls_i] + + # (Batch, num_classes, height, width) * (Batch, num_classes, height, width) + loss_heatmap_cls = loss_heatmap_cls * heatmap_weights.float() + loss_heatmap_cls = loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap + # (Batch, num_classes) + for cls_i, class_name in enumerate(self.class_names): + loss_dict[f"loss_heatmap_{class_name}"] = loss_heatmap_cls[cls_i] + # Prevent loss item to avoid computing gradients twice. This is for logging. + loss_dict["total_dense_heatmap"] = loss_heatmap_cls.sum() # compute loss for each layer for idx_layer in range(self.num_decoder_layers if self.auxiliary else 1): if idx_layer == self.num_decoder_layers - 1 or (idx_layer == 0 and self.auxiliary is False): From ad6b07a14afd1bd08a3178342856660fe364185a Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 12:49:46 +0900 Subject: [PATCH 50/68] Add the script --- ...pn_50e_8xb8_base_120m_traffic_cone_full.py | 163 ++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_full.py diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_full.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_full.py new file mode 100644 index 000000000..38b1e8ea5 --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_full.py @@ -0,0 +1,163 @@ +_base_ = [ + "../../../../../autoware_ml/configs/detection3d/default_runtime.py", + "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/base.py", + "../default/pipelines/default_lidar_120m.py", + "../default/models/default_lidar_second_secfpn_120m.py", + "../default/schedulers/default_50e_8xb8_adamw_cosine.py", + "../default/default_misc.py", +] + +custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) +custom_imports["imports"] += _base_.custom_imports["imports"] +custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] + +# user setting +data_root = "data/t4dataset/" +info_directory_path = "info/kokseang_2_8/" + +experiment_group_name = "bevfusion_lidar_traffic_cone_full/base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" +work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name + +# model parameter +model = dict( + type="BEVFusion", + voxelize_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + voxel_size=_base_.voxel_size, + voxelize_reduce=True, + ), + pts_voxel_encoder=dict(num_features=_base_.point_use_dim), + pts_middle_encoder=dict( + in_channels=_base_.point_use_dim, + sparse_shape=_base_.grid_size, + num_aug_features=4, + # min-max normalization for x, y, z, time_lag, where the max of time lag technically is two seeps (200 ms) here + aug_features_min_values=[ + _base_.point_cloud_range[0], + _base_.point_cloud_range[1], + _base_.point_cloud_range[2], + 0.0, + ], + aug_features_max_values=[ + _base_.point_cloud_range[3], + _base_.point_cloud_range[4], + _base_.point_cloud_range[5], + 0.2, + ], + ), + bbox_head=dict( + class_names=_base_.class_names, # Use class names to identify the correct class indices + train_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size, + ), + test_cfg=dict( + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size[0:2], + pc_range=_base_.point_cloud_range[0:2], + ), + bbox_coder=dict( + pc_range=_base_.point_cloud_range[0:2], + voxel_size=_base_.voxel_size[0:2], + ), + partial_ignore_labels=None, + loss_heatmap=dict( + reduction="none", + ), + ), +) + +# Dataset parameters +train_dataloader = dict( + batch_size=_base_.train_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=True), + dataset=dict( + type=_base_.dataset_type, + pipeline=_base_.train_pipeline, + modality=_base_.input_modality, + backend_args=_base_.backend_args, + data_root=data_root, + ann_file=info_directory_path + _base_.info_train_file_name, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + test_mode=False, + data_prefix=_base_.data_prefix, + box_type_3d="LiDAR", + filter_cfg=_base_.filter_cfg, + ), +) + +val_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_val_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +test_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_test_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +val_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_val_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, +) + +test_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_test_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, + save_csv=True, +) + +default_hooks = dict( + logger=dict(type="LoggerHook", interval=50), + checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), +) +log_processor = dict(window_size=50) From a592868d6add0b0e589a1e7dd2ee47d55848be13 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 16:28:38 +0900 Subject: [PATCH 51/68] Add the script --- .../BEVFusion/bevfusion/bevfusion_head.py | 70 +++----- ...8xb8_j6gen2_base_120m_traffic_cone_full.py | 164 ++++++++++++++++++ 2 files changed, 188 insertions(+), 46 deletions(-) create mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index a1819b309..0b18803c4 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -753,53 +753,31 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li # compute heatmap loss preds_dense_heatmap = clip_sigmoid(preds_dict["dense_heatmap"].float()) num_pos_dense_heatmap = max(heatmap.eq(1).float().sum().item(), 1) - # if self.partial_ignore_labels is None: - # loss_heatmap = self.loss_heatmap( - # preds_dense_heatmap, - # heatmap.float(), - # avg_factor=num_pos_dense_heatmap, - # ) - # loss_dict["loss_heatmap"] = loss_heatmap - # else: - # # When ignore labels is found, we compute the loss for each class - # # heatmap focal loss - # loss_heatmap_cls: torch.Tensor = self.loss_heatmap( - # preds_dense_heatmap, - # heatmap.float(), - # ) - # # loss_heatmap_cls_before_reduction = (loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap).detach() - # # for cls_i, class_name in enumerate(self.class_names): - # # loss_dict[f"heatmap_{class_name}_before_reduction"] = loss_heatmap_cls_before_reduction[cls_i] - - # # (Batch, num_classes, height, width) * (Batch, num_classes, height, width) - # loss_heatmap_cls = loss_heatmap_cls * heatmap_weights.float() - # loss_heatmap_cls = loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap - # # (Batch, num_classes) - # for cls_i, class_name in enumerate(self.class_names): - # loss_dict[f"loss_heatmap_{class_name}"] = loss_heatmap_cls[cls_i] + if self.partial_ignore_labels is None: + loss_heatmap = self.loss_heatmap( + preds_dense_heatmap, + heatmap.float(), + avg_factor=num_pos_dense_heatmap, + ) + loss_dict["loss_heatmap"] = loss_heatmap + else: + # When ignore labels is found, we compute the loss for each class + # heatmap focal loss + loss_heatmap_cls: torch.Tensor = self.loss_heatmap( + preds_dense_heatmap, + heatmap.float(), + ) + + # (Batch, num_classes, height, width) * (Batch, num_classes, height, width) + loss_heatmap_cls = loss_heatmap_cls * heatmap_weights.float() + loss_heatmap_cls = loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap + # (Batch, num_classes) + for cls_i, class_name in enumerate(self.class_names): + loss_dict[f"loss_heatmap_{class_name}"] = loss_heatmap_cls[cls_i] - # # Prevent loss item to avoid computing gradients twice. This is for logging. - # loss_dict["total_dense_heatmap"] = loss_heatmap_cls.sum() - - # # When ignore labels is found, we compute the loss for each class - # # heatmap focal loss - loss_heatmap_cls: torch.Tensor = self.loss_heatmap( - preds_dense_heatmap, - heatmap.float(), - ) - # loss_heatmap_cls_before_reduction = (loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap).detach() - # for cls_i, class_name in enumerate(self.class_names): - # loss_dict[f"heatmap_{class_name}_before_reduction"] = loss_heatmap_cls_before_reduction[cls_i] - - # (Batch, num_classes, height, width) * (Batch, num_classes, height, width) - loss_heatmap_cls = loss_heatmap_cls * heatmap_weights.float() - loss_heatmap_cls = loss_heatmap_cls.sum((0, 2, 3)) / num_pos_dense_heatmap - # (Batch, num_classes) - for cls_i, class_name in enumerate(self.class_names): - loss_dict[f"loss_heatmap_{class_name}"] = loss_heatmap_cls[cls_i] - - # Prevent loss item to avoid computing gradients twice. This is for logging. - loss_dict["total_dense_heatmap"] = loss_heatmap_cls.sum() + # Prevent loss item to avoid computing gradients twice. This is for logging. + loss_dict["total_dense_heatmap"] = loss_heatmap_cls.sum() + # compute loss for each layer for idx_layer in range(self.num_decoder_layers if self.auxiliary else 1): if idx_layer == self.num_decoder_layers - 1 or (idx_layer == 0 and self.auxiliary is False): diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py new file mode 100644 index 000000000..1ca622714 --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py @@ -0,0 +1,164 @@ +_base_ = [ + "../../../../../autoware_ml/configs/detection3d/default_runtime.py", + "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", + "../default/pipelines/default_lidar_intensity_120m.py", + "../default/models/default_lidar_second_secfpn_120m.py", + "../default/schedulers/default_30e_8xb8_adamw_cosine.py", + "../default/default_misc.py", +] + +custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) +custom_imports["imports"] += _base_.custom_imports["imports"] +custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] + +# user setting +data_root = "data/t4dataset/" +info_directory_path = "info/user_name/" + +experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full" +work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name + +# model parameter +model = dict( + type="BEVFusion", + voxelize_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + voxel_size=_base_.voxel_size, + voxelize_reduce=True, + ), + pts_voxel_encoder=dict(num_features=_base_.point_use_dim), + pts_middle_encoder=dict( + in_channels=_base_.point_use_dim, + sparse_shape=_base_.grid_size, + num_aug_features=5, + # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here + aug_features_min_values=[ + _base_.point_cloud_range[0], + _base_.point_cloud_range[1], + _base_.point_cloud_range[2], + 0.0, + 0.0, + ], + aug_features_max_values=[ + _base_.point_cloud_range[3], + _base_.point_cloud_range[4], + _base_.point_cloud_range[5], + 255.0, + 0.2, + ], + ), + bbox_head=dict( + class_names=_base_.class_names, # Use class names to identify the correct class indices + train_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size, + ), + test_cfg=dict( + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size[0:2], + pc_range=_base_.point_cloud_range[0:2], + ), + bbox_coder=dict( + pc_range=_base_.point_cloud_range[0:2], + voxel_size=_base_.voxel_size[0:2], + ), + ), + partial_ignore_labels=None, +) + +# Dataset parameters +train_dataloader = dict( + batch_size=_base_.train_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=True), + dataset=dict( + type=_base_.dataset_type, + pipeline=_base_.train_pipeline, + modality=_base_.input_modality, + backend_args=_base_.backend_args, + data_root=data_root, + ann_file=info_directory_path + _base_.info_train_file_name, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + test_mode=False, + data_prefix=_base_.data_prefix, + box_type_3d="LiDAR", + filter_cfg=_base_.filter_cfg, + ), +) + +val_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_val_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +test_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_test_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +val_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_val_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, +) + +test_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_test_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, + save_csv=True, +) + +default_hooks = dict( + logger=dict(type="LoggerHook", interval=50), + checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), +) +log_processor = dict(window_size=50) + +load_from = None From 2929ff67b324627b3adbbe50da221e235f004ec5 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 20:35:00 +0900 Subject: [PATCH 52/68] Update configs --- ...cond_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py | 4 ++-- .../default/pipelines/default_lidar_intensity_120m.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py index 1ca622714..57afc7e75 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" +info_directory_path = "info/kokseang_2_8/" experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full" @@ -161,4 +161,4 @@ ) log_processor = dict(window_size=50) -load_from = None +load_from = "work_dirs/bevfusion_lidar_2.7.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_48.pth" diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py index a9032fcdc..19051a04f 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py @@ -13,6 +13,8 @@ "bus": 120, "bicycle": 120, "pedestrian": 120, + "traffic_cone": 120, + "barrier": 120, } # LiDAR parameters From 57d6ae6771fac9787e9ac4deeb3f6edca50e5bc3 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Tue, 28 Apr 2026 21:18:15 +0900 Subject: [PATCH 53/68] Update configs --- .../datasets/transforms/loading.py | 41 +++++ ...b8_j6gen2_base_120m_traffic_cone_ignore.py | 167 ++++++++++++++++++ .../default_30e_8xb8_adamw_cosine.py | 2 +- 3 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 autoware_ml/detection3d/datasets/transforms/loading.py create mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py diff --git a/autoware_ml/detection3d/datasets/transforms/loading.py b/autoware_ml/detection3d/datasets/transforms/loading.py new file mode 100644 index 000000000..3e23218e4 --- /dev/null +++ b/autoware_ml/detection3d/datasets/transforms/loading.py @@ -0,0 +1,41 @@ +from mmcv.transforms import BaseTransform +from mmdet3d.structures.ops import box_np_ops +from mmengine.registry import TRANSFORMS + + +@TRANSFORMS.register_module() +class LoadPointsFromCurrentFileSweep(BaseTransform): + """Load points from the current file and sweep. + This is used to load the points from the current file and sweep for copy-paste augmentation. + + Args: + coord_type (str): The type of coordinates of points cloud. + load_dim (int): The dimension of the loaded points. + use_dim (list[int] | int): Which dimensions of the points to use. + backend_args (dict, optional): Arguments to instantiate the + corresponding backend. Defaults to None. + """ + + def __init__(self, + coord_type: str, + load_dim: int = 6, + use_dim: Union[int, List[int]] = [0, 1, 2], + shift_height: bool = False, + use_color: bool = False, + norm_intensity: bool = False, + norm_elongation: bool = False, + backend_args: Optional[dict] = None) -> None: + self.shift_height = shift_height + self.use_color = use_color + if isinstance(use_dim, int): + use_dim = list(range(use_dim)) + assert max(use_dim) < load_dim, \ + f'Expect all used dimensions < {load_dim}, got {use_dim}' + assert coord_type in ['CAMERA', 'LIDAR', 'DEPTH'] + + self.coord_type = coord_type + self.load_dim = load_dim + self.use_dim = use_dim + self.norm_intensity = norm_intensity + self.norm_elongation = norm_elongation + self.backend_args = backend_args \ No newline at end of file diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py new file mode 100644 index 000000000..80bd595dd --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py @@ -0,0 +1,167 @@ +_base_ = [ + "../../../../../autoware_ml/configs/detection3d/default_runtime.py", + "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", + "../default/pipelines/default_lidar_intensity_120m.py", + "../default/models/default_lidar_second_secfpn_120m.py", + "../default/schedulers/default_30e_8xb8_adamw_cosine.py", + "../default/default_misc.py", +] + +custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) +custom_imports["imports"] += _base_.custom_imports["imports"] +custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] + +# user setting +data_root = "data/t4dataset/" +info_directory_path = "info/kokseang_2_8/" + +experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full" +work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name + +# model parameter +model = dict( + type="BEVFusion", + voxelize_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + voxel_size=_base_.voxel_size, + voxelize_reduce=True, + ), + pts_voxel_encoder=dict(num_features=_base_.point_use_dim), + pts_middle_encoder=dict( + in_channels=_base_.point_use_dim, + sparse_shape=_base_.grid_size, + num_aug_features=5, + # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here + aug_features_min_values=[ + _base_.point_cloud_range[0], + _base_.point_cloud_range[1], + _base_.point_cloud_range[2], + 0.0, + 0.0, + ], + aug_features_max_values=[ + _base_.point_cloud_range[3], + _base_.point_cloud_range[4], + _base_.point_cloud_range[5], + 255.0, + 0.2, + ], + ), + bbox_head=dict( + class_names=_base_.class_names, # Use class names to identify the correct class indices + train_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size, + ), + test_cfg=dict( + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size[0:2], + pc_range=_base_.point_cloud_range[0:2], + ), + bbox_coder=dict( + pc_range=_base_.point_cloud_range[0:2], + voxel_size=_base_.voxel_size[0:2], + ), + ), + partial_ignore_labels=["traffic_cone", "barrier"], + loss_heatmap=dict( + reduction="none", + ), +) + +# Dataset parameters +train_dataloader = dict( + batch_size=_base_.train_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=True), + dataset=dict( + type=_base_.dataset_type, + pipeline=_base_.train_pipeline, + modality=_base_.input_modality, + backend_args=_base_.backend_args, + data_root=data_root, + ann_file=info_directory_path + _base_.info_train_file_name, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + test_mode=False, + data_prefix=_base_.data_prefix, + box_type_3d="LiDAR", + filter_cfg=_base_.filter_cfg, + ), +) + +val_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_val_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +test_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_test_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +val_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_val_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, +) + +test_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_test_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, + save_csv=True, +) + +default_hooks = dict( + logger=dict(type="LoggerHook", interval=50), + checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), +) +log_processor = dict(window_size=50) + +load_from = "work_dirs/bevfusion_lidar_2.7.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_48.pth" diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py index a2cd2d2e9..388705848 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py @@ -3,7 +3,7 @@ lr = 1.4141e-4 t_max = 8 max_epochs = 30 -val_interval = 5 +val_interval = 1 train_gpu_size = 8 test_batch_size = 2 From 2e03655ea03b7b9147c49e30d591ae33df1ee08a Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Wed, 29 Apr 2026 01:31:43 +0900 Subject: [PATCH 54/68] Add the script --- .../datasets/transforms/__init__.py | 3 +- .../datasets/transforms/loading.py | 53 +-- ..._base_120m_traffic_cone_full_copy_paste.py | 312 ++++++++++++++++++ ...b8_j6gen2_base_120m_traffic_cone_ignore.py | 10 +- .../default/pipelines/default_lidar_120m.py | 2 + .../pipelines/default_lidar_intensity_120m.py | 2 + ...default_lidar_intensity_120m_copy_paste.py | 180 ++++++++++ 7 files changed, 532 insertions(+), 30 deletions(-) create mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py create mode 100644 projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m_copy_paste.py diff --git a/autoware_ml/detection3d/datasets/transforms/__init__.py b/autoware_ml/detection3d/datasets/transforms/__init__.py index 6bc932f1a..dc95d27f8 100644 --- a/autoware_ml/detection3d/datasets/transforms/__init__.py +++ b/autoware_ml/detection3d/datasets/transforms/__init__.py @@ -1,3 +1,4 @@ from .object_min_points_filter import ObjectMinPointsFilter +from .loading import LoadPointsFromCurrentFileSweep -__all__ = ["ObjectMinPointsFilter"] +__all__ = ["ObjectMinPointsFilter", "LoadPointsFromCurrentFileSweep"] diff --git a/autoware_ml/detection3d/datasets/transforms/loading.py b/autoware_ml/detection3d/datasets/transforms/loading.py index 3e23218e4..d96a87b5a 100644 --- a/autoware_ml/detection3d/datasets/transforms/loading.py +++ b/autoware_ml/detection3d/datasets/transforms/loading.py @@ -1,22 +1,24 @@ from mmcv.transforms import BaseTransform from mmdet3d.structures.ops import box_np_ops +from mmdet3d.datasets.transforms import LoadPointsFromFile, LoadPointsFromMultiSweeps from mmengine.registry import TRANSFORMS + @TRANSFORMS.register_module() class LoadPointsFromCurrentFileSweep(BaseTransform): - """Load points from the current file and sweep. - This is used to load the points from the current file and sweep for copy-paste augmentation. + """Load points from the current file and sweep. + This is used to load the points from the current file and sweep for copy-paste augmentation. - Args: - coord_type (str): The type of coordinates of points cloud. - load_dim (int): The dimension of the loaded points. - use_dim (list[int] | int): Which dimensions of the points to use. - backend_args (dict, optional): Arguments to instantiate the - corresponding backend. Defaults to None. - """ + Args: + coord_type (str): The type of coordinates of points cloud. + load_dim (int): The dimension of the loaded points. + use_dim (list[int] | int): Which dimensions of the points to use. + backend_args (dict, optional): Arguments to instantiate the + corresponding backend. Defaults to None. + """ - def __init__(self, + def __init__(self, coord_type: str, load_dim: int = 6, use_dim: Union[int, List[int]] = [0, 1, 2], @@ -24,18 +26,21 @@ def __init__(self, use_color: bool = False, norm_intensity: bool = False, norm_elongation: bool = False, - backend_args: Optional[dict] = None) -> None: - self.shift_height = shift_height - self.use_color = use_color - if isinstance(use_dim, int): - use_dim = list(range(use_dim)) - assert max(use_dim) < load_dim, \ - f'Expect all used dimensions < {load_dim}, got {use_dim}' - assert coord_type in ['CAMERA', 'LIDAR', 'DEPTH'] + backend_args: Optional[dict] = None, + sweeps_num: int = 10, + pad_empty_sweeps: bool = False, + remove_close: bool = False, + test_mode: bool = False + ) -> None: + + self.points_loader = LoadPointsFromFile(coord_type=coord_type, load_dim=load_dim, use_dim=use_dim, backend_args=backend_args) + if sweeps_num > 0: + self.points_from_multi_sweeps_loader = LoadPointsFromMultiSweeps(sweeps_num=sweeps_num, pad_empty_sweeps=pad_empty_sweeps, remove_close=remove_close, test_mode=test_mode) + else: + self.points_from_multi_sweeps_loader = None - self.coord_type = coord_type - self.load_dim = load_dim - self.use_dim = use_dim - self.norm_intensity = norm_intensity - self.norm_elongation = norm_elongation - self.backend_args = backend_args \ No newline at end of file + def transform(self, results: dict) -> dict: + points = self.points_loader(results) + if self.points_from_multi_sweeps_loader is not None: + points = self.points_from_multi_sweeps_loader(points) + return points diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py new file mode 100644 index 000000000..6c7fb78a8 --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py @@ -0,0 +1,312 @@ +_base_ = [ + "../../../../../autoware_ml/configs/detection3d/default_runtime.py", + "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", + "../default/pipelines/default_lidar_intensity_120m.py", + "../default/models/default_lidar_second_secfpn_120m.py", + "../default/schedulers/default_30e_8xb8_adamw_cosine.py", + "../default/default_misc.py", +] + +custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) +custom_imports["imports"] += _base_.custom_imports["imports"] +custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] + +# user setting +data_root = "data/t4dataset/" +info_directory_path = "info/kokseang_2_8/" + +experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste" +work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name + +# model parameter +model = dict( + type="BEVFusion", + voxelize_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + voxel_size=_base_.voxel_size, + voxelize_reduce=True, + ), + pts_voxel_encoder=dict(num_features=_base_.point_use_dim), + pts_middle_encoder=dict( + in_channels=_base_.point_use_dim, + sparse_shape=_base_.grid_size, + num_aug_features=5, + # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here + aug_features_min_values=[ + _base_.point_cloud_range[0], + _base_.point_cloud_range[1], + _base_.point_cloud_range[2], + 0.0, + 0.0, + ], + aug_features_max_values=[ + _base_.point_cloud_range[3], + _base_.point_cloud_range[4], + _base_.point_cloud_range[5], + 255.0, + 0.2, + ], + ), + bbox_head=dict( + class_names=_base_.class_names, # Use class names to identify the correct class indices + train_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size, + ), + test_cfg=dict( + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size[0:2], + pc_range=_base_.point_cloud_range[0:2], + ), + bbox_coder=dict( + pc_range=_base_.point_cloud_range[0:2], + voxel_size=_base_.voxel_size[0:2], + ) + ), +) + +db_sampler = dict( + data_root=data_root, + info_path=info_directory_path + _base_.info_train_file_name, + rate=1.0, + prepare=dict( + filter_by_difficulty=[-1], + filter_by_min_points=dict( + car=5, + truck=5, + bus=5, + trailer=5, + traffic_cone=5, + barrier=5, + bicycle=5, + pedestrian=5)), + classes=_base_.class_names, + sample_groups=dict( + car=0, + truck=0, + bus=0, + barrier=2, + traffic_cone=4), + points_loader=dict( + type='LoadPointsFromCurrentFileSweep', + coord_type='LIDAR', + load_dim=_base_.point_load_dim, + use_dim=_base_.point_use_dim, + backend_args=_base_.backend_args, + sweeps_num=_base_.sweeps_num, + pad_empty_sweeps=True, + remove_close=True, + test_mode=False, + )) + +train_pipeline = [ + dict( + type="LoadPointsFromFile", + coord_type="LIDAR", + load_dim=_base_.point_load_dim, + use_dim=_base_.point_use_dim, + backend_args=_base_.backend_args, + ), + dict( + type="LoadPointsFromMultiSweeps", + sweeps_num=_base_.sweeps_num, + load_dim=_base_.point_load_dim, + use_dim=_base_.point_use_dim, + pad_empty_sweeps=True, + remove_close=True, + backend_args=_base_.backend_args, + test_mode=False, + ), + dict(type="LoadAnnotations3D", with_bbox_3d=True, with_label_3d=True, with_attr_label=False), + dict(type="ObjectSample", db_sampler=db_sampler), + dict( + type="BEVFusionGlobalRotScaleTrans", + scale_ratio_range=[0.95, 1.05], + rot_range=[-0.78539816, 0.78539816], + translation_std=[0.5, 0.5, 0.2], + ), + dict(type="BEVFusionRandomFlip3D"), + dict(type="PointsRangeFilter", point_cloud_range=_base_.point_cloud_range), + dict(type="ObjectRangeFilter", point_cloud_range=_base_.point_cloud_range), + dict( + type="ObjectNameFilter", + classes=[ + "car", + "truck", + "bus", + "bicycle", + "pedestrian", + ], + ), + dict(type="PointShuffle"), + dict( + type="Pack3DDetInputs", + keys=["points", "img", "gt_bboxes_3d", "gt_labels_3d", "gt_bboxes", "gt_labels"], + meta_keys=[ + "cam2img", + "ori_cam2img", + "lidar2cam", + "lidar2img", + "cam2lidar", + "ori_lidar2img", + "img_aug_matrix", + "box_type_3d", + "sample_idx", + "lidar_path", + "img_path", + "transformation_3d_flow", + "pcd_rotation", + "pcd_scale_factor", + "pcd_trans", + "img_aug_matrix", + "lidar_aug_matrix", + "timestamp", + "vehicle_type", + "city", + "traffic_cone_barrier_status", + ], + ), +] + +test_pipeline = [ + dict( + type="LoadPointsFromFile", + coord_type="LIDAR", + load_dim=point_load_dim, + use_dim=point_load_dim, + backend_args=backend_args, + ), + dict( + type="LoadPointsFromMultiSweeps", + sweeps_num=sweeps_num, + load_dim=point_load_dim, + use_dim=lidar_sweep_dims, + pad_empty_sweeps=True, + remove_close=True, + backend_args=backend_args, + test_mode=True, + ), + dict(type="PointsRangeFilter", point_cloud_range=point_cloud_range), + dict( + type="Pack3DDetInputs", + keys=["img", "points", "gt_bboxes_3d", "gt_labels_3d"], + meta_keys=[ + "cam2img", + "ori_cam2img", + "lidar2cam", + "lidar2img", + "cam2lidar", + "ori_lidar2img", + "img_aug_matrix", + "box_type_3d", + "sample_idx", + "lidar_path", + "img_path", + "num_pts_feats", + "num_views", + "timestamp", + "vehicle_type", + "city", + "traffic_cone_barrier_status", + ], + ), +] + +# Dataset parameters +train_dataloader = dict( + batch_size=_base_.train_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=True), + dataset=dict( + type=_base_.dataset_type, + pipeline=_base_.train_pipeline, + modality=_base_.input_modality, + backend_args=_base_.backend_args, + data_root=data_root, + ann_file=info_directory_path + _base_.info_train_file_name, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + test_mode=False, + data_prefix=_base_.data_prefix, + box_type_3d="LiDAR", + filter_cfg=_base_.filter_cfg, + ), +) + +val_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_val_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +test_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_test_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +val_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_val_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, +) + +test_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_test_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, + save_csv=True, +) + +default_hooks = dict( + logger=dict(type="LoggerHook", interval=50), + checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), +) +log_processor = dict(window_size=50) + +load_from = "work_dirs/bevfusion_lidar_2.7.0/base/epoch_48.pth" + +custom_hooks = [] diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py index 80bd595dd..68c736749 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py @@ -16,7 +16,7 @@ info_directory_path = "info/kokseang_2_8/" experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full" +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter @@ -64,11 +64,11 @@ pc_range=_base_.point_cloud_range[0:2], voxel_size=_base_.voxel_size[0:2], ), - ), - partial_ignore_labels=["traffic_cone", "barrier"], - loss_heatmap=dict( + partial_ignore_labels=["traffic_cone", "barrier"], + loss_heatmap=dict( reduction="none", ), + ), ) # Dataset parameters @@ -164,4 +164,4 @@ ) log_processor = dict(window_size=50) -load_from = "work_dirs/bevfusion_lidar_2.7.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_48.pth" +load_from = "work_dirs/bevfusion_lidar_2.7.0/base/epoch_48.pth" diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py index 455c2761a..09b9f7b26 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_120m.py @@ -59,6 +59,8 @@ "bus", "bicycle", "pedestrian", + "traffic_cone", + "barrier", ], ), dict(type="PointShuffle"), diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py index 19051a04f..9c7e02977 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py @@ -59,6 +59,8 @@ "bus", "bicycle", "pedestrian", + "traffic_cone", + "barrier", ], ), dict(type="PointShuffle"), diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m_copy_paste.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m_copy_paste.py new file mode 100644 index 000000000..a7c7cddfe --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m_copy_paste.py @@ -0,0 +1,180 @@ +# Dataset parameters +backend_args = None +num_workers = 32 +input_modality = dict(use_lidar=True, use_camera=False) + +# range setting +point_cloud_range = [-122.4, -122.4, -3.0, 122.4, 122.4, 5.0] +voxel_size = [0.17, 0.17, 0.2] +grid_size = [1440, 1440, 41] +eval_class_range = { + "car": 120, + "truck": 120, + "bus": 120, + "bicycle": 120, + "pedestrian": 120, + "traffic_cone": 120, + "barrier": 120, +} + +# LiDAR parameters +point_load_dim = 5 # x, y, z, intensity, ring_id +point_use_dim = 5 +lidar_sweep_dims = [0, 1, 2, 3, 4] # x, y, z, intensity, time_lag +sweeps_num = 1 + +db_sampler = dict( + data_root=data_root, + info_path=data_root + 'nuscenes_dbinfos_train.pkl', + rate=1.0, + prepare=dict( + filter_by_difficulty=[-1], + filter_by_min_points=dict( + car=5, + truck=5, + bus=5, + trailer=5, + construction_vehicle=5, + traffic_cone=5, + barrier=5, + motorcycle=5, + bicycle=5, + pedestrian=5)), + classes=class_names, + sample_groups=dict( + car=2, + truck=3, + construction_vehicle=7, + bus=4, + trailer=6, + barrier=2, + motorcycle=6, + bicycle=6, + pedestrian=2, + traffic_cone=2), + points_loader=dict( + type='LoadPointsFromFile', + coord_type='LIDAR', + load_dim=5, + use_dim=[0, 1, 2, 3, 4], + backend_args=backend_args)) + +train_pipeline = [ + dict( + type="LoadPointsFromFile", + coord_type="LIDAR", + load_dim=point_load_dim, + use_dim=point_load_dim, + backend_args=backend_args, + ), + dict( + type="LoadPointsFromMultiSweeps", + sweeps_num=sweeps_num, + load_dim=point_load_dim, + use_dim=lidar_sweep_dims, + pad_empty_sweeps=True, + remove_close=True, + backend_args=backend_args, + test_mode=False, + ), + dict(type="LoadAnnotations3D", with_bbox_3d=True, with_label_3d=True, with_attr_label=False), + dict( + type="BEVFusionGlobalRotScaleTrans", + scale_ratio_range=[0.95, 1.05], + rot_range=[-0.78539816, 0.78539816], + translation_std=[0.5, 0.5, 0.2], + ), + dict(type="BEVFusionRandomFlip3D"), + dict(type="PointsRangeFilter", point_cloud_range=point_cloud_range), + dict(type="ObjectRangeFilter", point_cloud_range=point_cloud_range), + dict( + type="ObjectNameFilter", + classes=[ + "car", + "truck", + "bus", + "bicycle", + "pedestrian", + ], + ), + dict(type="PointShuffle"), + dict( + type="Pack3DDetInputs", + keys=["points", "img", "gt_bboxes_3d", "gt_labels_3d", "gt_bboxes", "gt_labels"], + meta_keys=[ + "cam2img", + "ori_cam2img", + "lidar2cam", + "lidar2img", + "cam2lidar", + "ori_lidar2img", + "img_aug_matrix", + "box_type_3d", + "sample_idx", + "lidar_path", + "img_path", + "transformation_3d_flow", + "pcd_rotation", + "pcd_scale_factor", + "pcd_trans", + "img_aug_matrix", + "lidar_aug_matrix", + "timestamp", + "vehicle_type", + "city", + "traffic_cone_barrier_status", + ], + ), +] + +test_pipeline = [ + dict( + type="LoadPointsFromFile", + coord_type="LIDAR", + load_dim=point_load_dim, + use_dim=point_load_dim, + backend_args=backend_args, + ), + dict( + type="LoadPointsFromMultiSweeps", + sweeps_num=sweeps_num, + load_dim=point_load_dim, + use_dim=lidar_sweep_dims, + pad_empty_sweeps=True, + remove_close=True, + backend_args=backend_args, + test_mode=True, + ), + dict(type="PointsRangeFilter", point_cloud_range=point_cloud_range), + dict( + type="Pack3DDetInputs", + keys=["img", "points", "gt_bboxes_3d", "gt_labels_3d"], + meta_keys=[ + "cam2img", + "ori_cam2img", + "lidar2cam", + "lidar2img", + "cam2lidar", + "ori_lidar2img", + "img_aug_matrix", + "box_type_3d", + "sample_idx", + "lidar_path", + "img_path", + "num_pts_feats", + "num_views", + "timestamp", + "vehicle_type", + "city", + "traffic_cone_barrier_status", + ], + ), +] + +# Filtering configuration +# Note: +# - In camera–LiDAR configs, `filter_cfg` can enable image-based frame filtering, +# e.g., dict(filter_frames_with_missing_image=True). +# - This is a LiDAR-only config (`input_modality['use_camera'] = False`), so +# image-based filtering does not apply and `filter_cfg` is intentionally None. +filter_cfg = None From e2a69c1851b6149f256e32f48803b968756f018d Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Wed, 29 Apr 2026 01:35:46 +0900 Subject: [PATCH 55/68] Add the script --- .../datasets/transforms/loading.py | 2 + ..._base_120m_traffic_cone_full_copy_paste.py | 2 + ...default_lidar_intensity_120m_copy_paste.py | 180 ------------------ 3 files changed, 4 insertions(+), 180 deletions(-) delete mode 100644 projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m_copy_paste.py diff --git a/autoware_ml/detection3d/datasets/transforms/loading.py b/autoware_ml/detection3d/datasets/transforms/loading.py index d96a87b5a..535653d9b 100644 --- a/autoware_ml/detection3d/datasets/transforms/loading.py +++ b/autoware_ml/detection3d/datasets/transforms/loading.py @@ -1,3 +1,5 @@ +from typing import List, Optional, Union + from mmcv.transforms import BaseTransform from mmdet3d.structures.ops import box_np_ops from mmdet3d.datasets.transforms import LoadPointsFromFile, LoadPointsFromMultiSweeps diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py index 6c7fb78a8..6e0d7445b 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py @@ -138,6 +138,8 @@ "bus", "bicycle", "pedestrian", + "traffic_cone", + "barrier", ], ), dict(type="PointShuffle"), diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m_copy_paste.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m_copy_paste.py deleted file mode 100644 index a7c7cddfe..000000000 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m_copy_paste.py +++ /dev/null @@ -1,180 +0,0 @@ -# Dataset parameters -backend_args = None -num_workers = 32 -input_modality = dict(use_lidar=True, use_camera=False) - -# range setting -point_cloud_range = [-122.4, -122.4, -3.0, 122.4, 122.4, 5.0] -voxel_size = [0.17, 0.17, 0.2] -grid_size = [1440, 1440, 41] -eval_class_range = { - "car": 120, - "truck": 120, - "bus": 120, - "bicycle": 120, - "pedestrian": 120, - "traffic_cone": 120, - "barrier": 120, -} - -# LiDAR parameters -point_load_dim = 5 # x, y, z, intensity, ring_id -point_use_dim = 5 -lidar_sweep_dims = [0, 1, 2, 3, 4] # x, y, z, intensity, time_lag -sweeps_num = 1 - -db_sampler = dict( - data_root=data_root, - info_path=data_root + 'nuscenes_dbinfos_train.pkl', - rate=1.0, - prepare=dict( - filter_by_difficulty=[-1], - filter_by_min_points=dict( - car=5, - truck=5, - bus=5, - trailer=5, - construction_vehicle=5, - traffic_cone=5, - barrier=5, - motorcycle=5, - bicycle=5, - pedestrian=5)), - classes=class_names, - sample_groups=dict( - car=2, - truck=3, - construction_vehicle=7, - bus=4, - trailer=6, - barrier=2, - motorcycle=6, - bicycle=6, - pedestrian=2, - traffic_cone=2), - points_loader=dict( - type='LoadPointsFromFile', - coord_type='LIDAR', - load_dim=5, - use_dim=[0, 1, 2, 3, 4], - backend_args=backend_args)) - -train_pipeline = [ - dict( - type="LoadPointsFromFile", - coord_type="LIDAR", - load_dim=point_load_dim, - use_dim=point_load_dim, - backend_args=backend_args, - ), - dict( - type="LoadPointsFromMultiSweeps", - sweeps_num=sweeps_num, - load_dim=point_load_dim, - use_dim=lidar_sweep_dims, - pad_empty_sweeps=True, - remove_close=True, - backend_args=backend_args, - test_mode=False, - ), - dict(type="LoadAnnotations3D", with_bbox_3d=True, with_label_3d=True, with_attr_label=False), - dict( - type="BEVFusionGlobalRotScaleTrans", - scale_ratio_range=[0.95, 1.05], - rot_range=[-0.78539816, 0.78539816], - translation_std=[0.5, 0.5, 0.2], - ), - dict(type="BEVFusionRandomFlip3D"), - dict(type="PointsRangeFilter", point_cloud_range=point_cloud_range), - dict(type="ObjectRangeFilter", point_cloud_range=point_cloud_range), - dict( - type="ObjectNameFilter", - classes=[ - "car", - "truck", - "bus", - "bicycle", - "pedestrian", - ], - ), - dict(type="PointShuffle"), - dict( - type="Pack3DDetInputs", - keys=["points", "img", "gt_bboxes_3d", "gt_labels_3d", "gt_bboxes", "gt_labels"], - meta_keys=[ - "cam2img", - "ori_cam2img", - "lidar2cam", - "lidar2img", - "cam2lidar", - "ori_lidar2img", - "img_aug_matrix", - "box_type_3d", - "sample_idx", - "lidar_path", - "img_path", - "transformation_3d_flow", - "pcd_rotation", - "pcd_scale_factor", - "pcd_trans", - "img_aug_matrix", - "lidar_aug_matrix", - "timestamp", - "vehicle_type", - "city", - "traffic_cone_barrier_status", - ], - ), -] - -test_pipeline = [ - dict( - type="LoadPointsFromFile", - coord_type="LIDAR", - load_dim=point_load_dim, - use_dim=point_load_dim, - backend_args=backend_args, - ), - dict( - type="LoadPointsFromMultiSweeps", - sweeps_num=sweeps_num, - load_dim=point_load_dim, - use_dim=lidar_sweep_dims, - pad_empty_sweeps=True, - remove_close=True, - backend_args=backend_args, - test_mode=True, - ), - dict(type="PointsRangeFilter", point_cloud_range=point_cloud_range), - dict( - type="Pack3DDetInputs", - keys=["img", "points", "gt_bboxes_3d", "gt_labels_3d"], - meta_keys=[ - "cam2img", - "ori_cam2img", - "lidar2cam", - "lidar2img", - "cam2lidar", - "ori_lidar2img", - "img_aug_matrix", - "box_type_3d", - "sample_idx", - "lidar_path", - "img_path", - "num_pts_feats", - "num_views", - "timestamp", - "vehicle_type", - "city", - "traffic_cone_barrier_status", - ], - ), -] - -# Filtering configuration -# Note: -# - In camera–LiDAR configs, `filter_cfg` can enable image-based frame filtering, -# e.g., dict(filter_frames_with_missing_image=True). -# - This is a LiDAR-only config (`input_modality['use_camera'] = False`), so -# image-based filtering does not apply and `filter_cfg` is intentionally None. -filter_cfg = None From ebc80340e07dac07833f2b2b5d7bd9df15fe3450 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Wed, 29 Apr 2026 01:37:23 +0900 Subject: [PATCH 56/68] Update configs --- ..._second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py index 57afc7e75..b9fafe7a9 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py @@ -65,7 +65,6 @@ voxel_size=_base_.voxel_size[0:2], ), ), - partial_ignore_labels=None, ) # Dataset parameters From bb35205a445beb1ad37bfe075a9400d0a8fb960a Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Wed, 29 Apr 2026 10:33:08 +0900 Subject: [PATCH 57/68] Add the script --- .../default/schedulers/default_30e_8xb8_adamw_cosine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py index 388705848..a2cd2d2e9 100644 --- a/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py +++ b/projects/BEVFusion/configs/t4dataset/default/schedulers/default_30e_8xb8_adamw_cosine.py @@ -3,7 +3,7 @@ lr = 1.4141e-4 t_max = 8 max_epochs = 30 -val_interval = 1 +val_interval = 5 train_gpu_size = 8 test_batch_size = 2 From f343fbeae0811127e1d54870e21f7eb5850af3b2 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Wed, 29 Apr 2026 10:42:46 +0900 Subject: [PATCH 58/68] Update configs --- autoware_ml/detection3d/datasets/t4dataset.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoware_ml/detection3d/datasets/t4dataset.py b/autoware_ml/detection3d/datasets/t4dataset.py index ce1c78f31..526150755 100644 --- a/autoware_ml/detection3d/datasets/t4dataset.py +++ b/autoware_ml/detection3d/datasets/t4dataset.py @@ -191,5 +191,8 @@ def parse_data_info(self, info: dict) -> dict: info["lidar2img"] = np.array(info["images"][self.default_cam_key]["lidar2img"]) else: info["lidar2img"] = info["cam2img"] @ info["lidar2cam"] - + + # Default difficulty to 0 if not present + if 'difficulty' not in info: + info['difficulty'] = 0 return info From 6f55027b662c778c264d5ebe967d8d2f34813676 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Thu, 30 Apr 2026 03:22:00 +0900 Subject: [PATCH 59/68] Update configs --- ...xel_second_secfpn_50e_8xb8_base_120m_traffic_cone_ignore.py} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename projects/BEVFusion/configs/t4dataset/BEVFusion-L/{bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone.py => bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_ignore.py} (98%) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_ignore.py similarity index 98% rename from projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone.py rename to projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_ignore.py index 39c6ddf54..90136a748 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_ignore.py @@ -16,7 +16,7 @@ info_directory_path = "info/kokseang_2_8/" experiment_group_name = "bevfusion_lidar_traffic_cone/base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" +experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m_ignore" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter From d99abd97ed98a0bdfcc90c1b26383aded31eedcf Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Thu, 30 Apr 2026 12:25:17 +0900 Subject: [PATCH 60/68] Add the script --- .../BEVFusion/bevfusion/bevfusion_head.py | 9 +- ...8xb8_j6gen2_base_120m_traffic_cone_full.py | 1 + ..._base_120m_traffic_cone_full_copy_paste.py | 21 +- ...b8_j6gen2_base_120m_traffic_cone_ignore.py | 1 + ...ase_120m_traffic_cone_ignore_copy_paste.py | 317 ++++++++++++++++++ 5 files changed, 336 insertions(+), 13 deletions(-) create mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index 0b18803c4..4894ad2e7 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -70,7 +70,8 @@ def __init__( train_cfg=None, test_cfg=None, bbox_coder=None, - partial_ignore_labels=None + partial_ignore_labels=None, + partial_ignore_dense_heatmap=False ): super().__init__() self.class_names = class_names @@ -194,7 +195,8 @@ def __init__( else: self.partial_ignore_labels = None - print_log(f"BEVFusionHead Partial ignore labels: {self.partial_ignore_labels}, dense heatmap pooling classes: \ + self.partial_ignore_dense_heatmap = partial_ignore_dense_heatmap + print_log(f"BEVFusionHead Partial ignore labels: {self.partial_ignore_labels}, partial ignore dense heatmap: {self.partial_ignore_dense_heatmap}, dense heatmap pooling classes: \ {self.dense_heatmap_pooling_classes}, class_names: {self.class_names}", logger="current") def create_2D_grid(self, x_size, y_size): @@ -691,7 +693,8 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): # Ignore labels for traffic cone and barrier traffic_cone_barrier_status = metadata.get("traffic_cone_barrier_status", True) if self.partial_ignore_labels is not None and not traffic_cone_barrier_status: - heatmap_weights[self.partial_ignore_labels] = 0.0 # Set to 0 to ignore these proposals + if self.partial_ignore_dense_heatmap: + heatmap_weights[self.partial_ignore_labels] = 0.0 # Set to 0 to ignore these proposals if len(neg_inds) > 0: # neg_inds [N] and column indices [K] must broadcast (not pair); see IndexError N vs K. _cols = torch.as_tensor( diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py index b9fafe7a9..88e3cbc54 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py @@ -64,6 +64,7 @@ pc_range=_base_.point_cloud_range[0:2], voxel_size=_base_.voxel_size[0:2], ), + partial_ignore_dense_heatmap=False ), ) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py index 6e0d7445b..903df577c 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py @@ -63,7 +63,8 @@ bbox_coder=dict( pc_range=_base_.point_cloud_range[0:2], voxel_size=_base_.voxel_size[0:2], - ) + ), + partial_ignore_dense_heatmap=False ), ) @@ -113,7 +114,7 @@ type="LoadPointsFromMultiSweeps", sweeps_num=_base_.sweeps_num, load_dim=_base_.point_load_dim, - use_dim=_base_.point_use_dim, + use_dim=_base_.lidar_sweep_dims, pad_empty_sweeps=True, remove_close=True, backend_args=_base_.backend_args, @@ -176,21 +177,21 @@ dict( type="LoadPointsFromFile", coord_type="LIDAR", - load_dim=point_load_dim, - use_dim=point_load_dim, - backend_args=backend_args, + load_dim=_base_.point_load_dim, + use_dim=_base_.point_use_dim, + backend_args=_base_.backend_args, ), dict( type="LoadPointsFromMultiSweeps", - sweeps_num=sweeps_num, - load_dim=point_load_dim, - use_dim=lidar_sweep_dims, + sweeps_num=_base_.sweeps_num, + load_dim=_base_.point_load_dim, + use_dim=_base_.lidar_sweep_dims, pad_empty_sweeps=True, remove_close=True, - backend_args=backend_args, + backend_args=_base_.backend_args, test_mode=True, ), - dict(type="PointsRangeFilter", point_cloud_range=point_cloud_range), + dict(type="PointsRangeFilter", point_cloud_range=_base_.point_cloud_range), dict( type="Pack3DDetInputs", keys=["img", "points", "gt_bboxes_3d", "gt_labels_3d"], diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py index 68c736749..bb10d484d 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py @@ -65,6 +65,7 @@ voxel_size=_base_.voxel_size[0:2], ), partial_ignore_labels=["traffic_cone", "barrier"], + partial_ignore_dense_heatmap=True, loss_heatmap=dict( reduction="none", ), diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py new file mode 100644 index 000000000..61b9d35f3 --- /dev/null +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py @@ -0,0 +1,317 @@ +_base_ = [ + "../../../../../autoware_ml/configs/detection3d/default_runtime.py", + "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", + "../default/pipelines/default_lidar_intensity_120m.py", + "../default/models/default_lidar_second_secfpn_120m.py", + "../default/schedulers/default_30e_8xb8_adamw_cosine.py", + "../default/default_misc.py", +] + +custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) +custom_imports["imports"] += _base_.custom_imports["imports"] +custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] + +# user setting +data_root = "data/t4dataset/" +info_directory_path = "info/kokseang_2_8/" + +experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste" +work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name + +# model parameter +model = dict( + type="BEVFusion", + voxelize_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + voxel_size=_base_.voxel_size, + voxelize_reduce=True, + ), + pts_voxel_encoder=dict(num_features=_base_.point_use_dim), + pts_middle_encoder=dict( + in_channels=_base_.point_use_dim, + sparse_shape=_base_.grid_size, + num_aug_features=5, + # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here + aug_features_min_values=[ + _base_.point_cloud_range[0], + _base_.point_cloud_range[1], + _base_.point_cloud_range[2], + 0.0, + 0.0, + ], + aug_features_max_values=[ + _base_.point_cloud_range[3], + _base_.point_cloud_range[4], + _base_.point_cloud_range[5], + 255.0, + 0.2, + ], + ), + bbox_head=dict( + class_names=_base_.class_names, # Use class names to identify the correct class indices + train_cfg=dict( + point_cloud_range=_base_.point_cloud_range, + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size, + ), + test_cfg=dict( + grid_size=_base_.grid_size, + voxel_size=_base_.voxel_size[0:2], + pc_range=_base_.point_cloud_range[0:2], + ), + bbox_coder=dict( + pc_range=_base_.point_cloud_range[0:2], + voxel_size=_base_.voxel_size[0:2], + ), + partial_ignore_labels=["traffic_cone", "barrier"], + partial_ignore_dense_heatmap=False, + loss_heatmap=dict( + reduction="none", + ), + ), +) + +db_sampler = dict( + data_root=data_root, + info_path=info_directory_path + _base_.info_train_file_name, + rate=1.0, + prepare=dict( + filter_by_difficulty=[-1], + filter_by_min_points=dict( + car=5, + truck=5, + bus=5, + trailer=5, + traffic_cone=5, + barrier=5, + bicycle=5, + pedestrian=5)), + classes=_base_.class_names, + sample_groups=dict( + car=0, + truck=0, + bus=0, + barrier=2, + traffic_cone=4), + points_loader=dict( + type='LoadPointsFromCurrentFileSweep', + coord_type='LIDAR', + load_dim=_base_.point_load_dim, + use_dim=_base_.point_use_dim, + backend_args=_base_.backend_args, + sweeps_num=_base_.sweeps_num, + pad_empty_sweeps=True, + remove_close=True, + test_mode=False, + )) + +train_pipeline = [ + dict( + type="LoadPointsFromFile", + coord_type="LIDAR", + load_dim=_base_.point_load_dim, + use_dim=_base_.point_use_dim, + backend_args=_base_.backend_args, + ), + dict( + type="LoadPointsFromMultiSweeps", + sweeps_num=_base_.sweeps_num, + load_dim=_base_.point_load_dim, + use_dim=_base_.lidar_sweep_dims, + pad_empty_sweeps=True, + remove_close=True, + backend_args=_base_.backend_args, + test_mode=False, + ), + dict(type="LoadAnnotations3D", with_bbox_3d=True, with_label_3d=True, with_attr_label=False), + dict(type="ObjectSample", db_sampler=db_sampler), + dict( + type="BEVFusionGlobalRotScaleTrans", + scale_ratio_range=[0.95, 1.05], + rot_range=[-0.78539816, 0.78539816], + translation_std=[0.5, 0.5, 0.2], + ), + dict(type="BEVFusionRandomFlip3D"), + dict(type="PointsRangeFilter", point_cloud_range=_base_.point_cloud_range), + dict(type="ObjectRangeFilter", point_cloud_range=_base_.point_cloud_range), + dict( + type="ObjectNameFilter", + classes=[ + "car", + "truck", + "bus", + "bicycle", + "pedestrian", + "traffic_cone", + "barrier", + ], + ), + dict(type="PointShuffle"), + dict( + type="Pack3DDetInputs", + keys=["points", "img", "gt_bboxes_3d", "gt_labels_3d", "gt_bboxes", "gt_labels"], + meta_keys=[ + "cam2img", + "ori_cam2img", + "lidar2cam", + "lidar2img", + "cam2lidar", + "ori_lidar2img", + "img_aug_matrix", + "box_type_3d", + "sample_idx", + "lidar_path", + "img_path", + "transformation_3d_flow", + "pcd_rotation", + "pcd_scale_factor", + "pcd_trans", + "img_aug_matrix", + "lidar_aug_matrix", + "timestamp", + "vehicle_type", + "city", + "traffic_cone_barrier_status", + ], + ), +] + +test_pipeline = [ + dict( + type="LoadPointsFromFile", + coord_type="LIDAR", + load_dim=_base_.point_load_dim, + use_dim=_base_.point_use_dim, + backend_args=_base_.backend_args, + ), + dict( + type="LoadPointsFromMultiSweeps", + sweeps_num=_base_.sweeps_num, + load_dim=_base_.point_load_dim, + use_dim=_base_.lidar_sweep_dims, + pad_empty_sweeps=True, + remove_close=True, + backend_args=_base_.backend_args, + test_mode=True, + ), + dict(type="PointsRangeFilter", point_cloud_range=_base_.point_cloud_range), + dict( + type="Pack3DDetInputs", + keys=["img", "points", "gt_bboxes_3d", "gt_labels_3d"], + meta_keys=[ + "cam2img", + "ori_cam2img", + "lidar2cam", + "lidar2img", + "cam2lidar", + "ori_lidar2img", + "img_aug_matrix", + "box_type_3d", + "sample_idx", + "lidar_path", + "img_path", + "num_pts_feats", + "num_views", + "timestamp", + "vehicle_type", + "city", + "traffic_cone_barrier_status", + ], + ), +] + +# Dataset parameters +train_dataloader = dict( + batch_size=_base_.train_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=True), + dataset=dict( + type=_base_.dataset_type, + pipeline=_base_.train_pipeline, + modality=_base_.input_modality, + backend_args=_base_.backend_args, + data_root=data_root, + ann_file=info_directory_path + _base_.info_train_file_name, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + test_mode=False, + data_prefix=_base_.data_prefix, + box_type_3d="LiDAR", + filter_cfg=_base_.filter_cfg, + ), +) + +val_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_val_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +test_dataloader = dict( + batch_size=_base_.test_batch_size, + num_workers=_base_.num_workers, + persistent_workers=True, + sampler=dict(type="DefaultSampler", shuffle=False), + dataset=dict( + type=_base_.dataset_type, + data_root=data_root, + ann_file=info_directory_path + _base_.info_test_file_name, + pipeline=_base_.test_pipeline, + metainfo=_base_.metainfo, + class_names=_base_.class_names, + modality=_base_.input_modality, + data_prefix=_base_.data_prefix, + test_mode=True, + box_type_3d="LiDAR", + backend_args=_base_.backend_args, + ), +) + +val_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_val_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, +) + +test_evaluator = dict( + type="T4Metric", + data_root=data_root, + ann_file=data_root + info_directory_path + _base_.info_test_file_name, + metric="bbox", + backend_args=_base_.backend_args, + class_names=_base_.class_names, + name_mapping=_base_.name_mapping, + eval_class_range=_base_.eval_class_range, + filter_attributes=_base_.filter_attributes, + save_csv=True, +) + +default_hooks = dict( + logger=dict(type="LoggerHook", interval=50), + checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), +) +log_processor = dict(window_size=50) + +load_from = "work_dirs/bevfusion_lidar_2.7.0/base/epoch_48.pth" From b1b247a148f1a060eec5f70f7d8f1d8911524ebe Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Thu, 30 Apr 2026 12:28:55 +0900 Subject: [PATCH 61/68] Add the script --- ...pn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py | 2 ++ ..._30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py index 903df577c..7fef2db47 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py @@ -88,6 +88,8 @@ car=0, truck=0, bus=0, + bicycle=0, + pedestrian=0, barrier=2, traffic_cone=4), points_loader=dict( diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py index 61b9d35f3..e5e9c9ff3 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py @@ -92,6 +92,8 @@ car=0, truck=0, bus=0, + bicycle=0, + pedestrian=0, barrier=2, traffic_cone=4), points_loader=dict( From 36e3811139144ea84899aadfa8b94f66e421dd9d Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Thu, 30 Apr 2026 20:38:01 +0900 Subject: [PATCH 62/68] Add the script --- .../BEVFusion/bevfusion/bevfusion_head.py | 3 + ...ase_120m_traffic_cone_ignore_copy_paste.py | 73 ++++--------------- 2 files changed, 19 insertions(+), 57 deletions(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index 4894ad2e7..5b0e156d0 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -701,6 +701,9 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): self.partial_ignore_labels, device=label_weights.device, dtype=torch.long ) label_weights[neg_inds.unsqueeze(1), _cols.unsqueeze(0)] = 0.0 + + print("heatmap with traffic cone: ", heatmap[5].sum()) + print("heatmap with barrier: ", heatmap[6].sum()) return ( labels[None], diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py index e5e9c9ff3..41629bb17 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py @@ -74,19 +74,20 @@ db_sampler = dict( data_root=data_root, - info_path=info_directory_path + _base_.info_train_file_name, + info_path=data_root + info_directory_path + _base_.info_train_file_name, rate=1.0, - prepare=dict( - filter_by_difficulty=[-1], - filter_by_min_points=dict( - car=5, - truck=5, - bus=5, - trailer=5, - traffic_cone=5, - barrier=5, - bicycle=5, - pedestrian=5)), + prepare=dict(), + # prepare=dict( + # filter_by_difficulty=[-1], + # filter_by_min_points=dict( + # car=5, + # truck=5, + # bus=5, + # trailer=5, + # traffic_cone=5, + # barrier=5, + # bicycle=5, + # pedestrian=5)), classes=_base_.class_names, sample_groups=dict( car=0, @@ -179,50 +180,6 @@ ), ] -test_pipeline = [ - dict( - type="LoadPointsFromFile", - coord_type="LIDAR", - load_dim=_base_.point_load_dim, - use_dim=_base_.point_use_dim, - backend_args=_base_.backend_args, - ), - dict( - type="LoadPointsFromMultiSweeps", - sweeps_num=_base_.sweeps_num, - load_dim=_base_.point_load_dim, - use_dim=_base_.lidar_sweep_dims, - pad_empty_sweeps=True, - remove_close=True, - backend_args=_base_.backend_args, - test_mode=True, - ), - dict(type="PointsRangeFilter", point_cloud_range=_base_.point_cloud_range), - dict( - type="Pack3DDetInputs", - keys=["img", "points", "gt_bboxes_3d", "gt_labels_3d"], - meta_keys=[ - "cam2img", - "ori_cam2img", - "lidar2cam", - "lidar2img", - "cam2lidar", - "ori_lidar2img", - "img_aug_matrix", - "box_type_3d", - "sample_idx", - "lidar_path", - "img_path", - "num_pts_feats", - "num_views", - "timestamp", - "vehicle_type", - "city", - "traffic_cone_barrier_status", - ], - ), -] - # Dataset parameters train_dataloader = dict( batch_size=_base_.train_batch_size, @@ -231,7 +188,7 @@ sampler=dict(type="DefaultSampler", shuffle=True), dataset=dict( type=_base_.dataset_type, - pipeline=_base_.train_pipeline, + pipeline=train_pipeline, modality=_base_.input_modality, backend_args=_base_.backend_args, data_root=data_root, @@ -317,3 +274,5 @@ log_processor = dict(window_size=50) load_from = "work_dirs/bevfusion_lidar_2.7.0/base/epoch_48.pth" + +custom_hooks = [] From e9052633e80ae8ba8b36fb6554ded9c04e7bf672 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Thu, 7 May 2026 15:29:37 +0900 Subject: [PATCH 63/68] Add traffic cone and barrier --- .../BEVFusion/bevfusion/bevfusion_head.py | 13 +- ...second_secfpn_30e_8xb8_j6gen2_base_120m.py | 4 + ...8xb8_j6gen2_base_120m_traffic_cone_full.py | 164 --------- ..._base_120m_traffic_cone_full_copy_paste.py | 317 ------------------ ...b8_j6gen2_base_120m_traffic_cone_ignore.py | 168 ---------- ...ase_120m_traffic_cone_ignore_copy_paste.py | 278 --------------- ...econd_secfpn_30e_8xb8_jpntaxi_base_120m.py | 4 + ..._voxel_second_secfpn_50e_8xb8_base_120m.py | 4 + ...pn_50e_8xb8_base_120m_traffic_cone_full.py | 163 --------- ..._50e_8xb8_base_120m_traffic_cone_ignore.py | 163 --------- 10 files changed, 14 insertions(+), 1264 deletions(-) delete mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py delete mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py delete mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py delete mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py delete mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_full.py delete mode 100644 projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_ignore.py diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index 5b0e156d0..da056efcc 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -633,7 +633,6 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): ious = torch.clamp(ious, min=0.0, max=1.0) labels = bboxes_tensor.new_zeros(num_proposals, dtype=torch.long) label_weights = bboxes_tensor.new_zeros([num_proposals, self.num_classes], dtype=torch.long) - # label_weights = bboxes_tensor.new_zeros(num_proposals, dtype=torch.long) if gt_labels_3d is not None: # default label is -1 labels += self.num_classes @@ -693,17 +692,13 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): # Ignore labels for traffic cone and barrier traffic_cone_barrier_status = metadata.get("traffic_cone_barrier_status", True) if self.partial_ignore_labels is not None and not traffic_cone_barrier_status: - if self.partial_ignore_dense_heatmap: - heatmap_weights[self.partial_ignore_labels] = 0.0 # Set to 0 to ignore these proposals + heatmap_weights[self.partial_ignore_labels] = 0.0 # Set to 0 to ignore these grids if len(neg_inds) > 0: - # neg_inds [N] and column indices [K] must broadcast (not pair); see IndexError N vs K. + # neg_inds [N] and column indices [K] must broadcast (not pair); _cols = torch.as_tensor( self.partial_ignore_labels, device=label_weights.device, dtype=torch.long ) label_weights[neg_inds.unsqueeze(1), _cols.unsqueeze(0)] = 0.0 - - print("heatmap with traffic cone: ", heatmap[5].sum()) - print("heatmap with barrier: ", heatmap[6].sum()) return ( labels[None], @@ -795,10 +790,6 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li ..., idx_layer * self.num_proposals : (idx_layer + 1) * self.num_proposals, ].reshape(-1) - # layer_label_weights = label_weights[ - # ..., - # idx_layer * self.num_proposals : (idx_layer + 1) * self.num_proposals, - # ].reshape(-1) layer_label_weights = label_weights[ ..., idx_layer * self.num_proposals : (idx_layer + 1) * self.num_proposals, diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index 9da67036e..d32dc9c70 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -64,6 +64,10 @@ pc_range=_base_.point_cloud_range[0:2], voxel_size=_base_.voxel_size[0:2], ), + partial_ignore_labels=["traffic_cone", "barrier"], + loss_heatmap=dict( + reduction="none", + ), ), ) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py deleted file mode 100644 index 88e3cbc54..000000000 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full.py +++ /dev/null @@ -1,164 +0,0 @@ -_base_ = [ - "../../../../../autoware_ml/configs/detection3d/default_runtime.py", - "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", - "../default/pipelines/default_lidar_intensity_120m.py", - "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_30e_8xb8_adamw_cosine.py", - "../default/default_misc.py", -] - -custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) -custom_imports["imports"] += _base_.custom_imports["imports"] -custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] - -# user setting -data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_8/" - -experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full" -work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name - -# model parameter -model = dict( - type="BEVFusion", - voxelize_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - voxel_size=_base_.voxel_size, - voxelize_reduce=True, - ), - pts_voxel_encoder=dict(num_features=_base_.point_use_dim), - pts_middle_encoder=dict( - in_channels=_base_.point_use_dim, - sparse_shape=_base_.grid_size, - num_aug_features=5, - # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here - aug_features_min_values=[ - _base_.point_cloud_range[0], - _base_.point_cloud_range[1], - _base_.point_cloud_range[2], - 0.0, - 0.0, - ], - aug_features_max_values=[ - _base_.point_cloud_range[3], - _base_.point_cloud_range[4], - _base_.point_cloud_range[5], - 255.0, - 0.2, - ], - ), - bbox_head=dict( - class_names=_base_.class_names, # Use class names to identify the correct class indices - train_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size, - ), - test_cfg=dict( - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size[0:2], - pc_range=_base_.point_cloud_range[0:2], - ), - bbox_coder=dict( - pc_range=_base_.point_cloud_range[0:2], - voxel_size=_base_.voxel_size[0:2], - ), - partial_ignore_dense_heatmap=False - ), -) - -# Dataset parameters -train_dataloader = dict( - batch_size=_base_.train_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=True), - dataset=dict( - type=_base_.dataset_type, - pipeline=_base_.train_pipeline, - modality=_base_.input_modality, - backend_args=_base_.backend_args, - data_root=data_root, - ann_file=info_directory_path + _base_.info_train_file_name, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - test_mode=False, - data_prefix=_base_.data_prefix, - box_type_3d="LiDAR", - filter_cfg=_base_.filter_cfg, - ), -) - -val_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_val_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -test_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_test_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -val_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_val_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, -) - -test_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_test_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, - save_csv=True, -) - -default_hooks = dict( - logger=dict(type="LoggerHook", interval=50), - checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), -) -log_processor = dict(window_size=50) - -load_from = "work_dirs/bevfusion_lidar_2.7.0/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m/epoch_48.pth" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py deleted file mode 100644 index 7fef2db47..000000000 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste.py +++ /dev/null @@ -1,317 +0,0 @@ -_base_ = [ - "../../../../../autoware_ml/configs/detection3d/default_runtime.py", - "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", - "../default/pipelines/default_lidar_intensity_120m.py", - "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_30e_8xb8_adamw_cosine.py", - "../default/default_misc.py", -] - -custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) -custom_imports["imports"] += _base_.custom_imports["imports"] -custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] - -# user setting -data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_8/" - -experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_full_copy_paste" -work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name - -# model parameter -model = dict( - type="BEVFusion", - voxelize_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - voxel_size=_base_.voxel_size, - voxelize_reduce=True, - ), - pts_voxel_encoder=dict(num_features=_base_.point_use_dim), - pts_middle_encoder=dict( - in_channels=_base_.point_use_dim, - sparse_shape=_base_.grid_size, - num_aug_features=5, - # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here - aug_features_min_values=[ - _base_.point_cloud_range[0], - _base_.point_cloud_range[1], - _base_.point_cloud_range[2], - 0.0, - 0.0, - ], - aug_features_max_values=[ - _base_.point_cloud_range[3], - _base_.point_cloud_range[4], - _base_.point_cloud_range[5], - 255.0, - 0.2, - ], - ), - bbox_head=dict( - class_names=_base_.class_names, # Use class names to identify the correct class indices - train_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size, - ), - test_cfg=dict( - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size[0:2], - pc_range=_base_.point_cloud_range[0:2], - ), - bbox_coder=dict( - pc_range=_base_.point_cloud_range[0:2], - voxel_size=_base_.voxel_size[0:2], - ), - partial_ignore_dense_heatmap=False - ), -) - -db_sampler = dict( - data_root=data_root, - info_path=info_directory_path + _base_.info_train_file_name, - rate=1.0, - prepare=dict( - filter_by_difficulty=[-1], - filter_by_min_points=dict( - car=5, - truck=5, - bus=5, - trailer=5, - traffic_cone=5, - barrier=5, - bicycle=5, - pedestrian=5)), - classes=_base_.class_names, - sample_groups=dict( - car=0, - truck=0, - bus=0, - bicycle=0, - pedestrian=0, - barrier=2, - traffic_cone=4), - points_loader=dict( - type='LoadPointsFromCurrentFileSweep', - coord_type='LIDAR', - load_dim=_base_.point_load_dim, - use_dim=_base_.point_use_dim, - backend_args=_base_.backend_args, - sweeps_num=_base_.sweeps_num, - pad_empty_sweeps=True, - remove_close=True, - test_mode=False, - )) - -train_pipeline = [ - dict( - type="LoadPointsFromFile", - coord_type="LIDAR", - load_dim=_base_.point_load_dim, - use_dim=_base_.point_use_dim, - backend_args=_base_.backend_args, - ), - dict( - type="LoadPointsFromMultiSweeps", - sweeps_num=_base_.sweeps_num, - load_dim=_base_.point_load_dim, - use_dim=_base_.lidar_sweep_dims, - pad_empty_sweeps=True, - remove_close=True, - backend_args=_base_.backend_args, - test_mode=False, - ), - dict(type="LoadAnnotations3D", with_bbox_3d=True, with_label_3d=True, with_attr_label=False), - dict(type="ObjectSample", db_sampler=db_sampler), - dict( - type="BEVFusionGlobalRotScaleTrans", - scale_ratio_range=[0.95, 1.05], - rot_range=[-0.78539816, 0.78539816], - translation_std=[0.5, 0.5, 0.2], - ), - dict(type="BEVFusionRandomFlip3D"), - dict(type="PointsRangeFilter", point_cloud_range=_base_.point_cloud_range), - dict(type="ObjectRangeFilter", point_cloud_range=_base_.point_cloud_range), - dict( - type="ObjectNameFilter", - classes=[ - "car", - "truck", - "bus", - "bicycle", - "pedestrian", - "traffic_cone", - "barrier", - ], - ), - dict(type="PointShuffle"), - dict( - type="Pack3DDetInputs", - keys=["points", "img", "gt_bboxes_3d", "gt_labels_3d", "gt_bboxes", "gt_labels"], - meta_keys=[ - "cam2img", - "ori_cam2img", - "lidar2cam", - "lidar2img", - "cam2lidar", - "ori_lidar2img", - "img_aug_matrix", - "box_type_3d", - "sample_idx", - "lidar_path", - "img_path", - "transformation_3d_flow", - "pcd_rotation", - "pcd_scale_factor", - "pcd_trans", - "img_aug_matrix", - "lidar_aug_matrix", - "timestamp", - "vehicle_type", - "city", - "traffic_cone_barrier_status", - ], - ), -] - -test_pipeline = [ - dict( - type="LoadPointsFromFile", - coord_type="LIDAR", - load_dim=_base_.point_load_dim, - use_dim=_base_.point_use_dim, - backend_args=_base_.backend_args, - ), - dict( - type="LoadPointsFromMultiSweeps", - sweeps_num=_base_.sweeps_num, - load_dim=_base_.point_load_dim, - use_dim=_base_.lidar_sweep_dims, - pad_empty_sweeps=True, - remove_close=True, - backend_args=_base_.backend_args, - test_mode=True, - ), - dict(type="PointsRangeFilter", point_cloud_range=_base_.point_cloud_range), - dict( - type="Pack3DDetInputs", - keys=["img", "points", "gt_bboxes_3d", "gt_labels_3d"], - meta_keys=[ - "cam2img", - "ori_cam2img", - "lidar2cam", - "lidar2img", - "cam2lidar", - "ori_lidar2img", - "img_aug_matrix", - "box_type_3d", - "sample_idx", - "lidar_path", - "img_path", - "num_pts_feats", - "num_views", - "timestamp", - "vehicle_type", - "city", - "traffic_cone_barrier_status", - ], - ), -] - -# Dataset parameters -train_dataloader = dict( - batch_size=_base_.train_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=True), - dataset=dict( - type=_base_.dataset_type, - pipeline=_base_.train_pipeline, - modality=_base_.input_modality, - backend_args=_base_.backend_args, - data_root=data_root, - ann_file=info_directory_path + _base_.info_train_file_name, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - test_mode=False, - data_prefix=_base_.data_prefix, - box_type_3d="LiDAR", - filter_cfg=_base_.filter_cfg, - ), -) - -val_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_val_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -test_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_test_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -val_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_val_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, -) - -test_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_test_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, - save_csv=True, -) - -default_hooks = dict( - logger=dict(type="LoggerHook", interval=50), - checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), -) -log_processor = dict(window_size=50) - -load_from = "work_dirs/bevfusion_lidar_2.7.0/base/epoch_48.pth" - -custom_hooks = [] diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py deleted file mode 100644 index bb10d484d..000000000 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore.py +++ /dev/null @@ -1,168 +0,0 @@ -_base_ = [ - "../../../../../autoware_ml/configs/detection3d/default_runtime.py", - "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", - "../default/pipelines/default_lidar_intensity_120m.py", - "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_30e_8xb8_adamw_cosine.py", - "../default/default_misc.py", -] - -custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) -custom_imports["imports"] += _base_.custom_imports["imports"] -custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] - -# user setting -data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_8/" - -experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore" -work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name - -# model parameter -model = dict( - type="BEVFusion", - voxelize_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - voxel_size=_base_.voxel_size, - voxelize_reduce=True, - ), - pts_voxel_encoder=dict(num_features=_base_.point_use_dim), - pts_middle_encoder=dict( - in_channels=_base_.point_use_dim, - sparse_shape=_base_.grid_size, - num_aug_features=5, - # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here - aug_features_min_values=[ - _base_.point_cloud_range[0], - _base_.point_cloud_range[1], - _base_.point_cloud_range[2], - 0.0, - 0.0, - ], - aug_features_max_values=[ - _base_.point_cloud_range[3], - _base_.point_cloud_range[4], - _base_.point_cloud_range[5], - 255.0, - 0.2, - ], - ), - bbox_head=dict( - class_names=_base_.class_names, # Use class names to identify the correct class indices - train_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size, - ), - test_cfg=dict( - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size[0:2], - pc_range=_base_.point_cloud_range[0:2], - ), - bbox_coder=dict( - pc_range=_base_.point_cloud_range[0:2], - voxel_size=_base_.voxel_size[0:2], - ), - partial_ignore_labels=["traffic_cone", "barrier"], - partial_ignore_dense_heatmap=True, - loss_heatmap=dict( - reduction="none", - ), - ), -) - -# Dataset parameters -train_dataloader = dict( - batch_size=_base_.train_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=True), - dataset=dict( - type=_base_.dataset_type, - pipeline=_base_.train_pipeline, - modality=_base_.input_modality, - backend_args=_base_.backend_args, - data_root=data_root, - ann_file=info_directory_path + _base_.info_train_file_name, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - test_mode=False, - data_prefix=_base_.data_prefix, - box_type_3d="LiDAR", - filter_cfg=_base_.filter_cfg, - ), -) - -val_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_val_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -test_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_test_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -val_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_val_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, -) - -test_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_test_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, - save_csv=True, -) - -default_hooks = dict( - logger=dict(type="LoggerHook", interval=50), - checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), -) -log_processor = dict(window_size=50) - -load_from = "work_dirs/bevfusion_lidar_2.7.0/base/epoch_48.pth" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py deleted file mode 100644 index 41629bb17..000000000 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste.py +++ /dev/null @@ -1,278 +0,0 @@ -_base_ = [ - "../../../../../autoware_ml/configs/detection3d/default_runtime.py", - "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base.py", - "../default/pipelines/default_lidar_intensity_120m.py", - "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_30e_8xb8_adamw_cosine.py", - "../default/default_misc.py", -] - -custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) -custom_imports["imports"] += _base_.custom_imports["imports"] -custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] - -# user setting -data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_8/" - -experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_traffic_cone_ignore_copy_paste" -work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name - -# model parameter -model = dict( - type="BEVFusion", - voxelize_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - voxel_size=_base_.voxel_size, - voxelize_reduce=True, - ), - pts_voxel_encoder=dict(num_features=_base_.point_use_dim), - pts_middle_encoder=dict( - in_channels=_base_.point_use_dim, - sparse_shape=_base_.grid_size, - num_aug_features=5, - # min-max normalization for x, y, z, intensity, time_lag, where the max of time lag technically is two seeps (200 ms) here - aug_features_min_values=[ - _base_.point_cloud_range[0], - _base_.point_cloud_range[1], - _base_.point_cloud_range[2], - 0.0, - 0.0, - ], - aug_features_max_values=[ - _base_.point_cloud_range[3], - _base_.point_cloud_range[4], - _base_.point_cloud_range[5], - 255.0, - 0.2, - ], - ), - bbox_head=dict( - class_names=_base_.class_names, # Use class names to identify the correct class indices - train_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size, - ), - test_cfg=dict( - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size[0:2], - pc_range=_base_.point_cloud_range[0:2], - ), - bbox_coder=dict( - pc_range=_base_.point_cloud_range[0:2], - voxel_size=_base_.voxel_size[0:2], - ), - partial_ignore_labels=["traffic_cone", "barrier"], - partial_ignore_dense_heatmap=False, - loss_heatmap=dict( - reduction="none", - ), - ), -) - -db_sampler = dict( - data_root=data_root, - info_path=data_root + info_directory_path + _base_.info_train_file_name, - rate=1.0, - prepare=dict(), - # prepare=dict( - # filter_by_difficulty=[-1], - # filter_by_min_points=dict( - # car=5, - # truck=5, - # bus=5, - # trailer=5, - # traffic_cone=5, - # barrier=5, - # bicycle=5, - # pedestrian=5)), - classes=_base_.class_names, - sample_groups=dict( - car=0, - truck=0, - bus=0, - bicycle=0, - pedestrian=0, - barrier=2, - traffic_cone=4), - points_loader=dict( - type='LoadPointsFromCurrentFileSweep', - coord_type='LIDAR', - load_dim=_base_.point_load_dim, - use_dim=_base_.point_use_dim, - backend_args=_base_.backend_args, - sweeps_num=_base_.sweeps_num, - pad_empty_sweeps=True, - remove_close=True, - test_mode=False, - )) - -train_pipeline = [ - dict( - type="LoadPointsFromFile", - coord_type="LIDAR", - load_dim=_base_.point_load_dim, - use_dim=_base_.point_use_dim, - backend_args=_base_.backend_args, - ), - dict( - type="LoadPointsFromMultiSweeps", - sweeps_num=_base_.sweeps_num, - load_dim=_base_.point_load_dim, - use_dim=_base_.lidar_sweep_dims, - pad_empty_sweeps=True, - remove_close=True, - backend_args=_base_.backend_args, - test_mode=False, - ), - dict(type="LoadAnnotations3D", with_bbox_3d=True, with_label_3d=True, with_attr_label=False), - dict(type="ObjectSample", db_sampler=db_sampler), - dict( - type="BEVFusionGlobalRotScaleTrans", - scale_ratio_range=[0.95, 1.05], - rot_range=[-0.78539816, 0.78539816], - translation_std=[0.5, 0.5, 0.2], - ), - dict(type="BEVFusionRandomFlip3D"), - dict(type="PointsRangeFilter", point_cloud_range=_base_.point_cloud_range), - dict(type="ObjectRangeFilter", point_cloud_range=_base_.point_cloud_range), - dict( - type="ObjectNameFilter", - classes=[ - "car", - "truck", - "bus", - "bicycle", - "pedestrian", - "traffic_cone", - "barrier", - ], - ), - dict(type="PointShuffle"), - dict( - type="Pack3DDetInputs", - keys=["points", "img", "gt_bboxes_3d", "gt_labels_3d", "gt_bboxes", "gt_labels"], - meta_keys=[ - "cam2img", - "ori_cam2img", - "lidar2cam", - "lidar2img", - "cam2lidar", - "ori_lidar2img", - "img_aug_matrix", - "box_type_3d", - "sample_idx", - "lidar_path", - "img_path", - "transformation_3d_flow", - "pcd_rotation", - "pcd_scale_factor", - "pcd_trans", - "img_aug_matrix", - "lidar_aug_matrix", - "timestamp", - "vehicle_type", - "city", - "traffic_cone_barrier_status", - ], - ), -] - -# Dataset parameters -train_dataloader = dict( - batch_size=_base_.train_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=True), - dataset=dict( - type=_base_.dataset_type, - pipeline=train_pipeline, - modality=_base_.input_modality, - backend_args=_base_.backend_args, - data_root=data_root, - ann_file=info_directory_path + _base_.info_train_file_name, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - test_mode=False, - data_prefix=_base_.data_prefix, - box_type_3d="LiDAR", - filter_cfg=_base_.filter_cfg, - ), -) - -val_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_val_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -test_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_test_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -val_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_val_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, -) - -test_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_test_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, - save_csv=True, -) - -default_hooks = dict( - logger=dict(type="LoggerHook", interval=50), - checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), -) -log_processor = dict(window_size=50) - -load_from = "work_dirs/bevfusion_lidar_2.7.0/base/epoch_48.pth" - -custom_hooks = [] diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index c884c0aef..406e87655 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -64,6 +64,10 @@ pc_range=_base_.point_cloud_range[0:2], voxel_size=_base_.voxel_size[0:2], ), + partial_ignore_labels=["traffic_cone", "barrier"], + loss_heatmap=dict( + reduction="none", + ), ), ) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py index 79337d976..e8068332a 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m.py @@ -62,6 +62,10 @@ pc_range=_base_.point_cloud_range[0:2], voxel_size=_base_.voxel_size[0:2], ), + partial_ignore_labels=["traffic_cone", "barrier"], + loss_heatmap=dict( + reduction="none", + ), ), ) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_full.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_full.py deleted file mode 100644 index 38b1e8ea5..000000000 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_full.py +++ /dev/null @@ -1,163 +0,0 @@ -_base_ = [ - "../../../../../autoware_ml/configs/detection3d/default_runtime.py", - "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/base.py", - "../default/pipelines/default_lidar_120m.py", - "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_50e_8xb8_adamw_cosine.py", - "../default/default_misc.py", -] - -custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) -custom_imports["imports"] += _base_.custom_imports["imports"] -custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] - -# user setting -data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_8/" - -experiment_group_name = "bevfusion_lidar_traffic_cone_full/base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m" -work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name - -# model parameter -model = dict( - type="BEVFusion", - voxelize_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - voxel_size=_base_.voxel_size, - voxelize_reduce=True, - ), - pts_voxel_encoder=dict(num_features=_base_.point_use_dim), - pts_middle_encoder=dict( - in_channels=_base_.point_use_dim, - sparse_shape=_base_.grid_size, - num_aug_features=4, - # min-max normalization for x, y, z, time_lag, where the max of time lag technically is two seeps (200 ms) here - aug_features_min_values=[ - _base_.point_cloud_range[0], - _base_.point_cloud_range[1], - _base_.point_cloud_range[2], - 0.0, - ], - aug_features_max_values=[ - _base_.point_cloud_range[3], - _base_.point_cloud_range[4], - _base_.point_cloud_range[5], - 0.2, - ], - ), - bbox_head=dict( - class_names=_base_.class_names, # Use class names to identify the correct class indices - train_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size, - ), - test_cfg=dict( - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size[0:2], - pc_range=_base_.point_cloud_range[0:2], - ), - bbox_coder=dict( - pc_range=_base_.point_cloud_range[0:2], - voxel_size=_base_.voxel_size[0:2], - ), - partial_ignore_labels=None, - loss_heatmap=dict( - reduction="none", - ), - ), -) - -# Dataset parameters -train_dataloader = dict( - batch_size=_base_.train_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=True), - dataset=dict( - type=_base_.dataset_type, - pipeline=_base_.train_pipeline, - modality=_base_.input_modality, - backend_args=_base_.backend_args, - data_root=data_root, - ann_file=info_directory_path + _base_.info_train_file_name, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - test_mode=False, - data_prefix=_base_.data_prefix, - box_type_3d="LiDAR", - filter_cfg=_base_.filter_cfg, - ), -) - -val_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_val_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -test_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_test_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -val_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_val_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, -) - -test_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_test_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, - save_csv=True, -) - -default_hooks = dict( - logger=dict(type="LoggerHook", interval=50), - checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), -) -log_processor = dict(window_size=50) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_ignore.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_ignore.py deleted file mode 100644 index 90136a748..000000000 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_50e_8xb8_base_120m_traffic_cone_ignore.py +++ /dev/null @@ -1,163 +0,0 @@ -_base_ = [ - "../../../../../autoware_ml/configs/detection3d/default_runtime.py", - "../../../../../autoware_ml/configs/detection3d/dataset/t4dataset/base.py", - "../default/pipelines/default_lidar_120m.py", - "../default/models/default_lidar_second_secfpn_120m.py", - "../default/schedulers/default_50e_8xb8_adamw_cosine.py", - "../default/default_misc.py", -] - -custom_imports = dict(imports=["projects.BEVFusion.bevfusion"], allow_failed_imports=False) -custom_imports["imports"] += _base_.custom_imports["imports"] -custom_imports["imports"] += ["autoware_ml.detection3d.datasets.transforms"] - -# user setting -data_root = "data/t4dataset/" -info_directory_path = "info/kokseang_2_8/" - -experiment_group_name = "bevfusion_lidar_traffic_cone/base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_50e_8xb8_base_120m_ignore" -work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name - -# model parameter -model = dict( - type="BEVFusion", - voxelize_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - voxel_size=_base_.voxel_size, - voxelize_reduce=True, - ), - pts_voxel_encoder=dict(num_features=_base_.point_use_dim), - pts_middle_encoder=dict( - in_channels=_base_.point_use_dim, - sparse_shape=_base_.grid_size, - num_aug_features=4, - # min-max normalization for x, y, z, time_lag, where the max of time lag technically is two seeps (200 ms) here - aug_features_min_values=[ - _base_.point_cloud_range[0], - _base_.point_cloud_range[1], - _base_.point_cloud_range[2], - 0.0, - ], - aug_features_max_values=[ - _base_.point_cloud_range[3], - _base_.point_cloud_range[4], - _base_.point_cloud_range[5], - 0.2, - ], - ), - bbox_head=dict( - class_names=_base_.class_names, # Use class names to identify the correct class indices - train_cfg=dict( - point_cloud_range=_base_.point_cloud_range, - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size, - ), - test_cfg=dict( - grid_size=_base_.grid_size, - voxel_size=_base_.voxel_size[0:2], - pc_range=_base_.point_cloud_range[0:2], - ), - bbox_coder=dict( - pc_range=_base_.point_cloud_range[0:2], - voxel_size=_base_.voxel_size[0:2], - ), - partial_ignore_labels=["traffic_cone", "barrier"], - loss_heatmap=dict( - reduction="none", - ), - ), -) - -# Dataset parameters -train_dataloader = dict( - batch_size=_base_.train_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=True), - dataset=dict( - type=_base_.dataset_type, - pipeline=_base_.train_pipeline, - modality=_base_.input_modality, - backend_args=_base_.backend_args, - data_root=data_root, - ann_file=info_directory_path + _base_.info_train_file_name, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - test_mode=False, - data_prefix=_base_.data_prefix, - box_type_3d="LiDAR", - filter_cfg=_base_.filter_cfg, - ), -) - -val_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_val_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -test_dataloader = dict( - batch_size=_base_.test_batch_size, - num_workers=_base_.num_workers, - persistent_workers=True, - sampler=dict(type="DefaultSampler", shuffle=False), - dataset=dict( - type=_base_.dataset_type, - data_root=data_root, - ann_file=info_directory_path + _base_.info_test_file_name, - pipeline=_base_.test_pipeline, - metainfo=_base_.metainfo, - class_names=_base_.class_names, - modality=_base_.input_modality, - data_prefix=_base_.data_prefix, - test_mode=True, - box_type_3d="LiDAR", - backend_args=_base_.backend_args, - ), -) - -val_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_val_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, -) - -test_evaluator = dict( - type="T4Metric", - data_root=data_root, - ann_file=data_root + info_directory_path + _base_.info_test_file_name, - metric="bbox", - backend_args=_base_.backend_args, - class_names=_base_.class_names, - name_mapping=_base_.name_mapping, - eval_class_range=_base_.eval_class_range, - filter_attributes=_base_.filter_attributes, - save_csv=True, -) - -default_hooks = dict( - logger=dict(type="LoggerHook", interval=50), - checkpoint=dict(type="CheckpointHook", interval=1, max_keep_ckpts=3, save_best="NuScenes metric/T4Metric/mAP"), -) -log_processor = dict(window_size=50) From dc2265e33d56726313862e0f42fbd87f8fd65fde Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 06:32:44 +0000 Subject: [PATCH 64/68] ci(pre-commit): autofix --- .../detection3d/dataset/t4dataset/base.py | 14 ++---- .../t4dataset/j6gen2_base_traffic_cone.py | 2 +- .../t4dataset/jpntaxi_base_traffic_cone.py | 2 +- .../dataset/t4dataset/jpntaxi_gen2.py | 6 +-- .../detection3d/dataset/t4dataset/largebus.py | 4 +- autoware_ml/detection3d/datasets/t4dataset.py | 6 +-- .../datasets/transforms/__init__.py | 2 +- .../datasets/transforms/loading.py | 47 +++++++++++-------- .../BEVFusion/bevfusion/bevfusion_head.py | 45 +++++++++++------- projects/BEVFusion/bevfusion/utils.py | 4 +- .../default_lidar_second_secfpn_120m.py | 2 +- .../pipelines/default_lidar_intensity_120m.py | 6 +-- tools/detection3d/create_data_t4dataset.py | 15 ++++-- .../t4dataset_converters/t4converter.py | 2 +- 14 files changed, 86 insertions(+), 71 deletions(-) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/base.py b/autoware_ml/configs/detection3d/dataset/t4dataset/base.py index 4248c90e6..3be587072 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/base.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/base.py @@ -143,20 +143,12 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", "barrier": "barrier", } -class_names = [ - "car", - "truck", - "bus", - "bicycle", - "pedestrian", - "traffic_cone", - "barrier" -] +class_names = ["car", "truck", "bus", "bicycle", "pedestrian", "traffic_cone", "barrier"] num_class = len(class_names) metainfo = dict(classes=class_names) diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py index 8c57cf4fa..176763b54 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py @@ -208,4 +208,4 @@ matching_class_agnostic_fps=False, ) -remove_non_traffic_cone_barrier = True \ No newline at end of file +remove_non_traffic_cone_barrier = True diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py index c7e631458..61e9e915c 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py @@ -199,4 +199,4 @@ matching_class_agnostic_fps=False, ) -remove_non_traffic_cone_barrier = True \ No newline at end of file +remove_non_traffic_cone_barrier = True diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py index 6b7250673..dbd6e2813 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_gen2.py @@ -117,9 +117,9 @@ "semi_trailer": "trailer", "tractor_unit": "truck", "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", - "barrier": "barrier", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", } class_names = [ diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py b/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py index 2b54629eb..2212b8e56 100644 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/largebus.py @@ -130,8 +130,8 @@ "bus", "bicycle", "pedestrian", - "traffic_cone", - "barrier", + "traffic_cone", + "barrier", ] num_class = len(class_names) diff --git a/autoware_ml/detection3d/datasets/t4dataset.py b/autoware_ml/detection3d/datasets/t4dataset.py index 526150755..d7fed6256 100644 --- a/autoware_ml/detection3d/datasets/t4dataset.py +++ b/autoware_ml/detection3d/datasets/t4dataset.py @@ -191,8 +191,8 @@ def parse_data_info(self, info: dict) -> dict: info["lidar2img"] = np.array(info["images"][self.default_cam_key]["lidar2img"]) else: info["lidar2img"] = info["cam2img"] @ info["lidar2cam"] - + # Default difficulty to 0 if not present - if 'difficulty' not in info: - info['difficulty'] = 0 + if "difficulty" not in info: + info["difficulty"] = 0 return info diff --git a/autoware_ml/detection3d/datasets/transforms/__init__.py b/autoware_ml/detection3d/datasets/transforms/__init__.py index dc95d27f8..b517bf1ea 100644 --- a/autoware_ml/detection3d/datasets/transforms/__init__.py +++ b/autoware_ml/detection3d/datasets/transforms/__init__.py @@ -1,4 +1,4 @@ -from .object_min_points_filter import ObjectMinPointsFilter from .loading import LoadPointsFromCurrentFileSweep +from .object_min_points_filter import ObjectMinPointsFilter __all__ = ["ObjectMinPointsFilter", "LoadPointsFromCurrentFileSweep"] diff --git a/autoware_ml/detection3d/datasets/transforms/loading.py b/autoware_ml/detection3d/datasets/transforms/loading.py index 535653d9b..09beddc34 100644 --- a/autoware_ml/detection3d/datasets/transforms/loading.py +++ b/autoware_ml/detection3d/datasets/transforms/loading.py @@ -1,15 +1,14 @@ from typing import List, Optional, Union from mmcv.transforms import BaseTransform -from mmdet3d.structures.ops import box_np_ops from mmdet3d.datasets.transforms import LoadPointsFromFile, LoadPointsFromMultiSweeps +from mmdet3d.structures.ops import box_np_ops from mmengine.registry import TRANSFORMS - @TRANSFORMS.register_module() class LoadPointsFromCurrentFileSweep(BaseTransform): - """Load points from the current file and sweep. + """Load points from the current file and sweep. This is used to load the points from the current file and sweep for copy-paste augmentation. Args: @@ -20,24 +19,32 @@ class LoadPointsFromCurrentFileSweep(BaseTransform): corresponding backend. Defaults to None. """ - def __init__(self, - coord_type: str, - load_dim: int = 6, - use_dim: Union[int, List[int]] = [0, 1, 2], - shift_height: bool = False, - use_color: bool = False, - norm_intensity: bool = False, - norm_elongation: bool = False, - backend_args: Optional[dict] = None, - sweeps_num: int = 10, - pad_empty_sweeps: bool = False, - remove_close: bool = False, - test_mode: bool = False - ) -> None: - - self.points_loader = LoadPointsFromFile(coord_type=coord_type, load_dim=load_dim, use_dim=use_dim, backend_args=backend_args) + def __init__( + self, + coord_type: str, + load_dim: int = 6, + use_dim: Union[int, List[int]] = [0, 1, 2], + shift_height: bool = False, + use_color: bool = False, + norm_intensity: bool = False, + norm_elongation: bool = False, + backend_args: Optional[dict] = None, + sweeps_num: int = 10, + pad_empty_sweeps: bool = False, + remove_close: bool = False, + test_mode: bool = False, + ) -> None: + + self.points_loader = LoadPointsFromFile( + coord_type=coord_type, load_dim=load_dim, use_dim=use_dim, backend_args=backend_args + ) if sweeps_num > 0: - self.points_from_multi_sweeps_loader = LoadPointsFromMultiSweeps(sweeps_num=sweeps_num, pad_empty_sweeps=pad_empty_sweeps, remove_close=remove_close, test_mode=test_mode) + self.points_from_multi_sweeps_loader = LoadPointsFromMultiSweeps( + sweeps_num=sweeps_num, + pad_empty_sweeps=pad_empty_sweeps, + remove_close=remove_close, + test_mode=test_mode, + ) else: self.points_from_multi_sweeps_loader = None diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index da056efcc..b62113f65 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -13,9 +13,9 @@ from mmdet3d.structures import xywhr2xyxyr from mmdet.models.task_modules import AssignResult, PseudoSampler, build_assigner, build_bbox_coder, build_sampler from mmdet.models.utils import multi_apply +from mmengine.logging import print_log from mmengine.structures import InstanceData from torch import nn -from mmengine.logging import print_log def clip_sigmoid(x, eps=1e-4): @@ -71,7 +71,7 @@ def __init__( test_cfg=None, bbox_coder=None, partial_ignore_labels=None, - partial_ignore_dense_heatmap=False + partial_ignore_dense_heatmap=False, ): super().__init__() self.class_names = class_names @@ -187,17 +187,24 @@ def __init__( cluster["class_indices"] = sorted( [self.class_name_to_indices[class_name] for class_name in cluster["class_names"]] ) - + # If true, only compute loss for traffic cone and barrier when it's available in the frame if partial_ignore_labels is not None: - assert loss_heatmap['reduction'] == 'none', "Loss reduction must be 'none' for partial traffic cone and barrier" - self.partial_ignore_labels = [self.class_name_to_indices[class_name] for class_name in partial_ignore_labels] + assert ( + loss_heatmap["reduction"] == "none" + ), "Loss reduction must be 'none' for partial traffic cone and barrier" + self.partial_ignore_labels = [ + self.class_name_to_indices[class_name] for class_name in partial_ignore_labels + ] else: self.partial_ignore_labels = None - + self.partial_ignore_dense_heatmap = partial_ignore_dense_heatmap - print_log(f"BEVFusionHead Partial ignore labels: {self.partial_ignore_labels}, partial ignore dense heatmap: {self.partial_ignore_dense_heatmap}, dense heatmap pooling classes: \ - {self.dense_heatmap_pooling_classes}, class_names: {self.class_names}", logger="current") + print_log( + f"BEVFusionHead Partial ignore labels: {self.partial_ignore_labels}, partial ignore dense heatmap: {self.partial_ignore_dense_heatmap}, dense heatmap pooling classes: \ + {self.dense_heatmap_pooling_classes}, class_names: {self.class_names}", + logger="current", + ) def create_2D_grid(self, x_size, y_size): meshgrid = [[0, x_size - 1, x_size], [0, y_size - 1, y_size]] @@ -469,7 +476,9 @@ def predict_by_feat(self, preds_dicts, metas, img=None, rescale=False, for_roi=F return rets[0] - def get_targets(self, batch_gt_instances_3d: List[InstanceData], preds_dict: List[dict], batch_metadata: List[dict]): + def get_targets( + self, batch_gt_instances_3d: List[InstanceData], preds_dict: List[dict], batch_metadata: List[dict] + ): """Generate training targets. Args: batch_gt_instances_3d (List[InstanceData]): @@ -579,7 +588,7 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): num_layer = self.num_decoder_layers else: num_layer = 1 - + assign_result_list = [] for idx_layer in range(num_layer): bboxes_tensor_layer = bboxes_tensor[ @@ -653,10 +662,10 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): label_weights[pos_inds] = 1.0 else: label_weights[pos_inds] = self.train_cfg.pos_weight - + if len(neg_inds) > 0: label_weights[neg_inds] = 1.0 - + # # compute dense heatmap targets device = labels.device gt_bboxes_3d = torch.cat([gt_bboxes_3d.gravity_center, gt_bboxes_3d.tensor[:, 3:]], dim=1).to(device) @@ -692,12 +701,10 @@ def get_targets_single(self, gt_instances_3d, preds_dict, batch_idx, metadata): # Ignore labels for traffic cone and barrier traffic_cone_barrier_status = metadata.get("traffic_cone_barrier_status", True) if self.partial_ignore_labels is not None and not traffic_cone_barrier_status: - heatmap_weights[self.partial_ignore_labels] = 0.0 # Set to 0 to ignore these grids + heatmap_weights[self.partial_ignore_labels] = 0.0 # Set to 0 to ignore these grids if len(neg_inds) > 0: # neg_inds [N] and column indices [K] must broadcast (not pair); - _cols = torch.as_tensor( - self.partial_ignore_labels, device=label_weights.device, dtype=torch.long - ) + _cols = torch.as_tensor(self.partial_ignore_labels, device=label_weights.device, dtype=torch.long) label_weights[neg_inds.unsqueeze(1), _cols.unsqueeze(0)] = 0.0 return ( @@ -732,7 +739,9 @@ def loss(self, batch_feats, batch_data_samples): return loss - def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: List[InstanceData], batch_input_metas): + def loss_by_feat( + self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: List[InstanceData], batch_input_metas + ): ( labels, label_weights, @@ -775,7 +784,7 @@ def loss_by_feat(self, preds_dicts: Tuple[List[dict]], batch_gt_instances_3d: Li # (Batch, num_classes) for cls_i, class_name in enumerate(self.class_names): loss_dict[f"loss_heatmap_{class_name}"] = loss_heatmap_cls[cls_i] - + # Prevent loss item to avoid computing gradients twice. This is for logging. loss_dict["total_dense_heatmap"] = loss_heatmap_cls.sum() diff --git a/projects/BEVFusion/bevfusion/utils.py b/projects/BEVFusion/bevfusion/utils.py index b6bd2be41..8fd83a0c5 100644 --- a/projects/BEVFusion/bevfusion/utils.py +++ b/projects/BEVFusion/bevfusion/utils.py @@ -259,10 +259,10 @@ def assign(self, bboxes, gt_bboxes, gt_labels, cls_pred, train_cfg, ignore_label reg_cost = self.reg_cost(bboxes, gt_bboxes, train_cfg) iou = self.iou_calculator(bboxes, gt_bboxes) iou_cost = self.iou_cost(iou) - + # weighted sum of above three costs cost = cls_cost + reg_cost + iou_cost - + # if ignore_labels is not None: # preds_labels = pred_instances.scores.argmax(dim=1, keepdim=False) # print("shape of pred_instances.scores, preds_labels", pred_instances.scores.shape, preds_labels.shape) diff --git a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py index 023c6774d..809179b20 100644 --- a/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/models/default_lidar_second_secfpn_120m.py @@ -114,6 +114,6 @@ ), loss_heatmap=dict(type="mmdet.GaussianFocalLoss", reduction="mean", loss_weight=1.0), loss_bbox=dict(type="mmdet.L1Loss", reduction="mean", loss_weight=0.25), - partial_ignore_labels=None + partial_ignore_labels=None, ), ) diff --git a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py index 9c7e02977..e2de195e9 100644 --- a/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py +++ b/projects/BEVFusion/configs/t4dataset/default/pipelines/default_lidar_intensity_120m.py @@ -13,8 +13,8 @@ "bus": 120, "bicycle": 120, "pedestrian": 120, - "traffic_cone": 120, - "barrier": 120, + "traffic_cone": 120, + "barrier": 120, } # LiDAR parameters @@ -132,7 +132,7 @@ "timestamp", "vehicle_type", "city", - "traffic_cone_barrier_status", + "traffic_cone_barrier_status", ], ), ] diff --git a/tools/detection3d/create_data_t4dataset.py b/tools/detection3d/create_data_t4dataset.py index 9550b2872..3b02017e0 100644 --- a/tools/detection3d/create_data_t4dataset.py +++ b/tools/detection3d/create_data_t4dataset.py @@ -273,7 +273,7 @@ def main(): if cfg.filter_attributes is None: print_log("No attribute filtering is applied!") - + remove_non_traffic_cone_barrier = cfg.get("remove_non_traffic_cone_barrier", False) # Get every pair of min-max distance filtering thresholds bev_distance_ranges = [] @@ -310,9 +310,14 @@ def main(): ) dataset_scene_info = scene_id.split("/") if len(dataset_scene_info) == 5: - t4_dataset_id, t4_dataset_version_id, city, vehicle_type, traffic_cone_barrier_status = dataset_scene_info + t4_dataset_id, t4_dataset_version_id, city, vehicle_type, traffic_cone_barrier_status = ( + dataset_scene_info + ) if remove_non_traffic_cone_barrier and traffic_cone_barrier_status == "false": - print_log(f"Skipping scene: {scene_id} because it does not have traffic cone or barrier", logger="current") + print_log( + f"Skipping scene: {scene_id} because it does not have traffic cone or barrier", + logger="current", + ) continue elif len(dataset_scene_info) == 2: t4_dataset_id, t4_dataset_version_id = dataset_scene_info @@ -336,7 +341,9 @@ def main(): infos = [] for i in range(0, len(t4.sample), sample_steps): sample = t4.sample[i] - info = get_info(cfg, t4, sample, i, args.max_sweeps, traffic_cone_barrier_status, city, vehicle_type) + info = get_info( + cfg, t4, sample, i, args.max_sweeps, traffic_cone_barrier_status, city, vehicle_type + ) if info is None: continue # info["version"] = dataset_version # used for visualizations during debugging. diff --git a/tools/detection3d/t4dataset_converters/t4converter.py b/tools/detection3d/t4dataset_converters/t4converter.py index 5dfd1dc1f..ccc88b2d1 100644 --- a/tools/detection3d/t4dataset_converters/t4converter.py +++ b/tools/detection3d/t4dataset_converters/t4converter.py @@ -626,7 +626,7 @@ def get_lidarseg_annotations( ) -> dict: if not hasattr(t4, "lidarseg") or not t4.lidarseg: return dict() - + if sd_record.info_filename is None: print(f"sample {lidar_token} doesn't have lidar info_filename") return dict() From 15bbf0ef0920f41f6e267b312447d2900b5bd8fd Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Thu, 7 May 2026 15:35:46 +0900 Subject: [PATCH 65/68] remove unecessary changes --- .../t4dataset/j6gen2_base_traffic_cone.py | 211 ------------------ .../t4dataset/jpntaxi_base_traffic_cone.py | 202 ----------------- .../datasets/transforms/__init__.py | 3 +- .../datasets/transforms/loading.py | 55 ----- .../BEVFusion/bevfusion/bevfusion_head.py | 14 +- projects/BEVFusion/bevfusion/utils.py | 9 +- 6 files changed, 6 insertions(+), 488 deletions(-) delete mode 100644 autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py delete mode 100644 autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py delete mode 100644 autoware_ml/detection3d/datasets/transforms/loading.py diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py deleted file mode 100644 index 176763b54..000000000 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_base_traffic_cone.py +++ /dev/null @@ -1,211 +0,0 @@ -custom_imports = dict( - imports=[ - "autoware_ml.detection3d.datasets.t4dataset", - "autoware_ml.detection3d.evaluation.t4metric.t4metric", - "autoware_ml.detection3d.evaluation.t4metric.t4metric_v2", - ] -) - -# dataset type setting -dataset_type = "T4Dataset" -info_train_file_name = "t4dataset_j6gen2_base_traffic_cone_infos_train.pkl" -info_val_file_name = "t4dataset_j6gen2_base_traffic_cone_infos_val.pkl" -info_test_file_name = "t4dataset_j6gen2_base_traffic_cone_infos_test.pkl" - -info_train_statistics_file_name = "t4dataset_j6gen2_base_traffic_cone_statistics_train.parquet" -info_val_statistics_file_name = "t4dataset_j6gen2_base_traffic_cone_statistics_val.parquet" -info_test_statistics_file_name = "t4dataset_j6gen2_base_traffic_cone_statistics_test.parquet" - -# dataset scene setting -dataset_version_list = [ - "db_j6gen2_v1", - "db_j6gen2_v2", - "db_j6gen2_v3", - "db_j6gen2_v4", - "db_j6gen2_v5", - "db_j6gen2_v6", - "db_j6gen2_v7", - "db_j6gen2_v8", - "db_j6gen2_v9", - "db_largebus_v1", - "db_largebus_v2", - "db_largebus_v3", -] - -dataset_test_groups = { - "largebus": ("t4dataset_largebus_traffic_cone_infos_test.pkl", False), - "j6gen2": ("t4dataset_j6gen2_traffic_cone_infos_test.pkl", False), - "j6gen2_base": ("t4dataset_j6gen2_base_traffic_cone_infos_test.pkl", True), -} - -# dataset format setting -data_prefix = dict( - pts="", - CAM_FRONT="", - CAM_FRONT_LEFT="", - CAM_FRONT_RIGHT="", - CAM_BACK="", - CAM_BACK_RIGHT="", - CAM_BACK_LEFT="", - sweeps="", -) - -camera_types = { - "CAM_FRONT", - "CAM_FRONT_RIGHT", - "CAM_FRONT_LEFT", - "CAM_BACK", - "CAM_BACK_LEFT", - "CAM_BACK_RIGHT", -} - -# class setting -name_mapping = { - # DBv1.0 - "vehicle.car": "car", - "vehicle.construction": "truck", - "vehicle.emergency (ambulance & police)": "car", - "vehicle.motorcycle": "bicycle", - "vehicle.trailer": "trailer", - "vehicle.truck": "truck", - "vehicle.bicycle": "bicycle", - "vehicle.bus (bendy & rigid)": "bus", - "pedestrian.adult": "pedestrian", - "pedestrian.child": "pedestrian", - "pedestrian.construction_worker": "pedestrian", - "pedestrian.personal_mobility": "pedestrian", - "pedestrian.police_officer": "pedestrian", - "pedestrian.stroller": "pedestrian", - "pedestrian.wheelchair": "pedestrian", - "movable_object.barrier": "barrier", - "movable_object.debris": "barrier", - "movable_object.pushable_pullable": "barrier", - "movable_object.trafficcone": "traffic_cone", - "movable_object.traffic_cone": "traffic_cone", - "animal": "animal", - "static_object.bicycle_rack": "bicycle_rack", - # DBv1.1 and UCv2.0 - "car": "car", - "truck": "truck", - "bus": "bus", - "trailer": "trailer", - "motorcycle": "bicycle", - "bicycle": "bicycle", - "police_car": "car", - "pedestrian": "pedestrian", - "police_officer": "pedestrian", - "forklift": "car", - "construction_worker": "pedestrian", - "stroller": "pedestrian", - # DBv2.0 and DBv3.0 - "animal": "animal", - "movable_object.barrier": "barrier", - "movable_object.pushable_pullable": "barrier", - "movable_object.traffic_cone": "traffic_cone", - "pedestrian.adult": "pedestrian", - "pedestrian.child": "pedestrian", - "pedestrian.construction_worker": "pedestrian", - "pedestrian.personal_mobility": "pedestrian", - "pedestrian.police_officer": "pedestrian", - "pedestrian.stroller": "pedestrian", - "pedestrian.wheelchair": "pedestrian", - "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "bollard", - "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car - "vehicle.bicycle": "bicycle", - "vehicle.bus": "bus", - "vehicle.car": "car", - "vehicle.construction": "truck", - "vehicle.fire": "truck", - "vehicle.motorcycle": "bicycle", - "vehicle.police": "car", - "vehicle.trailer": "trailer", - "vehicle.truck": "truck", - # DBv1.3 - "ambulance": "car", - "kart": "car", - "wheelchair": "pedestrian", - "personal_mobility": "pedestrian", - "fire_truck": "truck", - "semi_trailer": "trailer", - "tractor_unit": "truck", - "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", - "barrier": "barrier", -} - - -class_names = [ - "car", - "truck", - "bus", - "bicycle", - "pedestrian", - "traffic_cone", - "barrier", -] -num_class = len(class_names) -metainfo = dict(classes=class_names) - -merge_objects = [ - ("truck", ["truck", "trailer"]), -] -merge_type = "extend_longer" # One of ["extend_longer","union", None] - -# visualization -class_colors = { - "car": (30, 144, 255), - "truck": (140, 0, 255), - "construction_vehicle": (255, 255, 0), - "bus": (111, 255, 111), - "trailer": (0, 255, 255), - "barrier": (0, 0, 0), - "motorcycle": (100, 0, 30), - "bicycle": (255, 0, 30), - "pedestrian": (255, 200, 200), - "traffic_cone": (120, 120, 120), -} -camera_panels = [ - "data/CAM_FRONT_LEFT", - "data/CAM_FRONT", - "data/CAM_FRONT_RIGHT", - "data/CAM_BACK_LEFT", - "data/CAM_BACK", - "data/CAM_BACK_RIGHT", -] - -filter_attributes = [ - ("vehicle.bicycle", "vehicle_state.parked"), - ("vehicle.bicycle", "cycle_state.without_rider"), - ("vehicle.bicycle", "motorcycle_state.without_rider"), - ("vehicle.motorcycle", "vehicle_state.parked"), - ("vehicle.motorcycle", "cycle_state.without_rider"), - ("vehicle.motorcycle", "motorcycle_state.without_rider"), - ("bicycle", "vehicle_state.parked"), - ("bicycle", "cycle_state.without_rider"), - ("bicycle", "motorcycle_state.without_rider"), - ("motorcycle", "vehicle_state.parked"), - ("motorcycle", "cycle_state.without_rider"), - ("motorcycle", "motorcycle_state.without_rider"), -] - -evaluator_metric_configs = dict( - evaluation_task="detection", - target_labels=class_names, - center_distance_bev_thresholds=[0.5, 1.0, 2.0, 4.0], - # plane_distance_thresholds is required for the pass fail evaluation - plane_distance_thresholds=[2.0, 4.0], - iou_2d_thresholds=None, - iou_3d_thresholds=None, - label_prefix="autoware", - # bev minimum distance ranges for each range bucket, must be the same length as max_distance, - # they will form bev distance ranges in [(min_distance[0], max_distance[0]), (min_distance[1], max_distance[1]), ...] when filtering - min_distance=[0.0, 50.0, 90.0, 0.0], - # bev maximum distance ranges for each range bucket, must be the same length as min_distance - max_distance=[50.0, 90.0, 121.0, 121.0], - min_point_numbers=0, - matching_class_agnostic_fps=False, -) - -remove_non_traffic_cone_barrier = True diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py b/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py deleted file mode 100644 index 61e9e915c..000000000 --- a/autoware_ml/configs/detection3d/dataset/t4dataset/jpntaxi_base_traffic_cone.py +++ /dev/null @@ -1,202 +0,0 @@ -custom_imports = dict( - imports=[ - "autoware_ml.detection3d.datasets.t4dataset", - "autoware_ml.detection3d.evaluation.t4metric.t4metric", - "autoware_ml.detection3d.evaluation.t4metric.t4metric_v2", - ] -) - -# dataset type setting -dataset_type = "T4Dataset" -info_train_file_name = "t4dataset_jpntaxi_base_traffic_cone_infos_train.pkl" -info_val_file_name = "t4dataset_jpntaxi_base_traffic_cone_infos_val.pkl" -info_test_file_name = "t4dataset_jpntaxi_base_traffic_cone_infos_test.pkl" - -info_train_statistics_file_name = "t4dataset_jpntaxi_base_traffic_cone_statistics_train.parquet" -info_val_statistics_file_name = "t4dataset_jpntaxi_base_traffic_cone_statistics_val.parquet" -info_test_statistics_file_name = "t4dataset_jpntaxi_base_traffic_cone_statistics_test.parquet" - -# dataset scene setting -dataset_test_groups = { - "jpntaxi_base_traffic_cone": ("t4dataset_jpntaxi_base_traffic_cone_infos_test.pkl", True), -} - -dataset_version_list = [ - "db_jpntaxigen2_v1", - "db_jpntaxigen2_v2", - "db_jpntaxi_v1", - "db_jpntaxi_v2", - "db_jpntaxi_v4", -] - -# dataset format setting -data_prefix = dict( - pts="", - CAM_FRONT="", - CAM_FRONT_LEFT="", - CAM_FRONT_RIGHT="", - CAM_BACK="", - CAM_BACK_RIGHT="", - CAM_BACK_LEFT="", - sweeps="", -) -camera_types = { - "CAM_FRONT", - "CAM_FRONT_RIGHT", - "CAM_FRONT_LEFT", - "CAM_BACK", - "CAM_BACK_LEFT", - "CAM_BACK_RIGHT", -} - -# class setting -name_mapping = { - # DBv1.0 - "vehicle.car": "car", - "vehicle.construction": "truck", - "vehicle.emergency (ambulance & police)": "car", - "vehicle.motorcycle": "bicycle", - "vehicle.trailer": "trailer", - "vehicle.truck": "truck", - "vehicle.bicycle": "bicycle", - "vehicle.bus (bendy & rigid)": "bus", - "pedestrian.adult": "pedestrian", - "pedestrian.child": "pedestrian", - "pedestrian.construction_worker": "pedestrian", - "pedestrian.personal_mobility": "pedestrian", - "pedestrian.police_officer": "pedestrian", - "pedestrian.stroller": "pedestrian", - "pedestrian.wheelchair": "pedestrian", - "movable_object.barrier": "barrier", - "movable_object.debris": "barrier", - "movable_object.pushable_pullable": "barrier", - "movable_object.trafficcone": "traffic_cone", - "movable_object.traffic_cone": "traffic_cone", - "animal": "animal", - "static_object.bicycle_rack": "bicycle_rack", - # DBv1.1 and UCv2.0 - "car": "car", - "truck": "truck", - "bus": "bus", - "trailer": "trailer", - "motorcycle": "bicycle", - "bicycle": "bicycle", - "police_car": "car", - "pedestrian": "pedestrian", - "police_officer": "pedestrian", - "forklift": "car", - "construction_worker": "pedestrian", - "stroller": "pedestrian", - # DBv2.0 and DBv3.0 - "animal": "animal", - "movable_object.barrier": "barrier", - "movable_object.pushable_pullable": "barrier", - "movable_object.traffic_cone": "traffic_cone", - "pedestrian.adult": "pedestrian", - "pedestrian.child": "pedestrian", - "pedestrian.construction_worker": "pedestrian", - "pedestrian.personal_mobility": "pedestrian", - "pedestrian.police_officer": "pedestrian", - "pedestrian.stroller": "pedestrian", - "pedestrian.wheelchair": "pedestrian", - "static_object.bicycle rack": "bicycle rack", - "static_object.bollard": "bollard", - "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car - "vehicle.bicycle": "bicycle", - "vehicle.bus": "bus", - "vehicle.car": "car", - "vehicle.construction": "truck", - "vehicle.fire": "truck", - "vehicle.motorcycle": "bicycle", - "vehicle.police": "car", - "vehicle.trailer": "trailer", - "vehicle.truck": "truck", - # DBv1.3 - "ambulance": "car", - "kart": "car", - "wheelchair": "pedestrian", - "personal_mobility": "pedestrian", - "fire_truck": "truck", - "semi_trailer": "trailer", - "tractor_unit": "truck", - "construction_vehicle": "truck", - "traffic_cone": "traffic_cone", - "trafficcone": "traffic_cone", - "barrier": "barrier", -} - -class_names = [ - "car", - "truck", - "bus", - "bicycle", - "pedestrian", - "traffic_cone", - "barrier", -] - -num_class = len(class_names) -metainfo = dict(classes=class_names) - -merge_objects = [ - ("truck", ["truck", "trailer"]), -] -merge_type = "extend_longer" # One of ["extend_longer","union", None] - -# visualization -class_colors = { - "car": (30, 144, 255), - "truck": (140, 0, 255), - "construction_vehicle": (255, 255, 0), - "bus": (111, 255, 111), - "trailer": (0, 255, 255), - "barrier": (0, 0, 0), - "motorcycle": (100, 0, 30), - "bicycle": (255, 0, 30), - "pedestrian": (255, 200, 200), - "traffic_cone": (120, 120, 120), -} -camera_panels = [ - "data/CAM_FRONT_LEFT", - "data/CAM_FRONT", - "data/CAM_FRONT_RIGHT", - "data/CAM_BACK_LEFT", - "data/CAM_BACK", - "data/CAM_BACK_RIGHT", -] - -# Add filter attributes -filter_attributes = [ - ("vehicle.bicycle", "vehicle_state.parked"), - ("vehicle.bicycle", "cycle_state.without_rider"), - ("vehicle.bicycle", "motorcycle_state.without_rider"), - ("vehicle.motorcycle", "vehicle_state.parked"), - ("vehicle.motorcycle", "cycle_state.without_rider"), - ("vehicle.motorcycle", "motorcycle_state.without_rider"), - ("bicycle", "vehicle_state.parked"), - ("bicycle", "cycle_state.without_rider"), - ("bicycle", "motorcycle_state.without_rider"), - ("motorcycle", "vehicle_state.parked"), - ("motorcycle", "cycle_state.without_rider"), - ("motorcycle", "motorcycle_state.without_rider"), -] - -evaluator_metric_configs = dict( - evaluation_task="detection", - target_labels=class_names, - center_distance_bev_thresholds=[0.5, 1.0, 2.0, 4.0], - # plane_distance_thresholds is required for the pass fail evaluation - plane_distance_thresholds=[2.0, 4.0], - iou_2d_thresholds=None, - iou_3d_thresholds=None, - label_prefix="autoware", - # bev minimum distance ranges for each range bucket, must be the same length as max_distance, - # they will form bev distance ranges in [(min_distance[0], max_distance[0]), (min_distance[1], max_distance[1]), ...] when filtering - min_distance=[0.0, 50.0, 90.0, 0.0], - # bev maximum distance ranges for each range bucket, must be the same length as min_distance - max_distance=[50.0, 90.0, 121.0, 121.0], - min_point_numbers=0, - matching_class_agnostic_fps=False, -) - -remove_non_traffic_cone_barrier = True diff --git a/autoware_ml/detection3d/datasets/transforms/__init__.py b/autoware_ml/detection3d/datasets/transforms/__init__.py index b517bf1ea..6bc932f1a 100644 --- a/autoware_ml/detection3d/datasets/transforms/__init__.py +++ b/autoware_ml/detection3d/datasets/transforms/__init__.py @@ -1,4 +1,3 @@ -from .loading import LoadPointsFromCurrentFileSweep from .object_min_points_filter import ObjectMinPointsFilter -__all__ = ["ObjectMinPointsFilter", "LoadPointsFromCurrentFileSweep"] +__all__ = ["ObjectMinPointsFilter"] diff --git a/autoware_ml/detection3d/datasets/transforms/loading.py b/autoware_ml/detection3d/datasets/transforms/loading.py deleted file mode 100644 index 09beddc34..000000000 --- a/autoware_ml/detection3d/datasets/transforms/loading.py +++ /dev/null @@ -1,55 +0,0 @@ -from typing import List, Optional, Union - -from mmcv.transforms import BaseTransform -from mmdet3d.datasets.transforms import LoadPointsFromFile, LoadPointsFromMultiSweeps -from mmdet3d.structures.ops import box_np_ops -from mmengine.registry import TRANSFORMS - - -@TRANSFORMS.register_module() -class LoadPointsFromCurrentFileSweep(BaseTransform): - """Load points from the current file and sweep. - This is used to load the points from the current file and sweep for copy-paste augmentation. - - Args: - coord_type (str): The type of coordinates of points cloud. - load_dim (int): The dimension of the loaded points. - use_dim (list[int] | int): Which dimensions of the points to use. - backend_args (dict, optional): Arguments to instantiate the - corresponding backend. Defaults to None. - """ - - def __init__( - self, - coord_type: str, - load_dim: int = 6, - use_dim: Union[int, List[int]] = [0, 1, 2], - shift_height: bool = False, - use_color: bool = False, - norm_intensity: bool = False, - norm_elongation: bool = False, - backend_args: Optional[dict] = None, - sweeps_num: int = 10, - pad_empty_sweeps: bool = False, - remove_close: bool = False, - test_mode: bool = False, - ) -> None: - - self.points_loader = LoadPointsFromFile( - coord_type=coord_type, load_dim=load_dim, use_dim=use_dim, backend_args=backend_args - ) - if sweeps_num > 0: - self.points_from_multi_sweeps_loader = LoadPointsFromMultiSweeps( - sweeps_num=sweeps_num, - pad_empty_sweeps=pad_empty_sweeps, - remove_close=remove_close, - test_mode=test_mode, - ) - else: - self.points_from_multi_sweeps_loader = None - - def transform(self, results: dict) -> dict: - points = self.points_loader(results) - if self.points_from_multi_sweeps_loader is not None: - points = self.points_from_multi_sweeps_loader(points) - return points diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index b62113f65..dd566eab1 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -70,9 +70,7 @@ def __init__( train_cfg=None, test_cfg=None, bbox_coder=None, - partial_ignore_labels=None, - partial_ignore_dense_heatmap=False, - ): + partial_ignore_labels=None): super().__init__() self.class_names = class_names self.num_classes = len(self.class_names) @@ -198,13 +196,9 @@ def __init__( ] else: self.partial_ignore_labels = None - - self.partial_ignore_dense_heatmap = partial_ignore_dense_heatmap - print_log( - f"BEVFusionHead Partial ignore labels: {self.partial_ignore_labels}, partial ignore dense heatmap: {self.partial_ignore_dense_heatmap}, dense heatmap pooling classes: \ - {self.dense_heatmap_pooling_classes}, class_names: {self.class_names}", - logger="current", - ) + + print_log(f"BEVFusionHead Partial ignore labels: {self.partial_ignore_labels}, dense heatmap pooling classes: \ + {self.dense_heatmap_pooling_classes}, class_names: {self.class_names}", logger="current") def create_2D_grid(self, x_size, y_size): meshgrid = [[0, x_size - 1, x_size], [0, y_size - 1, y_size]] diff --git a/projects/BEVFusion/bevfusion/utils.py b/projects/BEVFusion/bevfusion/utils.py index 8fd83a0c5..c47604dbd 100644 --- a/projects/BEVFusion/bevfusion/utils.py +++ b/projects/BEVFusion/bevfusion/utils.py @@ -238,7 +238,7 @@ def __init__( self.iou_cost = TASK_UTILS.build(iou_cost) self.iou_calculator = TASK_UTILS.build(iou_calculator) - def assign(self, bboxes, gt_bboxes, gt_labels, cls_pred, train_cfg, ignore_labels=None): + def assign(self, bboxes, gt_bboxes, gt_labels, cls_pred, train_cfg): num_gts, num_bboxes = gt_bboxes.size(0), bboxes.size(0) # 1. assign -1 by default @@ -263,13 +263,6 @@ def assign(self, bboxes, gt_bboxes, gt_labels, cls_pred, train_cfg, ignore_label # weighted sum of above three costs cost = cls_cost + reg_cost + iou_cost - # if ignore_labels is not None: - # preds_labels = pred_instances.scores.argmax(dim=1, keepdim=False) - # print("shape of pred_instances.scores, preds_labels", pred_instances.scores.shape, preds_labels.shape) - # ignore_preds_masks = preds_labels.isin(ignore_labels) - # cost[ignore_preds_masks] = 10000 - # print("shape of ignore_preds_masks, cost", ignore_preds_masks.shape, cost.shape) - # 3. do Hungarian matching on CPU using linear_sum_assignment cost = cost.detach().cpu() if linear_sum_assignment is None: From 1323d4ed662678fc225ca43ef7baaf5a8b144cc1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 06:36:38 +0000 Subject: [PATCH 66/68] ci(pre-commit): autofix --- projects/BEVFusion/bevfusion/bevfusion_head.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/BEVFusion/bevfusion/bevfusion_head.py b/projects/BEVFusion/bevfusion/bevfusion_head.py index dd566eab1..c37c5a538 100644 --- a/projects/BEVFusion/bevfusion/bevfusion_head.py +++ b/projects/BEVFusion/bevfusion/bevfusion_head.py @@ -70,7 +70,8 @@ def __init__( train_cfg=None, test_cfg=None, bbox_coder=None, - partial_ignore_labels=None): + partial_ignore_labels=None, + ): super().__init__() self.class_names = class_names self.num_classes = len(self.class_names) @@ -196,7 +197,7 @@ def __init__( ] else: self.partial_ignore_labels = None - + print_log(f"BEVFusionHead Partial ignore labels: {self.partial_ignore_labels}, dense heatmap pooling classes: \ {self.dense_heatmap_pooling_classes}, class_names: {self.class_names}", logger="current") From 585a0b2b068d5c721d657a93e15bbbe6f904cf45 Mon Sep 17 00:00:00 2001 From: Kok Seang Tan Date: Thu, 7 May 2026 20:15:05 +0900 Subject: [PATCH 67/68] remove unecessary changes --- Dockerfile | 6 +- .../dataset/t4dataset/j6gen2_v2.py | 194 ++++++++++++++++++ ...second_secfpn_30e_8xb8_j6gen2_base_120m.py | 2 +- ...n_30e_8xb8_j6gen2_base_120m_t4metric_v2.py | 4 +- ...econd_secfpn_30e_8xb8_jpntaxi_base_120m.py | 8 +- ..._30e_8xb8_jpntaxi_base_120m_t4metric_v2.py | 4 +- 6 files changed, 207 insertions(+), 11 deletions(-) create mode 100644 autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_v2.py diff --git a/Dockerfile b/Dockerfile index 3e9caecb9..2fbcaa620 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,13 +61,15 @@ RUN python3 -m pip --no-cache-dir install \ RUN python3 -m pip install git+https://github.com/tier4/t4-devkit@v0.5.1 # Install autoware-perception-evaluation -RUN python3 -m pip install git+https://github.com/tier4/autoware_perception_evaluation@9d8c9773d35177bb0b7f2606f429f58a5fb708ca +RUN python3 -m pip install git+https://github.com/tier4/autoware_perception_evaluation@3c9577dc23fd76a049559b42656ca46c1c32fa66 # Need to dowgrade setuptools to 60.2.0 to fix setup RUN python3 -m pip --no-cache-dir install \ setuptools==60.2.0 \ transformers==4.51.3 \ - polars==1.37.1 + polars==1.37.1 \ + onnx_graphsurgeon==0.5.8 \ + spconv-cu126==2.3.8 # NOTE(knzo25): this patch is needed to use numpy versions over 1.23.5 (version used in mmdet3d 1.4.0) # It can be safely deleted when mmdet3d updates the numpy version diff --git a/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_v2.py b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_v2.py new file mode 100644 index 000000000..e4375d576 --- /dev/null +++ b/autoware_ml/configs/detection3d/dataset/t4dataset/j6gen2_v2.py @@ -0,0 +1,194 @@ +custom_imports = dict( + imports=[ + "autoware_ml.detection3d.datasets.t4dataset", + "autoware_ml.detection3d.evaluation.t4metric.t4metric", + "autoware_ml.detection3d.evaluation.t4metric.t4metric_v2", + ] +) + +# dataset type setting +dataset_type = "T4Dataset" +info_train_file_name = "t4dataset_j6gen2_v2_infos_train.pkl" +info_val_file_name = "t4dataset_j6gen2_v2_infos_val.pkl" +info_test_file_name = "t4dataset_j6gen2_v2_infos_test.pkl" + +info_train_statistics_file_name = "t4dataset_j6gen2_v2_statistics_train.parquet" +info_val_statistics_file_name = "t4dataset_j6gen2_v2_statistics_val.parquet" +info_test_statistics_file_name = "t4dataset_j6gen2_v2_statistics_test.parquet" + +# dataset scene setting +dataset_version_list = [ + "db_j6gen2_v2", +] + +dataset_test_groups = { + "j6gen2_v2": ("t4dataset_j6gen2_v2_infos_test.pkl", True), +} + +# dataset format setting +data_prefix = dict( + pts="", + CAM_FRONT="", + CAM_FRONT_LEFT="", + CAM_FRONT_RIGHT="", + CAM_BACK="", + CAM_BACK_RIGHT="", + CAM_BACK_LEFT="", + sweeps="", +) +camera_types = { + "CAM_FRONT", + "CAM_FRONT_RIGHT", + "CAM_FRONT_LEFT", + "CAM_BACK", + "CAM_BACK_LEFT", + "CAM_BACK_RIGHT", +} + +# class setting +name_mapping = { + # DBv1.0 + "vehicle.car": "car", + "vehicle.construction": "truck", + "vehicle.emergency (ambulance & police)": "car", + "vehicle.motorcycle": "bicycle", + "vehicle.trailer": "trailer", + "vehicle.truck": "truck", + "vehicle.bicycle": "bicycle", + "vehicle.bus (bendy & rigid)": "bus", + "pedestrian.adult": "pedestrian", + "pedestrian.child": "pedestrian", + "pedestrian.construction_worker": "pedestrian", + "pedestrian.personal_mobility": "pedestrian", + "pedestrian.police_officer": "pedestrian", + "pedestrian.stroller": "pedestrian", + "pedestrian.wheelchair": "pedestrian", + "movable_object.barrier": "barrier", + "movable_object.debris": "barrier", + "movable_object.pushable_pullable": "barrier", + "movable_object.trafficcone": "traffic_cone", + "movable_object.traffic_cone": "traffic_cone", + "animal": "animal", + "static_object.bicycle_rack": "bicycle_rack", + # DBv1.1 and UCv2.0 + "car": "car", + "truck": "truck", + "bus": "bus", + "trailer": "trailer", + "motorcycle": "bicycle", + "bicycle": "bicycle", + "police_car": "car", + "pedestrian": "pedestrian", + "police_officer": "pedestrian", + "forklift": "car", + "construction_worker": "pedestrian", + "stroller": "pedestrian", + # DBv2.0 and DBv3.0 + "animal": "animal", + "movable_object.barrier": "barrier", + "movable_object.pushable_pullable": "barrier", + "movable_object.traffic_cone": "traffic_cone", + "pedestrian.adult": "pedestrian", + "pedestrian.child": "pedestrian", + "pedestrian.construction_worker": "pedestrian", + "pedestrian.personal_mobility": "pedestrian", + "pedestrian.police_officer": "pedestrian", + "pedestrian.stroller": "pedestrian", + "pedestrian.wheelchair": "pedestrian", + "static_object.bicycle rack": "bicycle rack", + "static_object.bollard": "bollard", + "vehicle.ambulance": "car", # Define vehicle.ambulance as car since vehicle.emergency (ambulance & police) is defined as car + "vehicle.bicycle": "bicycle", + "vehicle.bus": "bus", + "vehicle.car": "car", + "vehicle.construction": "truck", + "vehicle.fire": "truck", + "vehicle.motorcycle": "bicycle", + "vehicle.police": "car", + "vehicle.trailer": "trailer", + "vehicle.truck": "truck", + # DBv1.3 + "ambulance": "car", + "kart": "car", + "wheelchair": "pedestrian", + "personal_mobility": "pedestrian", + "fire_truck": "truck", + "semi_trailer": "trailer", + "tractor_unit": "truck", + "construction_vehicle": "truck", + "traffic_cone": "traffic_cone", + "trafficcone": "traffic_cone", + "barrier": "barrier", +} + +class_names = [ + "car", + "truck", + "bus", + "bicycle", + "pedestrian", + "traffic_cone", + "barrier", +] +num_class = len(class_names) +metainfo = dict(classes=class_names) + +merge_objects = [ + ("truck", ["truck", "trailer"]), +] +merge_type = "extend_longer" # One of ["extend_longer","union", None] + +# visualization +class_colors = { + "car": (30, 144, 255), + "truck": (140, 0, 255), + "construction_vehicle": (255, 255, 0), + "bus": (111, 255, 111), + "trailer": (0, 255, 255), + "barrier": (0, 0, 0), + "motorcycle": (100, 0, 30), + "bicycle": (255, 0, 30), + "pedestrian": (255, 200, 200), + "traffic_cone": (120, 120, 120), +} +camera_panels = [ + "data/CAM_FRONT_LEFT", + "data/CAM_FRONT", + "data/CAM_FRONT_RIGHT", + "data/CAM_BACK_LEFT", + "data/CAM_BACK", + "data/CAM_BACK_RIGHT", +] + +filter_attributes = [ + ("vehicle.bicycle", "vehicle_state.parked"), + ("vehicle.bicycle", "cycle_state.without_rider"), + ("vehicle.bicycle", "motorcycle_state.without_rider"), + ("vehicle.motorcycle", "vehicle_state.parked"), + ("vehicle.motorcycle", "cycle_state.without_rider"), + ("vehicle.motorcycle", "motorcycle_state.without_rider"), + ("bicycle", "vehicle_state.parked"), + ("bicycle", "cycle_state.without_rider"), + ("bicycle", "motorcycle_state.without_rider"), + ("motorcycle", "vehicle_state.parked"), + ("motorcycle", "cycle_state.without_rider"), + ("motorcycle", "motorcycle_state.without_rider"), +] + +evaluator_metric_configs = dict( + evaluation_task="detection", + target_labels=class_names, + center_distance_bev_thresholds=[0.5, 1.0, 2.0, 4.0], + # plane_distance_thresholds is required for the pass fail evaluation + plane_distance_thresholds=[2.0, 4.0], + iou_2d_thresholds=None, + iou_3d_thresholds=None, + label_prefix="autoware", + # bev minimum distance ranges for each range bucket, must be the same length as max_distance, + # they will form bev distance ranges in [(min_distance[0], max_distance[0]), (min_distance[1], max_distance[1]), ...] when filtering + min_distance=[0.0, 50.0, 90.0, 0.0], + # bev maximum distance ranges for each range bucket, must be the same length as min_distance + max_distance=[50.0, 90.0, 121.0, 121.0], + min_point_numbers=0, + matching_class_agnostic_fps=False, +) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py index d32dc9c70..380a4ba81 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m.py @@ -13,7 +13,7 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" +info_directory_path = "info/kokseang_2_8/" experiment_group_name = "bevfusion_lidar_intensity/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py index 39462b1f6..e3f7d5146 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2.py @@ -3,7 +3,7 @@ ] # user setting -experiment_group_name = "bevfusion_lidar_intensity/j6gen2_base/" + _base_.dataset_type +experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/j6gen2_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_j6gen2_base_120m_t4metric_v2" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name @@ -18,7 +18,7 @@ frame_pass_fail_config = dict( target_labels=_base_.class_names, # Matching thresholds per class (must align with `plane_distance_thresholds` used in evaluation) - matching_threshold_list=[2.0, 2.0, 2.0, 2.0, 2.0], + matching_threshold_list=[2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0], confidence_threshold_list=None, ) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py index 406e87655..eec87a585 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m.py @@ -13,10 +13,10 @@ # user setting data_root = "data/t4dataset/" -info_directory_path = "info/user_name/" +info_directory_path = "info/kokseang_2_8/" -experiment_group_name = "bevfusion_lidar/jpntaxi_base/" + _base_.dataset_type -experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m" +experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/jpntaxi_base/" + _base_.dataset_type +experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_ignore" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name # model parameter @@ -164,4 +164,4 @@ ) log_processor = dict(window_size=50) -load_from = None +load_from = "work_dirs/bevfusion_lidar_traffic_cone/base/T4Dataset/lidar_voxel_second_secfpn_50e_8xb8_base_120m_ignore/epoch_48.pth" diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py index b50b093f7..5190182cc 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py @@ -3,7 +3,7 @@ ] # user setting -experiment_group_name = "bevfusion_lidar_intensity/jpntaxi_base/" + _base_.dataset_type +experiment_group_name = "bevfusion_lidar_intensity_traffic_cone/jpntaxi_base/" + _base_.dataset_type experiment_name = "lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2" work_dir = "work_dirs/" + experiment_group_name + "/" + experiment_name @@ -18,7 +18,7 @@ frame_pass_fail_config = dict( target_labels=_base_.class_names, # Matching thresholds per class (must align with `plane_distance_thresholds` used in evaluation) - matching_threshold_list=[2.0, 2.0, 2.0, 2.0, 2.0], + matching_threshold_list=[2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0], confidence_threshold_list=None, ) From a47646ea6476603518857c0a60cf18b30d5720a8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 11:15:34 +0000 Subject: [PATCH 68/68] ci(pre-commit): autofix --- ...oxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py index 5190182cc..213f0041b 100644 --- a/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py +++ b/projects/BEVFusion/configs/t4dataset/BEVFusion-L/bevfusion_lidar_voxel_second_secfpn_30e_8xb8_jpntaxi_base_120m_t4metric_v2.py @@ -18,7 +18,7 @@ frame_pass_fail_config = dict( target_labels=_base_.class_names, # Matching thresholds per class (must align with `plane_distance_thresholds` used in evaluation) - matching_threshold_list=[2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0], + matching_threshold_list=[2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0], confidence_threshold_list=None, )