dvlab-research / LargeKernel3D

LargeKernel3D: Scaling up Kernels in 3D Sparse CNNs (CVPR 2023)
https://arxiv.org/abs/2206.10555
Apache License 2.0
197 stars 8 forks source link

Add integration with LargeKernel3D to OpenPCDet #6

Closed Rrrengar closed 1 year ago

Rrrengar commented 1 year ago

Hi, thanks for your released code! I noticed that you released your last work FocalsConv based on both det3d and OpenPCDet, but this time you only released the version on det3d. Do you have any plan to add LargeKernel3D to OpenPCDet? Thanks!

yukang2017 commented 1 year ago

Hi,

I have implemented a version of LargeKernel3D on OpenPCDet. But it is LIDAR-only, without multi-modal settings. Because OpenPCDet does not support multi modality currently. Do you still need it? If yes, I will release it this week.

Regards, Yukang Chen

Rrrengar commented 1 year ago

Hi,

I have implemented a version of LargeKernel3D on OpenPCDet. But it is LIDAR-only, without multi-modal settings. Because OpenPCDet does not support multi modality currently. Do you still need it? If yes, I will release it this week.

Regards, Yukang Chen

Hi! Thanks for your reply and the LIDAR-only version on OpenPCDet is just the one I need. That would be helpful if you release it this week!

jianingwangind commented 1 year ago

Also needed the OpenPCDet version, looking forward to your code release.

yukang2017 commented 1 year ago

Hi,

I have uploaded it here.

https://github.com/dvlab-research/LargeKernel3D/blob/main/object-detection/pcdet/models/backbones_3d/spconv_backbone_largekernel.py

Regards, Yukang Chen

jianingwangind commented 1 year ago

@yukang2017 Thanks a lot. Could you also share the config file maybe the pretrained model as well? Thousand thanks!

yukang2017 commented 1 year ago

Hi @jianingwangind ,

The config file is very simple. You can simply change NAME: VoxelResBackBone8x to NAME: VoxelResBackBone8xLargeKernel3D in https://github.com/open-mmlab/OpenPCDet/blob/ad9c25c03cf9e866bbee8c48fa4e2860cce68a9c/tools/cfgs/nuscenes_models/cbgs_voxel0075_res3d_centerpoint.yaml#L70

The pre-trained model can be downloaded via the link below here. Note that spatialgroupconvv2 is used in this pre-trained weight. https://drive.google.com/file/d/1ZiWWxtkGIqelj9dG-7SJ2pMAJIwVVP1l/view?usp=share_link

This is the performance on validation set for this pre-trained weight.

***car error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.18, 0.15, 0.14, 0.22, 0.18 | 75.83, 85.54, 88.76, 90.45 | mean AP: 0.8514791433295339
***truck error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.32, 0.18, 0.15, 0.19, 0.21 | 42.01, 59.46, 67.54, 71.40 | mean AP: 0.6010389384423573
***construction_vehicle error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.72, 0.42, 0.91, 0.13, 0.31 | 3.48, 14.76, 33.14, 45.94 | mean AP: 0.24330653887851947
***bus error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.31, 0.19, 0.07, 0.34, 0.25 | 49.23, 72.38, 82.99, 85.63 | mean AP: 0.7256052094405145
***trailer error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.51, 0.19, 0.50, 0.17, 0.18 | 10.57, 37.94, 52.72, 64.26 | mean AP: 0.4137271105906273
***barrier error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.19, 0.28, 0.12, nan, nan | 59.12, 67.77, 71.29, 72.75 | mean AP: 0.6773148284011004
***motorcycle error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.20, 0.23, 0.33, 0.29, 0.25 | 61.46, 72.70, 74.30, 74.63 | mean AP: 0.7077321358715435
***bicycle error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.16, 0.26, 0.51, 0.15, 0.01 | 57.00, 59.43, 59.96, 60.44 | mean AP: 0.5920782509164128
***pedestrian error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.14, 0.27, 0.41, 0.20, 0.09 | 83.58, 85.13, 86.18, 87.57 | mean AP: 0.856159033016184
***traffic_cone error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.13, 0.32, nan, nan, nan | 69.47, 71.03, 72.76, 75.76 | mean AP: 0.722540472275063
--------------average performance-------------
trans_err:       0.2855
scale_err:       0.2501
orient_err:      0.3506
vel_err:         0.2111
attr_err:        0.1871
mAP:     0.6391
NDS:     0.6911

