tianweiy / CenterPoint-KITTI

Apache License 2.0
184 stars 44 forks source link

Training with pillarvfe #1

Closed coolzhangfeng closed 3 years ago

coolzhangfeng commented 3 years ago

At present, VFe is using meanvfe, but it can't be training with pillavfe. What changes need to be do? It seems that Shencheng headmap doesn't match.

coolzhangfeng commented 3 years ago

set OUT_SIZE_FACTOR to 1,it can train,Is this ok?

tianweiy commented 3 years ago

vfe only works with the voxelnet and pfe only works for pointpillar. What do you mean VFe can't be trained with pfe?

coolzhangfeng commented 3 years ago

vfe only works with the voxelnet and pfe only works for pointpillar. What do you mean VFe can't be trained with pfe?

I want to train pointpillar, Using centerhead in DENSE_HEAD,it seems to be some mistakes in the training process.What changes do I need to make

tianweiy commented 3 years ago

I see, change the OUT_SIZE_FACTOR to 2 i guess. Though I haven't got much success with PP backbone on KITTI yet

coolzhangfeng commented 3 years ago

I see, change the OUT_SIZE_FACTOR to 2 i guess. Though I haven't got much success with PP backbone on KITTI yet I change the OUT_SIZE_FACTOR to 1,The result was all 0,OUT_SIZE_FACTOR to 2,It has mistakes in the training process

tianweiy commented 3 years ago

what mistake, could you paste the output?

coolzhangfeng commented 3 years ago

what mistake, could you paste the output?

File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/tools/train_utils/train_utils.py", line 93, in train_model dataloader_iter=dataloader_iter File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/tools/train_utils/train_utils.py", line 38, in train_one_epoch loss, tb_dict, disp_dict = model_func(model, batch) File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/pcdet/models/init.py", line 30, in model_func ret_dict, tb_dict, disp_dict = model(batch_dict) File "/home/cidi/datadisk/datae/zhang/anaconda3/envs/pointpillars/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call result = self.forward(*input, *kwargs) File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/pcdet/models/detectors/centerpoint.py", line 14, in forward loss, tb_dict, disp_dict = self.get_training_loss() File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/pcdet/models/detectors/centerpoint.py", line 27, in get_training_loss loss_rpn, tb_dict = self.dense_head.get_loss() File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/pcdet/models/dense_heads/centerpoint_head_single.py", line 345, in get_loss cls_loss, tb_dict = self.get_cls_layer_loss() File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/pcdet/models/dense_heads/centerpoint_head_single.py", line 362, in get_cls_layer_loss avg_factor=max(num_pos, 1)) File "/home/cidi/datadisk/datae/zhang/anaconda3/envs/pointpillars/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call result = self.forward(input, kwargs) File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/pcdet/models/dense_heads/centerpoint_head_single.py", line 563, in forward avg_factor=avg_factor) File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/pcdet/models/dense_heads/centerpoint_head_single.py", line 659, in wrapper loss = loss_func(pred, target, kwargs) File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/pcdet/models/dense_heads/centerpoint_head_single.py", line 683, in gaussian_focal_loss pos_loss = -(pred + eps).log() (1 - pred).pow(alpha) pos_weights RuntimeError: The size of tensor a (432) must match the size of tensor b (36) at non-singleton dimension 3

this is output

tianweiy commented 3 years ago

Could you also paste your PP config

coolzhangfeng commented 3 years ago

Could you also paste your PP config

centerpoint_pillar.yaml.zip

tianweiy commented 3 years ago
        VOXEL_SIZE: [0.05, 0.05, 1]
        OUT_SIZE_FACTOR: 12

out_size_factor: 2

voxel_size [0.16, 0.16, 6]

coolzhangfeng commented 3 years ago

set out_size_factor: 2,the output is:

File "/mnt/sde/zhang/lidar_detect/CenterPoint-KITTI/pcdet/models/dense_heads/centerpoint_head_single.py", line 683, in gaussian_focal_loss pos_loss = -(pred + eps).log() (1 - pred).pow(alpha) pos_weights RuntimeError: The size of tensor a (432) must match the size of tensor b (216) at non-singleton dimension 3

tianweiy commented 3 years ago
BACKBONE_2D:
    NAME: BaseBEVBackbone

    LAYER_NUMS: [5]
    LAYER_STRIDES: [2]
    NUM_FILTERS: [128]
    UPSAMPLE_STRIDES: [2]
    NUM_UPSAMPLE_FILTERS: [256]

this also needs to change

tianweiy commented 3 years ago

https://github.com/tianweiy/CenterPoint-KITTI/blob/ef36fcee7b2773600590f9283cc7271ede50c389/tools/cfgs/kitti_models/pointpillar.yaml#L64

coolzhangfeng commented 3 years ago

https://github.com/tianweiy/CenterPoint-KITTI/blob/ef36fcee7b2773600590f9283cc7271ede50c389/tools/cfgs/kitti_models/pointpillar.yaml#L64

Perfect. Look forward to a good result after training.

tianweiy commented 3 years ago

good luck, but I remembered it is not very good for PP on KITTI

coolzhangfeng commented 3 years ago

Contrast voxelnet backbone,the results didn't look very good for pp backbone,what can be done to make the result better

tianweiy commented 3 years ago

I have no clue. This is also the reason why I didn't provide a PP config on KITTI

xavidzo commented 3 years ago

Hello @coolzhangfeng, what are your evaluation results on kitti of centerpoint with pointpillars backbone? Can you post your results here? Thanks