Regards, Yukang Chen

jianingwangind commented 1 year ago

@yukang2017 I really appreciate for your detailed explanation, but unfortunately i encountered this error, do you have any ideas?

image

Looking forward to your reply

yukang2017 commented 1 year ago

Hi @jianingwangind ,

I have fixed it via this line. Would you please try it again? https://github.com/dvlab-research/LargeKernel3D/blob/0620e8d57c73652744001592bef909837d94c630/object-detection/pcdet/models/backbones_3d/spconv_backbone_largekernel.py#L230

Regards, Yukang Chen

jianingwangind commented 1 year ago

@yukang2017 Hi, thanks for your reply. It worked, but the metrics seems lower than yours. Do you have any ideas? Thanks and looking forward to your reply

image

yukang2017 commented 1 year ago

Hi,

Would you please show me your complete test log for me?

Regards, Yukang Chen

jianingwangind commented 1 year ago

Hi @yukang2017 , thanks for your reply and the complete test log is listed below:

ssh://root/opt/conda/bin/python -u /jacob.wang/projects/OpenPCDet/tools/test.py --cfg_file tools/cfgs/nuscenes_models/cbgs_voxel0075_largekernel_centerpoint.yaml --batch_size 1 --ckpt ckpts/largekernel3D_centerpoint_openpcdet.pth
2023-05-09 03:23:24,510   INFO  **********************Start logging**********************
2023-05-09 03:23:24,510   INFO  CUDA_VISIBLE_DEVICES=ALL
2023-05-09 03:23:24,510   INFO  cfg_file         tools/cfgs/nuscenes_models/cbgs_voxel0075_largekernel_centerpoint.yaml
2023-05-09 03:23:24,511   INFO  batch_size       1
2023-05-09 03:23:24,511   INFO  workers          4
2023-05-09 03:23:24,511   INFO  extra_tag        default
2023-05-09 03:23:24,511   INFO  ckpt             ckpts/largekernel3D_centerpoint_openpcdet.pth
2023-05-09 03:23:24,511   INFO  pretrained_model None
2023-05-09 03:23:24,511   INFO  launcher         none
2023-05-09 03:23:24,512   INFO  tcp_port         18888
2023-05-09 03:23:24,512   INFO  local_rank       0
2023-05-09 03:23:24,512   INFO  set_cfgs         None
2023-05-09 03:23:24,512   INFO  max_waiting_mins 30
2023-05-09 03:23:24,512   INFO  start_epoch      0
2023-05-09 03:23:24,512   INFO  eval_tag         default
2023-05-09 03:23:24,513   INFO  eval_all         False
2023-05-09 03:23:24,513   INFO  ckpt_dir         None
2023-05-09 03:23:24,513   INFO  save_to_file     False
2023-05-09 03:23:24,513   INFO  infer_time       False
2023-05-09 03:23:24,513   INFO  cfg.ROOT_DIR: /jacob.wang/projects/OpenPCDet
2023-05-09 03:23:24,513   INFO  cfg.LOCAL_RANK: 0
2023-05-09 03:23:24,513   INFO  cfg.CLASS_NAMES: ['car', 'truck', 'construction_vehicle', 'bus', 'trailer', 'barrier', 'motorcycle', 'bicycle', 'pedestrian', 'traffic_cone']
2023-05-09 03:23:24,514   INFO  ----------- DATA_CONFIG -----------
2023-05-09 03:23:24,514   INFO  cfg.DATA_CONFIG.DATASET: NuScenesDataset
2023-05-09 03:23:24,514   INFO  cfg.DATA_CONFIG.DATA_PATH: data/nuscenes
2023-05-09 03:23:24,514   INFO  cfg.DATA_CONFIG.VERSION: v1.0-trainval
2023-05-09 03:23:24,514   INFO  cfg.DATA_CONFIG.MAX_SWEEPS: 10
2023-05-09 03:23:24,514   INFO  cfg.DATA_CONFIG.PRED_VELOCITY: True
2023-05-09 03:23:24,515   INFO  cfg.DATA_CONFIG.SET_NAN_VELOCITY_TO_ZEROS: True
2023-05-09 03:23:24,515   INFO  cfg.DATA_CONFIG.FILTER_MIN_POINTS_IN_GT: 1
2023-05-09 03:23:24,515   INFO  ----------- DATA_SPLIT -----------
2023-05-09 03:23:24,515   INFO  cfg.DATA_CONFIG.DATA_SPLIT.train: train
2023-05-09 03:23:24,515   INFO  cfg.DATA_CONFIG.DATA_SPLIT.test: val
2023-05-09 03:23:24,515   INFO  ----------- INFO_PATH -----------
2023-05-09 03:23:24,515   INFO  cfg.DATA_CONFIG.INFO_PATH.train: ['nuscenes_infos_10sweeps_train.pkl']
2023-05-09 03:23:24,516   INFO  cfg.DATA_CONFIG.INFO_PATH.test: ['nuscenes_infos_10sweeps_val.pkl']
2023-05-09 03:23:24,516   INFO  cfg.DATA_CONFIG.POINT_CLOUD_RANGE: [-54.0, -54.0, -5.0, 54.0, 54.0, 3.0]
2023-05-09 03:23:24,516   INFO  cfg.DATA_CONFIG.BALANCED_RESAMPLING: True
2023-05-09 03:23:24,516   INFO  ----------- DATA_AUGMENTOR -----------
2023-05-09 03:23:24,516   INFO  cfg.DATA_CONFIG.DATA_AUGMENTOR.DISABLE_AUG_LIST: ['placeholder']
2023-05-09 03:23:24,516   INFO  cfg.DATA_CONFIG.DATA_AUGMENTOR.AUG_CONFIG_LIST: [{'NAME': 'gt_sampling', 'DB_INFO_PATH': ['nuscenes_dbinfos_10sweeps_withvelo.pkl'], 'PREPARE': {'filter_by_min_points': ['car:5', 'truck:5', 'construction_vehicle:5', 'bus:5', 'trailer:5', 'barrier:5', 'motorcycle:5', 'bicycle:5', 'pedestrian:5', 'traffic_cone:5']}, 'SAMPLE_GROUPS': ['car:2', 'truck:3', 'construction_vehicle:7', 'bus:4', 'trailer:6', 'barrier:2', 'motorcycle:6', 'bicycle:6', 'pedestrian:2', 'traffic_cone:2'], 'NUM_POINT_FEATURES': 5, 'DATABASE_WITH_FAKELIDAR': False, 'REMOVE_EXTRA_WIDTH': [0.0, 0.0, 0.0], 'LIMIT_WHOLE_SCENE': True}, {'NAME': 'random_world_flip', 'ALONG_AXIS_LIST': ['x', 'y']}, {'NAME': 'random_world_rotation', 'WORLD_ROT_ANGLE': [-0.78539816, 0.78539816]}, {'NAME': 'random_world_scaling', 'WORLD_SCALE_RANGE': [0.9, 1.1]}, {'NAME': 'random_world_translation', 'NOISE_TRANSLATE_STD': [0.5, 0.5, 0.5]}]
2023-05-09 03:23:24,516   INFO  ----------- POINT_FEATURE_ENCODING -----------
2023-05-09 03:23:24,516   INFO  cfg.DATA_CONFIG.POINT_FEATURE_ENCODING.encoding_type: absolute_coordinates_encoding
2023-05-09 03:23:24,516   INFO  cfg.DATA_CONFIG.POINT_FEATURE_ENCODING.used_feature_list: ['x', 'y', 'z', 'intensity', 'timestamp']
2023-05-09 03:23:24,516   INFO  cfg.DATA_CONFIG.POINT_FEATURE_ENCODING.src_feature_list: ['x', 'y', 'z', 'intensity', 'timestamp']
2023-05-09 03:23:24,516   INFO  cfg.DATA_CONFIG.DATA_PROCESSOR: [{'NAME': 'mask_points_and_boxes_outside_range', 'REMOVE_OUTSIDE_BOXES': True}, {'NAME': 'shuffle_points', 'SHUFFLE_ENABLED': {'train': True, 'test': True}}, {'NAME': 'transform_points_to_voxels', 'VOXEL_SIZE': [0.075, 0.075, 0.2], 'MAX_POINTS_PER_VOXEL': 10, 'MAX_NUMBER_OF_VOXELS': {'train': 120000, 'test': 160000}}]
2023-05-09 03:23:24,517   INFO  cfg.DATA_CONFIG._BASE_CONFIG_: tools/cfgs/dataset_configs/nuscenes_dataset.yaml
2023-05-09 03:23:24,517   INFO  ----------- MODEL -----------
2023-05-09 03:23:24,517   INFO  cfg.MODEL.NAME: CenterPoint
2023-05-09 03:23:24,517   INFO  ----------- VFE -----------
2023-05-09 03:23:24,517   INFO  cfg.MODEL.VFE.NAME: MeanVFE
2023-05-09 03:23:24,517   INFO  ----------- BACKBONE_3D -----------
2023-05-09 03:23:24,517   INFO  cfg.MODEL.BACKBONE_3D.NAME: VoxelResBackBone8xLargeKernel3D
2023-05-09 03:23:24,517   INFO  ----------- MAP_TO_BEV -----------
2023-05-09 03:23:24,517   INFO  cfg.MODEL.MAP_TO_BEV.NAME: HeightCompression
2023-05-09 03:23:24,517   INFO  cfg.MODEL.MAP_TO_BEV.NUM_BEV_FEATURES: 256
2023-05-09 03:23:24,517   INFO  ----------- BACKBONE_2D -----------
2023-05-09 03:23:24,517   INFO  cfg.MODEL.BACKBONE_2D.NAME: BaseBEVBackbone
2023-05-09 03:23:24,517   INFO  cfg.MODEL.BACKBONE_2D.LAYER_NUMS: [5, 5]
2023-05-09 03:23:24,517   INFO  cfg.MODEL.BACKBONE_2D.LAYER_STRIDES: [1, 2]
2023-05-09 03:23:24,517   INFO  cfg.MODEL.BACKBONE_2D.NUM_FILTERS: [128, 256]
2023-05-09 03:23:24,517   INFO  cfg.MODEL.BACKBONE_2D.UPSAMPLE_STRIDES: [1, 2]
2023-05-09 03:23:24,517   INFO  cfg.MODEL.BACKBONE_2D.NUM_UPSAMPLE_FILTERS: [256, 256]
2023-05-09 03:23:24,517   INFO  ----------- DENSE_HEAD -----------
2023-05-09 03:23:24,517   INFO  cfg.MODEL.DENSE_HEAD.NAME: CenterHead
2023-05-09 03:23:24,517   INFO  cfg.MODEL.DENSE_HEAD.CLASS_AGNOSTIC: False
2023-05-09 03:23:24,517   INFO  cfg.MODEL.DENSE_HEAD.CLASS_NAMES_EACH_HEAD: [['car'], ['truck', 'construction_vehicle'], ['bus', 'trailer'], ['barrier'], ['motorcycle', 'bicycle'], ['pedestrian', 'traffic_cone']]
2023-05-09 03:23:24,517   INFO  cfg.MODEL.DENSE_HEAD.SHARED_CONV_CHANNEL: 64
2023-05-09 03:23:24,517   INFO  cfg.MODEL.DENSE_HEAD.USE_BIAS_BEFORE_NORM: True
2023-05-09 03:23:24,517   INFO  cfg.MODEL.DENSE_HEAD.NUM_HM_CONV: 2
2023-05-09 03:23:24,517   INFO  ----------- SEPARATE_HEAD_CFG -----------
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_ORDER: ['center', 'center_z', 'dim', 'rot', 'vel']
2023-05-09 03:23:24,518   INFO  ----------- HEAD_DICT -----------
2023-05-09 03:23:24,518   INFO  ----------- center -----------
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.center.out_channels: 2
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.center.num_conv: 2
2023-05-09 03:23:24,518   INFO  ----------- center_z -----------
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.center_z.out_channels: 1
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.center_z.num_conv: 2
2023-05-09 03:23:24,518   INFO  ----------- dim -----------
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.dim.out_channels: 3
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.dim.num_conv: 2
2023-05-09 03:23:24,518   INFO  ----------- rot -----------
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.rot.out_channels: 2
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.rot.num_conv: 2
2023-05-09 03:23:24,518   INFO  ----------- vel -----------
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.vel.out_channels: 2
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.SEPARATE_HEAD_CFG.HEAD_DICT.vel.num_conv: 2
2023-05-09 03:23:24,518   INFO  ----------- TARGET_ASSIGNER_CONFIG -----------
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.FEATURE_MAP_STRIDE: 8
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.NUM_MAX_OBJS: 500
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.GAUSSIAN_OVERLAP: 0.1
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.MIN_RADIUS: 2
2023-05-09 03:23:24,518   INFO  ----------- LOSS_CONFIG -----------
2023-05-09 03:23:24,518   INFO  ----------- LOSS_WEIGHTS -----------
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.cls_weight: 1.0
2023-05-09 03:23:24,518   INFO  cfg.MODEL.DENSE_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.loc_weight: 0.25
2023-05-09 03:23:24,519   INFO  cfg.MODEL.DENSE_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.code_weights: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2, 1.0, 1.0]
2023-05-09 03:23:24,519   INFO  ----------- POST_PROCESSING -----------
2023-05-09 03:23:24,519   INFO  cfg.MODEL.DENSE_HEAD.POST_PROCESSING.SCORE_THRESH: 0.1
2023-05-09 03:23:24,519   INFO  cfg.MODEL.DENSE_HEAD.POST_PROCESSING.POST_CENTER_LIMIT_RANGE: [-61.2, -61.2, -10.0, 61.2, 61.2, 10.0]
2023-05-09 03:23:24,519   INFO  cfg.MODEL.DENSE_HEAD.POST_PROCESSING.MAX_OBJ_PER_SAMPLE: 500
2023-05-09 03:23:24,519   INFO  ----------- NMS_CONFIG -----------
2023-05-09 03:23:24,519   INFO  cfg.MODEL.DENSE_HEAD.POST_PROCESSING.NMS_CONFIG.NMS_TYPE: nms_gpu
2023-05-09 03:23:24,519   INFO  cfg.MODEL.DENSE_HEAD.POST_PROCESSING.NMS_CONFIG.NMS_THRESH: 0.2
2023-05-09 03:23:24,519   INFO  cfg.MODEL.DENSE_HEAD.POST_PROCESSING.NMS_CONFIG.NMS_PRE_MAXSIZE: 1000
2023-05-09 03:23:24,519   INFO  cfg.MODEL.DENSE_HEAD.POST_PROCESSING.NMS_CONFIG.NMS_POST_MAXSIZE: 83
2023-05-09 03:23:24,519   INFO  ----------- POST_PROCESSING -----------
2023-05-09 03:23:24,519   INFO  cfg.MODEL.POST_PROCESSING.RECALL_THRESH_LIST: [0.3, 0.5, 0.7]
2023-05-09 03:23:24,519   INFO  cfg.MODEL.POST_PROCESSING.EVAL_METRIC: kitti
2023-05-09 03:23:24,519   INFO  ----------- OPTIMIZATION -----------
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.BATCH_SIZE_PER_GPU: 4
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.NUM_EPOCHS: 20
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.OPTIMIZER: adam_onecycle
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.LR: 0.001
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.WEIGHT_DECAY: 0.01
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.MOMENTUM: 0.9
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.MOMS: [0.95, 0.85]
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.PCT_START: 0.4
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.DIV_FACTOR: 10
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.DECAY_STEP_LIST: [35, 45]
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.LR_DECAY: 0.1
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.LR_CLIP: 1e-07
2023-05-09 03:23:24,519   INFO  cfg.OPTIMIZATION.LR_WARMUP: False
2023-05-09 03:23:24,520   INFO  cfg.OPTIMIZATION.WARMUP_EPOCH: 1
2023-05-09 03:23:24,520   INFO  cfg.OPTIMIZATION.GRAD_NORM_CLIP: 10
2023-05-09 03:23:24,520   INFO  cfg.TAG: cbgs_voxel0075_largekernel_centerpoint
2023-05-09 03:23:24,520   INFO  cfg.EXP_GROUP_PATH: cfgs/nuscenes_models
2023-05-09 03:23:24,520   INFO  Loading NuScenes dataset
2023-05-09 03:23:25,103   INFO  Total samples for NuScenes dataset: 6019
/jacob.wang/projects/OpenPCDet/pcdet/models/backbones_3d/spconv_backbone_largekernel.py:73: UserWarning: torch.range is deprecated and will be removed in a future release because its behavior is inconsistent with Python's range builtin. Instead, use torch.arange, which produces values in [start, end).
  b = torch.range(0, kernel_size**3-1, 1)[a.reshape(-1).bool()]
2023-05-09 03:23:27,843   INFO  ==> Loading parameters from checkpoint ckpts/largekernel3D_centerpoint_openpcdet.pth to GPU
2023-05-09 03:23:28,636   INFO  ==> Checkpoint trained from version: pcdet+0.5.2+0000000
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.0.conv1.block.weight: torch.Size([7, 7, 7, 16, 16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.0.conv1.conv3x3_1.weight: torch.Size([16, 3, 3, 3, 16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.0.conv1.conv3x3_1.bias: torch.Size([16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.0.conv2.block.weight: torch.Size([7, 7, 7, 16, 16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.0.conv2.conv3x3_1.weight: torch.Size([16, 3, 3, 3, 16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.0.conv2.conv3x3_1.bias: torch.Size([16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.1.conv1.block.weight: torch.Size([7, 7, 7, 16, 16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.1.conv1.conv3x3_1.weight: torch.Size([16, 3, 3, 3, 16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.1.conv1.conv3x3_1.bias: torch.Size([16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.1.conv2.block.weight: torch.Size([7, 7, 7, 16, 16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.1.conv2.conv3x3_1.weight: torch.Size([16, 3, 3, 3, 16])
2023-05-09 03:23:29,053   INFO  Not updated weight backbone_3d.conv1.1.conv2.conv3x3_1.bias: torch.Size([16])
2023-05-09 03:23:29,053   INFO  ==> Done (loaded 554/566)
2023-05-09 03:23:29,074   INFO  *************** EPOCH 3 EVALUATION *****************
eval:   0%|                                            | 0/6019 [00:00<?, ?it/s]/opt/conda/lib/python3.7/site-packages/torch/_tensor.py:575: UserWarning: floor_divide is deprecated, and will be removed in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values.
To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). (Triggered internally at  /opt/conda/conda-bld/pytorch_1623448265233/work/aten/src/ATen/native/BinaryOps.cpp:467.)
  return torch.floor_divide(self, other)
eval: 100%|█| 6019/6019 [35:02<00:00,  2.86it/s, recall_0.3=(0, 113634) / 149480
2023-05-09 03:58:31,296   INFO  *************** Performance of EPOCH 3 *****************
2023-05-09 03:58:31,297   INFO  Generate label finished(sec_per_example: 0.3493 second).
2023-05-09 03:58:31,297   INFO  recall_roi_0.3: 0.000000
2023-05-09 03:58:31,297   INFO  recall_rcnn_0.3: 0.760195
2023-05-09 03:58:31,297   INFO  recall_roi_0.5: 0.000000
2023-05-09 03:58:31,297   INFO  recall_rcnn_0.5: 0.543417
2023-05-09 03:58:31,298   INFO  recall_roi_0.7: 0.000000
2023-05-09 03:58:31,298   INFO  recall_rcnn_0.7: 0.234319
2023-05-09 03:58:31,309   INFO  Average predicted number of objects(6019 samples): 74.590
======
Loading NuScenes tables for version v1.0-trainval...
Loading nuScenes-lidarseg...
32 category,
8 attribute,
4 visibility,
64386 instance,
12 sensor,
10200 calibrated_sensor,
2631083 ego_pose,
68 log,
850 scene,
34149 sample,
2631083 sample_data,
1166187 sample_annotation,
4 map,
34149 lidarseg,
Done loading in 29.800 seconds.
======
Reverse indexing ...
Done reverse indexing in 8.5 seconds.
======
2023-05-09 04:00:37,886   INFO  The predictions of NuScenes have been saved to /jacob.wang/projects/OpenPCDet/output/cfgs/nuscenes_models/cbgs_voxel0075_largekernel_centerpoint/default/eval/epoch_3/val/default/final_result/data/results_nusc.json
Initializing nuScenes detection evaluation
Loaded results from /jacob.wang/projects/OpenPCDet/output/cfgs/nuscenes_models/cbgs_voxel0075_largekernel_centerpoint/default/eval/epoch_3/val/default/final_result/data/results_nusc.json. Found detections for 6019 samples.
Loading annotations for val split from nuScenes version: v1.0-trainval
100%|██████████████████████████████████████| 6019/6019 [00:10<00:00, 547.60it/s]
Loaded ground truth annotations for 6019 samples.
Filtering predictions
=> Original number of boxes: 448956
=> After distance based filtering: 315264
=> After LIDAR and RADAR points based filtering: 315264
=> After bike rack filtering: 315183
Filtering ground truth annotations
=> Original number of boxes: 187528
=> After distance based filtering: 134565
=> After LIDAR and RADAR points based filtering: 121871
=> After bike rack filtering: 121861
Accumulating metric data...
Calculating metrics...
Saving metrics to: /jacob.wang/projects/OpenPCDet/output/cfgs/nuscenes_models/cbgs_voxel0075_largekernel_centerpoint/default/eval/epoch_3/val/default/final_result/data
mAP: 0.5352
mATE: 0.3112
mASE: 0.2562
mAOE: 0.3920
mAVE: 0.2666
mAAE: 0.1928
NDS: 0.6257
Eval time: 95.1s

Per-class results:
Object Class    AP  ATE ASE AOE AVE AAE
car 0.815   0.193   0.165   0.217   0.254   0.198
truck   0.523   0.313   0.181   0.160   0.226   0.217
bus 0.663   0.336   0.191   0.066   0.395   0.266
trailer 0.368   0.569   0.206   0.531   0.203   0.202
construction_vehicle    0.182   0.747   0.429   0.920   0.113   0.284
pedestrian  0.823   0.152   0.279   0.441   0.245   0.111
motorcycle  0.378   0.229   0.246   0.400   0.492   0.254
bicycle 0.338   0.189   0.263   0.663   0.205   0.009
traffic_cone    0.645   0.159   0.327   nan nan nan
barrier 0.616   0.224   0.277   0.130   nan nan
2023-05-09 04:02:49,279   INFO  ----------------Nuscene detection_cvpr_2019 results-----------------
***car error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.19, 0.16, 0.22, 0.25, 0.20 | 71.75, 81.95, 85.26, 87.11 | mean AP: 0.8152142922121536
***truck error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.31, 0.18, 0.16, 0.23, 0.22 | 35.86, 52.21, 58.52, 62.50 | mean AP: 0.5226909579459581
***construction_vehicle error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.75, 0.43, 0.92, 0.11, 0.28 | 1.41, 10.28, 25.12, 35.79 | mean AP: 0.1815073390940494
***bus error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.34, 0.19, 0.07, 0.40, 0.27 | 42.85, 65.74, 77.18, 79.46 | mean AP: 0.6630854322478308
***trailer error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.57, 0.21, 0.53, 0.20, 0.20 | 8.50, 30.04, 48.78, 60.01 | mean AP: 0.36832192626705307
***barrier error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.22, 0.28, 0.13, nan, nan | 51.43, 61.96, 65.58, 67.42 | mean AP: 0.6159528156859566
***motorcycle error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.23, 0.25, 0.40, 0.49, 0.25 | 30.57, 38.88, 40.58, 41.37 | mean AP: 0.37848749504321455
***bicycle error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.19, 0.26, 0.66, 0.20, 0.01 | 31.78, 33.94, 34.52, 35.12 | mean AP: 0.3383919265973568
***pedestrian error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.15, 0.28, 0.44, 0.24, 0.11 | 80.02, 81.63, 83.01, 84.66 | mean AP: 0.8233015015580978
***traffic_cone error@trans, scale, orient, vel, attr | AP@0.5, 1.0, 2.0, 4.0
0.16, 0.33, nan, nan, nan | 61.17, 62.76, 64.93, 69.26 | mean AP: 0.6452905854214035
--------------average performance-------------
trans_err:   0.3112
scale_err:   0.2562
orient_err:  0.3920
vel_err:     0.2666
attr_err:    0.1928
mAP:     0.5352
NDS:     0.6257

2023-05-09 04:02:49,280   INFO  Result is saved to /jacob.wang/projects/OpenPCDet/output/cfgs/nuscenes_models/cbgs_voxel0075_largekernel_centerpoint/default/eval/epoch_3/val/default
2023-05-09 04:02:49,280   INFO  ****************Evaluation done.*****************

Process finished with exit code 0
yukang2017 commented 1 year ago

Please change spatialgroupconv to spatialgroupconvv2

https://github.com/dvlab-research/LargeKernel3D/blob/0620e8d57c73652744001592bef909837d94c630/object-detection/pcdet/models/backbones_3d/spconv_backbone_largekernel.py#LL191C1-L192C1

jianingwangind commented 1 year ago

Now it is fixed. Thanks a lot for your detailed explanation:)