├── README.md ├── SparseBEVTools ├── README.md ├── SparseBEVTools │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── functional.cpython-37.pyc │ │ └── functional.cpython-38.pyc │ ├── functional.py │ └── ops │ │ ├── __init__.py │ │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ └── __init__.cpython-38.pyc │ │ └── src │ │ ├── libtorch_sdk.h │ │ ├── sparse2bev.cpp │ │ └── sparse2bev_cuda.cu ├── __init__.py ├── setup.py └── test.py └── openpcdet ├── LICENSE ├── pcdet.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── requires.txt └── top_level.txt ├── pcdet ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-37.pyc │ ├── __init__.cpython-38.pyc │ ├── config.cpython-37.pyc │ ├── config.cpython-38.pyc │ ├── version.cpython-37.pyc │ └── version.cpython-38.pyc ├── config.py ├── datasets │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── dataset.cpython-37.pyc │ │ └── dataset.cpython-38.pyc │ ├── augmentor │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── augmentor_utils.cpython-37.pyc │ │ │ ├── augmentor_utils.cpython-38.pyc │ │ │ ├── data_augmentor.cpython-37.pyc │ │ │ ├── data_augmentor.cpython-38.pyc │ │ │ ├── database_sampler.cpython-37.pyc │ │ │ └── database_sampler.cpython-38.pyc │ │ ├── augmentor_utils.py │ │ ├── data_augmentor.py │ │ └── database_sampler.py │ ├── custom │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── custom_dataset.cpython-37.pyc │ │ │ └── custom_dataset.cpython-38.pyc │ │ └── custom_dataset.py │ ├── dataset.py │ ├── kitti │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── kitti_dataset.cpython-37.pyc │ │ │ ├── kitti_dataset.cpython-38.pyc │ │ │ ├── kitti_utils.cpython-37.pyc │ │ │ └── kitti_utils.cpython-38.pyc │ │ ├── kitti_dataset.py │ │ ├── kitti_object_eval_python │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── __init__.cpython-38.pyc │ │ │ │ ├── eval.cpython-37.pyc │ │ │ │ ├── eval.cpython-38.pyc │ │ │ │ ├── kitti_common.cpython-37.pyc │ │ │ │ ├── kitti_common.cpython-38.pyc │ │ │ │ ├── rotate_iou.cpython-37.pyc │ │ │ │ └── rotate_iou.cpython-38.pyc │ │ │ ├── eval.py │ │ │ ├── evaluate.py │ │ │ ├── kitti_common.py │ │ │ └── rotate_iou.py │ │ └── kitti_utils.py │ ├── lyft │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── lyft_dataset.cpython-37.pyc │ │ │ └── lyft_dataset.cpython-38.pyc │ │ ├── lyft_dataset.py │ │ ├── lyft_mAP_eval │ │ │ ├── __init__.py │ │ │ └── lyft_eval.py │ │ └── lyft_utils.py │ ├── nuscenes │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── nuscenes_dataset.cpython-37.pyc │ │ │ ├── nuscenes_dataset.cpython-38.pyc │ │ │ └── nuscenes_utils.cpython-38.pyc │ │ ├── nuscenes_dataset.py │ │ └── nuscenes_utils.py │ ├── once │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── once_dataset.cpython-37.pyc │ │ │ ├── once_dataset.cpython-38.pyc │ │ │ ├── once_toolkits.cpython-37.pyc │ │ │ └── once_toolkits.cpython-38.pyc │ │ ├── once_dataset.py │ │ ├── once_eval │ │ │ ├── eval_utils.py │ │ │ ├── evaluation.py │ │ │ └── iou_utils.py │ │ └── once_toolkits.py │ ├── pandaset │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── pandaset_dataset.cpython-37.pyc │ │ │ └── pandaset_dataset.cpython-38.pyc │ │ └── pandaset_dataset.py │ ├── processor │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── data_processor.cpython-37.pyc │ │ │ ├── data_processor.cpython-38.pyc │ │ │ ├── point_feature_encoder.cpython-37.pyc │ │ │ └── point_feature_encoder.cpython-38.pyc │ │ ├── data_processor.py │ │ └── point_feature_encoder.py │ └── waymo │ │ ├── __init__.py │ │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── waymo_dataset.cpython-37.pyc │ │ └── waymo_dataset.cpython-38.pyc │ │ ├── waymo_dataset.py │ │ ├── waymo_eval.py │ │ └── waymo_utils.py ├── models │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ └── __init__.cpython-38.pyc │ ├── backbones_2d │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── base_bev_backbone.cpython-37.pyc │ │ │ ├── base_bev_backbone.cpython-38.pyc │ │ │ ├── masked_bn.cpython-37.pyc │ │ │ └── masked_bn.cpython-38.pyc │ │ ├── base_bev_backbone.py │ │ ├── map_to_bev │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── __init__.cpython-38.pyc │ │ │ │ ├── conv2d_collapse.cpython-37.pyc │ │ │ │ ├── conv2d_collapse.cpython-38.pyc │ │ │ │ ├── height_compression.cpython-37.pyc │ │ │ │ ├── height_compression.cpython-38.pyc │ │ │ │ ├── pointpillar_scatter.cpython-37.pyc │ │ │ │ └── pointpillar_scatter.cpython-38.pyc │ │ │ ├── conv2d_collapse.py │ │ │ ├── height_compression.py │ │ │ └── pointpillar_scatter.py │ │ └── masked_bn.py │ ├── backbones_3d │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── check_inbox.cpython-38.pyc │ │ │ ├── drop_utils.cpython-37.pyc │ │ │ ├── drop_utils.cpython-38.pyc │ │ │ ├── pointnet2_backbone.cpython-37.pyc │ │ │ ├── pointnet2_backbone.cpython-38.pyc │ │ │ ├── spconv_backbone.cpython-37.pyc │ │ │ ├── spconv_backbone.cpython-38.pyc │ │ │ ├── spconv_backbone_2d.cpython-37.pyc │ │ │ ├── spconv_backbone_2d.cpython-38.pyc │ │ │ ├── spconv_backbone_focal.cpython-37.pyc │ │ │ ├── spconv_backbone_focal.cpython-38.pyc │ │ │ ├── spconv_unet.cpython-37.pyc │ │ │ └── spconv_unet.cpython-38.pyc │ │ ├── drop_utils.py │ │ ├── focal_sparse_conv │ │ │ ├── SemanticSeg │ │ │ │ ├── __pycache__ │ │ │ │ │ ├── basic_blocks.cpython-37.pyc │ │ │ │ │ ├── basic_blocks.cpython-38.pyc │ │ │ │ │ ├── pyramid_ffn.cpython-37.pyc │ │ │ │ │ ├── pyramid_ffn.cpython-38.pyc │ │ │ │ │ ├── sem_deeplabv3.cpython-37.pyc │ │ │ │ │ └── sem_deeplabv3.cpython-38.pyc │ │ │ │ ├── basic_blocks.py │ │ │ │ ├── pyramid_ffn.py │ │ │ │ └── sem_deeplabv3.py │ │ │ ├── __pycache__ │ │ │ │ ├── focal_sparse_conv.cpython-37.pyc │ │ │ │ ├── focal_sparse_conv.cpython-38.pyc │ │ │ │ ├── focal_sparse_utils.cpython-37.pyc │ │ │ │ └── focal_sparse_utils.cpython-38.pyc │ │ │ ├── focal_sparse_conv.py │ │ │ └── focal_sparse_utils.py │ │ ├── pfe │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── __init__.cpython-38.pyc │ │ │ │ ├── voxel_set_abstraction.cpython-37.pyc │ │ │ │ └── voxel_set_abstraction.cpython-38.pyc │ │ │ └── voxel_set_abstraction.py │ │ ├── pointnet2_backbone.py │ │ ├── spconv_backbone.py │ │ ├── spconv_backbone_2d.py │ │ ├── spconv_backbone_focal.py │ │ ├── spconv_unet.py │ │ └── vfe │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── drop_voxel_vfe.cpython-37.pyc │ │ │ ├── drop_voxel_vfe.cpython-38.pyc │ │ │ ├── dynamic_mean_vfe.cpython-37.pyc │ │ │ ├── dynamic_mean_vfe.cpython-38.pyc │ │ │ ├── dynamic_pillar_vfe.cpython-37.pyc │ │ │ ├── dynamic_pillar_vfe.cpython-38.pyc │ │ │ ├── image_vfe.cpython-37.pyc │ │ │ ├── image_vfe.cpython-38.pyc │ │ │ ├── mean_vfe.cpython-37.pyc │ │ │ ├── mean_vfe.cpython-38.pyc │ │ │ ├── pillar_vfe.cpython-37.pyc │ │ │ ├── pillar_vfe.cpython-38.pyc │ │ │ ├── vfe_template.cpython-37.pyc │ │ │ └── vfe_template.cpython-38.pyc │ │ │ ├── drop_voxel_vfe.py │ │ │ ├── dynamic_mean_vfe.py │ │ │ ├── dynamic_pillar_vfe.py │ │ │ ├── image_vfe.py │ │ │ ├── image_vfe_modules │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ └── __init__.cpython-38.pyc │ │ │ ├── f2v │ │ │ │ ├── __init__.py │ │ │ │ ├── __pycache__ │ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ │ ├── __init__.cpython-38.pyc │ │ │ │ │ ├── frustum_grid_generator.cpython-37.pyc │ │ │ │ │ ├── frustum_grid_generator.cpython-38.pyc │ │ │ │ │ ├── frustum_to_voxel.cpython-37.pyc │ │ │ │ │ ├── frustum_to_voxel.cpython-38.pyc │ │ │ │ │ ├── sampler.cpython-37.pyc │ │ │ │ │ └── sampler.cpython-38.pyc │ │ │ │ ├── frustum_grid_generator.py │ │ │ │ ├── frustum_to_voxel.py │ │ │ │ └── sampler.py │ │ │ └── ffn │ │ │ │ ├── __init__.py │ │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── __init__.cpython-38.pyc │ │ │ │ ├── depth_ffn.cpython-37.pyc │ │ │ │ └── depth_ffn.cpython-38.pyc │ │ │ │ ├── ddn │ │ │ │ ├── __init__.py │ │ │ │ ├── __pycache__ │ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ │ ├── __init__.cpython-38.pyc │ │ │ │ │ ├── ddn_deeplabv3.cpython-37.pyc │ │ │ │ │ ├── ddn_deeplabv3.cpython-38.pyc │ │ │ │ │ ├── ddn_template.cpython-37.pyc │ │ │ │ │ └── ddn_template.cpython-38.pyc │ │ │ │ ├── ddn_deeplabv3.py │ │ │ │ └── ddn_template.py │ │ │ │ ├── ddn_loss │ │ │ │ ├── __init__.py │ │ │ │ ├── __pycache__ │ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ │ ├── __init__.cpython-38.pyc │ │ │ │ │ ├── balancer.cpython-37.pyc │ │ │ │ │ ├── balancer.cpython-38.pyc │ │ │ │ │ ├── ddn_loss.cpython-37.pyc │ │ │ │ │ └── ddn_loss.cpython-38.pyc │ │ │ │ ├── balancer.py │ │ │ │ └── ddn_loss.py │ │ │ │ └── depth_ffn.py │ │ │ ├── mean_vfe.py │ │ │ ├── pillar_vfe.py │ │ │ └── vfe_template.py │ ├── dense_heads │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── anchor_head_multi.cpython-37.pyc │ │ │ ├── anchor_head_multi.cpython-38.pyc │ │ │ ├── anchor_head_single.cpython-37.pyc │ │ │ ├── anchor_head_single.cpython-38.pyc │ │ │ ├── anchor_head_template.cpython-37.pyc │ │ │ ├── anchor_head_template.cpython-38.pyc │ │ │ ├── center_head.cpython-37.pyc │ │ │ ├── center_head.cpython-38.pyc │ │ │ ├── point_head_box.cpython-37.pyc │ │ │ ├── point_head_box.cpython-38.pyc │ │ │ ├── point_head_simple.cpython-37.pyc │ │ │ ├── point_head_simple.cpython-38.pyc │ │ │ ├── point_head_template.cpython-37.pyc │ │ │ ├── point_head_template.cpython-38.pyc │ │ │ ├── point_intra_part_head.cpython-37.pyc │ │ │ └── point_intra_part_head.cpython-38.pyc │ │ ├── anchor_head_multi.py │ │ ├── anchor_head_single.py │ │ ├── anchor_head_template.py │ │ ├── center_head.py │ │ ├── point_head_box.py │ │ ├── point_head_simple.py │ │ ├── point_head_template.py │ │ ├── point_intra_part_head.py │ │ └── target_assigner │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── anchor_generator.cpython-37.pyc │ │ │ ├── anchor_generator.cpython-38.pyc │ │ │ ├── atss_target_assigner.cpython-37.pyc │ │ │ ├── atss_target_assigner.cpython-38.pyc │ │ │ ├── axis_aligned_target_assigner.cpython-37.pyc │ │ │ └── axis_aligned_target_assigner.cpython-38.pyc │ │ │ ├── anchor_generator.py │ │ │ ├── atss_target_assigner.py │ │ │ └── axis_aligned_target_assigner.py │ ├── detectors │ │ ├── PartA2_net.py │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── PartA2_net.cpython-37.pyc │ │ │ ├── PartA2_net.cpython-38.pyc │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── caddn.cpython-37.pyc │ │ │ ├── caddn.cpython-38.pyc │ │ │ ├── centerpoint.cpython-37.pyc │ │ │ ├── centerpoint.cpython-38.pyc │ │ │ ├── detector3d_template.cpython-37.pyc │ │ │ ├── detector3d_template.cpython-38.pyc │ │ │ ├── mppnet.cpython-37.pyc │ │ │ ├── mppnet.cpython-38.pyc │ │ │ ├── mppnet_e2e.cpython-37.pyc │ │ │ ├── mppnet_e2e.cpython-38.pyc │ │ │ ├── pillarnet.cpython-37.pyc │ │ │ ├── pillarnet.cpython-38.pyc │ │ │ ├── point_rcnn.cpython-37.pyc │ │ │ ├── point_rcnn.cpython-38.pyc │ │ │ ├── pointpillar.cpython-37.pyc │ │ │ ├── pointpillar.cpython-38.pyc │ │ │ ├── pv_rcnn.cpython-37.pyc │ │ │ ├── pv_rcnn.cpython-38.pyc │ │ │ ├── pv_rcnn_plusplus.cpython-37.pyc │ │ │ ├── pv_rcnn_plusplus.cpython-38.pyc │ │ │ ├── second_net.cpython-37.pyc │ │ │ ├── second_net.cpython-38.pyc │ │ │ ├── second_net_iou.cpython-37.pyc │ │ │ ├── second_net_iou.cpython-38.pyc │ │ │ ├── voxel_rcnn.cpython-37.pyc │ │ │ └── voxel_rcnn.cpython-38.pyc │ │ ├── caddn.py │ │ ├── centerpoint.py │ │ ├── detector3d_template.py │ │ ├── mppnet.py │ │ ├── mppnet_e2e.py │ │ ├── pillarnet.py │ │ ├── point_rcnn.py │ │ ├── pointpillar.py │ │ ├── pv_rcnn.py │ │ ├── pv_rcnn_plusplus.py │ │ ├── second_net.py │ │ ├── second_net_iou.py │ │ └── voxel_rcnn.py │ ├── model_utils │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── basic_block_2d.cpython-37.pyc │ │ │ ├── basic_block_2d.cpython-38.pyc │ │ │ ├── centernet_utils.cpython-37.pyc │ │ │ ├── centernet_utils.cpython-38.pyc │ │ │ ├── model_nms_utils.cpython-37.pyc │ │ │ ├── model_nms_utils.cpython-38.pyc │ │ │ ├── mppnet_utils.cpython-37.pyc │ │ │ └── mppnet_utils.cpython-38.pyc │ │ ├── basic_block_2d.py │ │ ├── centernet_utils.py │ │ ├── model_nms_utils.py │ │ └── mppnet_utils.py │ └── roi_heads │ │ ├── __init__.py │ │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── mppnet_head.cpython-37.pyc │ │ ├── mppnet_head.cpython-38.pyc │ │ ├── mppnet_memory_bank_e2e.cpython-37.pyc │ │ ├── mppnet_memory_bank_e2e.cpython-38.pyc │ │ ├── partA2_head.cpython-37.pyc │ │ ├── partA2_head.cpython-38.pyc │ │ ├── pointrcnn_head.cpython-37.pyc │ │ ├── pointrcnn_head.cpython-38.pyc │ │ ├── pvrcnn_head.cpython-37.pyc │ │ ├── pvrcnn_head.cpython-38.pyc │ │ ├── roi_head_template.cpython-37.pyc │ │ ├── roi_head_template.cpython-38.pyc │ │ ├── second_head.cpython-37.pyc │ │ ├── second_head.cpython-38.pyc │ │ ├── voxelrcnn_head.cpython-37.pyc │ │ └── voxelrcnn_head.cpython-38.pyc │ │ ├── mppnet_head.py │ │ ├── mppnet_memory_bank_e2e.py │ │ ├── partA2_head.py │ │ ├── pointrcnn_head.py │ │ ├── pvrcnn_head.py │ │ ├── roi_head_template.py │ │ ├── second_head.py │ │ ├── target_assigner │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── proposal_target_layer.cpython-37.pyc │ │ │ └── proposal_target_layer.cpython-38.pyc │ │ └── proposal_target_layer.py │ │ └── voxelrcnn_head.py ├── ops │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ └── __init__.cpython-38.pyc │ ├── iou3d_nms │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── iou3d_nms_utils.cpython-37.pyc │ │ │ └── iou3d_nms_utils.cpython-38.pyc │ │ ├── iou3d_nms_utils.py │ │ └── src │ │ │ ├── iou3d_cpu.cpp │ │ │ ├── iou3d_cpu.h │ │ │ ├── iou3d_nms.cpp │ │ │ ├── iou3d_nms.h │ │ │ ├── iou3d_nms_api.cpp │ │ │ └── iou3d_nms_kernel.cu │ ├── pointnet2 │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ └── __init__.cpython-38.pyc │ │ ├── pointnet2_batch │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── __init__.cpython-38.pyc │ │ │ │ ├── pointnet2_modules.cpython-37.pyc │ │ │ │ ├── pointnet2_modules.cpython-38.pyc │ │ │ │ ├── pointnet2_utils.cpython-37.pyc │ │ │ │ └── pointnet2_utils.cpython-38.pyc │ │ │ ├── pointnet2_modules.py │ │ │ ├── pointnet2_utils.py │ │ │ └── src │ │ │ │ ├── ball_query.cpp │ │ │ │ ├── ball_query_gpu.cu │ │ │ │ ├── ball_query_gpu.h │ │ │ │ ├── cuda_utils.h │ │ │ │ ├── group_points.cpp │ │ │ │ ├── group_points_gpu.cu │ │ │ │ ├── group_points_gpu.h │ │ │ │ ├── interpolate.cpp │ │ │ │ ├── interpolate_gpu.cu │ │ │ │ ├── interpolate_gpu.h │ │ │ │ ├── pointnet2_api.cpp │ │ │ │ ├── sampling.cpp │ │ │ │ ├── sampling_gpu.cu │ │ │ │ └── sampling_gpu.h │ │ └── pointnet2_stack │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── pointnet2_modules.cpython-37.pyc │ │ │ ├── pointnet2_modules.cpython-38.pyc │ │ │ ├── pointnet2_utils.cpython-37.pyc │ │ │ ├── pointnet2_utils.cpython-38.pyc │ │ │ ├── voxel_pool_modules.cpython-37.pyc │ │ │ ├── voxel_pool_modules.cpython-38.pyc │ │ │ ├── voxel_query_utils.cpython-37.pyc │ │ │ └── voxel_query_utils.cpython-38.pyc │ │ │ ├── pointnet2_modules.py │ │ │ ├── pointnet2_utils.py │ │ │ ├── src │ │ │ ├── ball_query.cpp │ │ │ ├── ball_query_gpu.cu │ │ │ ├── ball_query_gpu.h │ │ │ ├── cuda_utils.h │ │ │ ├── group_points.cpp │ │ │ ├── group_points_gpu.cu │ │ │ ├── group_points_gpu.h │ │ │ ├── interpolate.cpp │ │ │ ├── interpolate_gpu.cu │ │ │ ├── interpolate_gpu.h │ │ │ ├── pointnet2_api.cpp │ │ │ ├── sampling.cpp │ │ │ ├── sampling_gpu.cu │ │ │ ├── sampling_gpu.h │ │ │ ├── vector_pool.cpp │ │ │ ├── vector_pool_gpu.cu │ │ │ ├── vector_pool_gpu.h │ │ │ ├── voxel_query.cpp │ │ │ ├── voxel_query_gpu.cu │ │ │ └── voxel_query_gpu.h │ │ │ ├── voxel_pool_modules.py │ │ │ └── voxel_query_utils.py │ ├── roiaware_pool3d │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── __init__.cpython-38.pyc │ │ │ ├── roiaware_pool3d_utils.cpython-37.pyc │ │ │ └── roiaware_pool3d_utils.cpython-38.pyc │ │ ├── roiaware_pool3d_utils.py │ │ └── src │ │ │ ├── roiaware_pool3d.cpp │ │ │ └── roiaware_pool3d_kernel.cu │ └── roipoint_pool3d │ │ ├── __init__.py │ │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── roipoint_pool3d_utils.cpython-37.pyc │ │ └── roipoint_pool3d_utils.cpython-38.pyc │ │ ├── roipoint_pool3d_utils.py │ │ └── src │ │ ├── roipoint_pool3d.cpp │ │ └── roipoint_pool3d_kernel.cu ├── utils │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── box_coder_utils.cpython-37.pyc │ │ ├── box_coder_utils.cpython-38.pyc │ │ ├── box_utils.cpython-37.pyc │ │ ├── box_utils.cpython-38.pyc │ │ ├── calibration_kitti.cpython-37.pyc │ │ ├── calibration_kitti.cpython-38.pyc │ │ ├── common_utils.cpython-37.pyc │ │ ├── common_utils.cpython-38.pyc │ │ ├── commu_utils.cpython-37.pyc │ │ ├── commu_utils.cpython-38.pyc │ │ ├── loss_utils.cpython-37.pyc │ │ ├── loss_utils.cpython-38.pyc │ │ ├── object3d_kitti.cpython-37.pyc │ │ ├── object3d_kitti.cpython-38.pyc │ │ ├── spconv_utils.cpython-37.pyc │ │ ├── spconv_utils.cpython-38.pyc │ │ ├── transform_utils.cpython-37.pyc │ │ └── transform_utils.cpython-38.pyc │ ├── box_coder_utils.py │ ├── box_utils.py │ ├── calibration_kitti.py │ ├── common_utils.py │ ├── commu_utils.py │ ├── loss_utils.py │ ├── object3d_custom.py │ ├── object3d_kitti.py │ ├── spconv_utils.py │ └── transform_utils.py └── version.py ├── requirements.txt ├── setup.py └── tools ├── __pycache__ ├── _init_path.cpython-37.pyc ├── _init_path.cpython-38.pyc ├── test.cpython-37.pyc └── test.cpython-38.pyc ├── _init_path.py ├── cfgs ├── dataset_configs │ ├── custom_dataset.yaml │ ├── kitti_dataset.yaml │ ├── lyft_dataset.yaml │ ├── nuscenes_dataset.yaml │ ├── once_dataset.yaml │ ├── pandaset_dataset.yaml │ ├── waymo_dataset.yaml │ └── waymo_dataset_multiframe.yaml ├── masked_bn.yaml ├── predictor_masked_bn.yaml └── predictor_masked_bn_tune.yaml ├── eval_utils ├── __pycache__ │ ├── eval_utils.cpython-37.pyc │ └── eval_utils.cpython-38.pyc └── eval_utils.py ├── process_tools └── create_integrated_database.py ├── run.sh ├── scripts ├── check_exported_acts.py ├── dist_test.sh ├── dist_train.sh ├── procetss_ckpt_masked_bn.py ├── slurm_test_mgpu.sh ├── slurm_test_single.sh ├── slurm_train.sh └── torch_train.sh ├── test.py ├── train.py ├── train_utils ├── __pycache__ │ ├── train_utils.cpython-37.pyc │ └── train_utils.cpython-38.pyc ├── optimization │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── fastai_optim.cpython-37.pyc │ │ ├── fastai_optim.cpython-38.pyc │ │ ├── learning_schedules_fastai.cpython-37.pyc │ │ └── learning_schedules_fastai.cpython-38.pyc │ ├── fastai_optim.py │ └── learning_schedules_fastai.py └── train_utils.py └── visual_utils ├── open3d_vis_utils.py └── visualize_utils.py /SparseBEVTools/README.md: -------------------------------------------------------------------------------- 1 | 2 | # SparseBEVTools 3 | 4 | 5 | ## Install 6 | ```bash 7 | python setup.py develop 8 | pip list 9 | ``` 10 | 11 | ## Sample 12 | ```python 13 | from SparseBEVTools import sparse2bev, foreground_gather, foreground_gather_pytorch 14 | import torch 15 | import spconv 16 | 17 | batch_size = 2 18 | num_voxels = 10000 19 | num_features = 16 20 | sparse_shape = [40, 1400, 1600] 21 | 22 | voxel_features = torch.randn(size=(num_voxels, num_features)) 23 | voxel_coords_x = torch.randint(low=0, high=sparse_shape[0] - 1, size=(num_voxels, )).int() 24 | voxel_coords_y = torch.randint(low=0, high=sparse_shape[1] - 1, size=(num_voxels, )).int() 25 | voxel_coords_z = torch.randint(low=0, high=sparse_shape[2] - 1, size=(num_voxels, )).int() 26 | voxel_coords_bs = torch.zeros_like(voxel_coords_x, dtype=torch.int32) 27 | voxel_coords = torch.stack([voxel_coords_bs, voxel_coords_x, voxel_coords_y, voxel_coords_z]).t().contiguous() 28 | voxel_coords[num_voxels//3:, 0] = 1 29 | voxel_coords = voxel_coords.int() 30 | 31 | voxel_features = voxel_features.cuda() 32 | voxel_coords = voxel_coords.cuda() 33 | voxel_features.requires_grad = True 34 | 35 | spconv_tensor = spconv.SparseConvTensor( 36 | features=voxel_features, 37 | indices=voxel_coords, 38 | spatial_shape=sparse_shape, 39 | batch_size=batch_size 40 | ) 41 | 42 | bev_dense_tensor, bev_valid_mask = sparse2bev(spconv_tensor) 43 | (bev_dense_tensor**2).sum().backward() 44 | print(voxel_features) 45 | print(voxel_features.grad) 46 | 47 | 48 | # 更新valid mask 49 | rand = torch.randn_like(bev_valid_mask, dtype=torch.float32) 50 | bev_valid_mask = bev_valid_mask & (rand > 0) 51 | 52 | voxel_features.grad.fill_(0.0) 53 | new_spconv_tensor = foreground_gather(spconv_tensor, bev_valid_mask) 54 | (new_spconv_tensor.features**2).sum().backward() 55 | grad1 = voxel_features.grad 56 | print(voxel_features.grad) 57 | print(new_spconv_tensor.features.size(0)) 58 | 59 | 60 | print("***************************************************") 61 | voxel_features.grad.fill_(0.0) 62 | new_spconv_tensor1 = foreground_gather_pytorch(spconv_tensor, bev_valid_mask) 63 | (new_spconv_tensor1.features**2).sum().backward() 64 | grad2 = voxel_features.grad 65 | print(voxel_features.grad) 66 | print(new_spconv_tensor1.features.size(0)) 67 | 68 | print('error:', (grad1 - grad2).abs().sum()) 69 | ``` 70 | -------------------------------------------------------------------------------- /SparseBEVTools/SparseBEVTools/__init__.py: -------------------------------------------------------------------------------- 1 | from .functional import sparse2bev, foreground_gather, foreground_gather_pytorch, points_in_boxes_bev 2 | 3 | __all__ = ['sparse2bev', 'foreground_gather', 'foreground_gather_pytorch', 'points_in_boxes_bev'] 4 | -------------------------------------------------------------------------------- /SparseBEVTools/SparseBEVTools/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/SparseBEVTools/SparseBEVTools/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /SparseBEVTools/SparseBEVTools/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/SparseBEVTools/SparseBEVTools/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /SparseBEVTools/SparseBEVTools/__pycache__/functional.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/SparseBEVTools/SparseBEVTools/__pycache__/functional.cpython-37.pyc -------------------------------------------------------------------------------- /SparseBEVTools/SparseBEVTools/__pycache__/functional.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/SparseBEVTools/SparseBEVTools/__pycache__/functional.cpython-38.pyc -------------------------------------------------------------------------------- /SparseBEVTools/SparseBEVTools/ops/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /SparseBEVTools/SparseBEVTools/ops/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/SparseBEVTools/SparseBEVTools/ops/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /SparseBEVTools/SparseBEVTools/ops/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/SparseBEVTools/SparseBEVTools/ops/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /SparseBEVTools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/SparseBEVTools/__init__.py -------------------------------------------------------------------------------- /SparseBEVTools/setup.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | from setuptools import find_packages, setup 4 | from torch.utils.cpp_extension import BuildExtension, CUDAExtension 5 | import torch 6 | def make_cuda_ext(name, module, sources): 7 | cuda_ext = CUDAExtension( 8 | name='%s.%s' % (module, name), 9 | sources=[os.path.join(*module.split('.'), src) for src in sources] 10 | ) 11 | return cuda_ext 12 | 13 | 14 | if __name__ == '__main__': 15 | #find ./ -name *.so | xargs -I f rm f 16 | # python setup.py build_ext --inplace 17 | # TORCH_CUDA_ARCH_LIST="6.1 7.5" 18 | setup( 19 | name='SparseBEVTools', 20 | version='0.1', 21 | description='', 22 | author='', 23 | author_email='', 24 | license='Apache License 2.0', 25 | cmdclass={'build_ext': BuildExtension}, 26 | packages=find_packages(), 27 | include_package_data=True, 28 | package_data={'SparseBEVTools': ['*/*.so']}, 29 | ext_modules=[ 30 | make_cuda_ext( 31 | name='SparseBEVToolsCUDA', 32 | module='SparseBEVTools.ops', 33 | sources=[ 34 | 'src/sparse2bev.cpp', 35 | 'src/sparse2bev_cuda.cu', 36 | ] 37 | ) 38 | ], 39 | ) 40 | 41 | -------------------------------------------------------------------------------- /openpcdet/pcdet.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.1 2 | Name: pcdet 3 | Version: 0.6.0+0 4 | Summary: OpenPCDet is a general codebase for 3D object detection from point cloud 5 | Author: Shaoshuai Shi 6 | Author-email: shaoshuaics@gmail.com 7 | License: Apache License 2.0 8 | License-File: LICENSE 9 | -------------------------------------------------------------------------------- /openpcdet/pcdet.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openpcdet/pcdet.egg-info/requires.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | llvmlite 3 | numba 4 | tensorboardX 5 | easydict 6 | pyyaml 7 | scikit-image 8 | tqdm 9 | SharedArray 10 | -------------------------------------------------------------------------------- /openpcdet/pcdet.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | pcdet 2 | -------------------------------------------------------------------------------- /openpcdet/pcdet/__init__.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | from pathlib import Path 3 | 4 | from .version import __version__ 5 | 6 | __all__ = [ 7 | '__version__' 8 | ] 9 | 10 | 11 | def get_git_commit_number(): 12 | if not (Path(__file__).parent / '../.git').exists(): 13 | return '0000000' 14 | 15 | cmd_out = subprocess.run(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE) 16 | git_commit_number = cmd_out.stdout.decode('utf-8')[:7] 17 | return git_commit_number 18 | 19 | 20 | script_version = get_git_commit_number() 21 | 22 | 23 | if script_version not in __version__: 24 | __version__ = __version__ + '+py%s' % script_version 25 | -------------------------------------------------------------------------------- /openpcdet/pcdet/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/__pycache__/config.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/__pycache__/config.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/__pycache__/config.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/__pycache__/config.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/__pycache__/version.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/__pycache__/version.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/__pycache__/version.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/__pycache__/version.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/__pycache__/dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/__pycache__/dataset.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/__pycache__/dataset.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/__pycache__/dataset.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/augmentor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/augmentor/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/augmentor/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/augmentor/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/augmentor/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/augmentor/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/augmentor/__pycache__/augmentor_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/augmentor/__pycache__/augmentor_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/augmentor/__pycache__/augmentor_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/augmentor/__pycache__/augmentor_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/augmentor/__pycache__/data_augmentor.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/augmentor/__pycache__/data_augmentor.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/augmentor/__pycache__/data_augmentor.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/augmentor/__pycache__/data_augmentor.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/augmentor/__pycache__/database_sampler.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/augmentor/__pycache__/database_sampler.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/augmentor/__pycache__/database_sampler.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/augmentor/__pycache__/database_sampler.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/custom/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/custom/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/custom/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/custom/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/custom/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/custom/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/custom/__pycache__/custom_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/custom/__pycache__/custom_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/custom/__pycache__/custom_dataset.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/custom/__pycache__/custom_dataset.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/__pycache__/kitti_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/__pycache__/kitti_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/__pycache__/kitti_dataset.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/__pycache__/kitti_dataset.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/__pycache__/kitti_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/__pycache__/kitti_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/__pycache__/kitti_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/__pycache__/kitti_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/README.md: -------------------------------------------------------------------------------- 1 | # kitti-object-eval-python 2 | **Note**: This is borrowed from [traveller59/kitti-object-eval-python](https://github.com/traveller59/kitti-object-eval-python) 3 | 4 | Fast kitti object detection eval in python(finish eval in less than 10 second), support 2d/bev/3d/aos. , support coco-style AP. If you use command line interface, numba need some time to compile jit functions. 5 | ## Dependencies 6 | Only support python 3.6+, need `numpy`, `skimage`, `numba`, `fire`. If you have Anaconda, just install `cudatoolkit` in anaconda. Otherwise, please reference to this [page](https://github.com/numba/numba#custom-python-environments) to set up llvm and cuda for numba. 7 | * Install by conda: 8 | ``` 9 | conda install -c numba cudatoolkit=x.x (8.0, 9.0, 9.1, depend on your environment) 10 | ``` 11 | ## Usage 12 | * commandline interface: 13 | ``` 14 | python evaluate.py evaluate --label_path=/path/to/your_gt_label_folder --result_path=/path/to/your_result_folder --label_split_file=/path/to/val.txt --current_class=0 --coco=False 15 | ``` 16 | * python interface: 17 | ```Python 18 | import kitti_common as kitti 19 | from eval import get_official_eval_result, get_coco_eval_result 20 | def _read_imageset_file(path): 21 | with open(path, 'r') as f: 22 | lines = f.readlines() 23 | return [int(line) for line in lines] 24 | det_path = "/path/to/your_result_folder" 25 | dt_annos = kitti.get_label_annos(det_path) 26 | gt_path = "/path/to/your_gt_label_folder" 27 | gt_split_file = "/path/to/val.txt" # from https://xiaozhichen.github.io/files/mv3d/imagesets.tar.gz 28 | val_image_ids = _read_imageset_file(gt_split_file) 29 | gt_annos = kitti.get_label_annos(gt_path, val_image_ids) 30 | print(get_official_eval_result(gt_annos, dt_annos, 0)) # 6s in my computer 31 | print(get_coco_eval_result(gt_annos, dt_annos, 0)) # 18s in my computer 32 | ``` 33 | -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/eval.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/eval.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/eval.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/eval.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/kitti_common.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/kitti_common.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/kitti_common.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/kitti_common.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/rotate_iou.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/rotate_iou.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/rotate_iou.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/__pycache__/rotate_iou.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/kitti/kitti_object_eval_python/evaluate.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | import fire 4 | 5 | import .kitti_common as kitti 6 | from .eval import get_coco_eval_result, get_official_eval_result 7 | 8 | 9 | def _read_imageset_file(path): 10 | with open(path, 'r') as f: 11 | lines = f.readlines() 12 | return [int(line) for line in lines] 13 | 14 | 15 | def evaluate(label_path, 16 | result_path, 17 | label_split_file, 18 | current_class=0, 19 | coco=False, 20 | score_thresh=-1): 21 | dt_annos = kitti.get_label_annos(result_path) 22 | if score_thresh > 0: 23 | dt_annos = kitti.filter_annos_low_score(dt_annos, score_thresh) 24 | val_image_ids = _read_imageset_file(label_split_file) 25 | gt_annos = kitti.get_label_annos(label_path, val_image_ids) 26 | if coco: 27 | return get_coco_eval_result(gt_annos, dt_annos, current_class) 28 | else: 29 | return get_official_eval_result(gt_annos, dt_annos, current_class) 30 | 31 | 32 | if __name__ == '__main__': 33 | fire.Fire() 34 | -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/lyft/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/lyft/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/lyft/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/lyft/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/lyft/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/lyft/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/lyft/__pycache__/lyft_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/lyft/__pycache__/lyft_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/lyft/__pycache__/lyft_dataset.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/lyft/__pycache__/lyft_dataset.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/lyft/lyft_mAP_eval/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/lyft/lyft_mAP_eval/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/nuscenes/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/nuscenes/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/nuscenes/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/nuscenes/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/nuscenes/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/nuscenes/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/nuscenes/__pycache__/nuscenes_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/nuscenes/__pycache__/nuscenes_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/nuscenes/__pycache__/nuscenes_dataset.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/nuscenes/__pycache__/nuscenes_dataset.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/nuscenes/__pycache__/nuscenes_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/nuscenes/__pycache__/nuscenes_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/once/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/once/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/once/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/once/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/once/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/once/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/once/__pycache__/once_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/once/__pycache__/once_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/once/__pycache__/once_dataset.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/once/__pycache__/once_dataset.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/once/__pycache__/once_toolkits.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/once/__pycache__/once_toolkits.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/once/__pycache__/once_toolkits.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/once/__pycache__/once_toolkits.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/once/once_eval/eval_utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | 4 | def compute_split_parts(num_samples, num_parts): 5 | part_samples = num_samples // num_parts 6 | remain_samples = num_samples % num_parts 7 | if part_samples == 0: 8 | return [num_samples] 9 | if remain_samples == 0: 10 | return [part_samples] * num_parts 11 | else: 12 | return [part_samples] * num_parts + [remain_samples] 13 | 14 | 15 | def overall_filter(boxes): 16 | ignore = np.zeros(boxes.shape[0], dtype=bool) # all false 17 | return ignore 18 | 19 | 20 | def distance_filter(boxes, level): 21 | ignore = np.ones(boxes.shape[0], dtype=bool) # all true 22 | dist = np.sqrt(np.sum(boxes[:, 0:3] * boxes[:, 0:3], axis=1)) 23 | 24 | if level == 0: # 0-30m 25 | flag = dist < 30 26 | elif level == 1: # 30-50m 27 | flag = (dist >= 30) & (dist < 50) 28 | elif level == 2: # 50m-inf 29 | flag = dist >= 50 30 | else: 31 | assert False, 'level < 3 for distance metric, found level %s' % (str(level)) 32 | 33 | ignore[flag] = False 34 | return ignore 35 | 36 | 37 | def overall_distance_filter(boxes, level): 38 | ignore = np.ones(boxes.shape[0], dtype=bool) # all true 39 | dist = np.sqrt(np.sum(boxes[:, 0:3] * boxes[:, 0:3], axis=1)) 40 | 41 | if level == 0: 42 | flag = np.ones(boxes.shape[0], dtype=bool) 43 | elif level == 1: # 0-30m 44 | flag = dist < 30 45 | elif level == 2: # 30-50m 46 | flag = (dist >= 30) & (dist < 50) 47 | elif level == 3: # 50m-inf 48 | flag = dist >= 50 49 | else: 50 | assert False, 'level < 4 for overall & distance metric, found level %s' % (str(level)) 51 | 52 | ignore[flag] = False 53 | return ignore -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/pandaset/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/pandaset/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/pandaset/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/pandaset/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/pandaset/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/pandaset/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/pandaset/__pycache__/pandaset_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/pandaset/__pycache__/pandaset_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/pandaset/__pycache__/pandaset_dataset.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/pandaset/__pycache__/pandaset_dataset.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/processor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/processor/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/processor/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/processor/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/processor/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/processor/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/processor/__pycache__/data_processor.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/processor/__pycache__/data_processor.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/processor/__pycache__/data_processor.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/processor/__pycache__/data_processor.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/processor/__pycache__/point_feature_encoder.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/processor/__pycache__/point_feature_encoder.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/processor/__pycache__/point_feature_encoder.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/processor/__pycache__/point_feature_encoder.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/waymo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/waymo/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/waymo/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/waymo/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/waymo/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/waymo/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/waymo/__pycache__/waymo_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/waymo/__pycache__/waymo_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/datasets/waymo/__pycache__/waymo_dataset.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/datasets/waymo/__pycache__/waymo_dataset.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/__init__.py: -------------------------------------------------------------------------------- 1 | from collections import namedtuple 2 | 3 | import numpy as np 4 | import torch 5 | 6 | from .detectors import build_detector 7 | 8 | try: 9 | import kornia 10 | except: 11 | pass 12 | # print('Warning: kornia is not installed. This package is only required by CaDDN') 13 | 14 | 15 | 16 | def build_network(model_cfg, num_class, dataset): 17 | model = build_detector( 18 | model_cfg=model_cfg, num_class=num_class, dataset=dataset 19 | ) 20 | return model 21 | 22 | 23 | def load_data_to_gpu(batch_dict): 24 | for key, val in batch_dict.items(): 25 | if not isinstance(val, np.ndarray): 26 | continue 27 | elif key in ['frame_id', 'metadata', 'calib']: 28 | continue 29 | elif key in ['images']: 30 | batch_dict[key] = kornia.image_to_tensor(val).float().cuda().contiguous() 31 | elif key in ['image_shape']: 32 | batch_dict[key] = torch.from_numpy(val).int().cuda() 33 | else: 34 | batch_dict[key] = torch.from_numpy(val).float().cuda() 35 | 36 | 37 | def model_fn_decorator(): 38 | ModelReturn = namedtuple('ModelReturn', ['loss', 'tb_dict', 'disp_dict']) 39 | 40 | def model_func(model, batch_dict): 41 | load_data_to_gpu(batch_dict) 42 | ret_dict, tb_dict, disp_dict = model(batch_dict) 43 | 44 | loss = ret_dict['loss'].mean() 45 | if hasattr(model, 'update_global_step'): 46 | model.update_global_step() 47 | else: 48 | model.module.update_global_step() 49 | 50 | return ModelReturn(loss, tb_dict, disp_dict) 51 | 52 | return model_func 53 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/__init__.py: -------------------------------------------------------------------------------- 1 | from .base_bev_backbone import BaseBEVBackbone, BaseBEVBackboneV1 2 | 3 | __all__ = { 4 | 'BaseBEVBackbone': BaseBEVBackbone, 5 | 'BaseBEVBackboneV1': BaseBEVBackboneV1 6 | } 7 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/__pycache__/base_bev_backbone.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/__pycache__/base_bev_backbone.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/__pycache__/base_bev_backbone.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/__pycache__/base_bev_backbone.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/__pycache__/masked_bn.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/__pycache__/masked_bn.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/__pycache__/masked_bn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/__pycache__/masked_bn.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/__init__.py: -------------------------------------------------------------------------------- 1 | from .height_compression import HeightCompression 2 | from .pointpillar_scatter import PointPillarScatter 3 | from .conv2d_collapse import Conv2DCollapse 4 | 5 | __all__ = { 6 | 'HeightCompression': HeightCompression, 7 | 'PointPillarScatter': PointPillarScatter, 8 | 'Conv2DCollapse': Conv2DCollapse 9 | } 10 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/conv2d_collapse.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/conv2d_collapse.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/conv2d_collapse.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/conv2d_collapse.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/height_compression.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/height_compression.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/height_compression.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/height_compression.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/pointpillar_scatter.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/pointpillar_scatter.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/pointpillar_scatter.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_2d/map_to_bev/__pycache__/pointpillar_scatter.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/conv2d_collapse.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | 4 | from pcdet.models.model_utils.basic_block_2d import BasicBlock2D 5 | 6 | 7 | class Conv2DCollapse(nn.Module): 8 | 9 | def __init__(self, model_cfg, grid_size): 10 | """ 11 | Initializes 2D convolution collapse module 12 | Args: 13 | model_cfg: EasyDict, Model configuration 14 | grid_size: (X, Y, Z) Voxel grid size 15 | """ 16 | super().__init__() 17 | self.model_cfg = model_cfg 18 | self.num_heights = grid_size[-1] 19 | self.num_bev_features = self.model_cfg.NUM_BEV_FEATURES 20 | self.block = BasicBlock2D(in_channels=self.num_bev_features * self.num_heights, 21 | out_channels=self.num_bev_features, 22 | **self.model_cfg.ARGS) 23 | 24 | def forward(self, batch_dict): 25 | """ 26 | Collapses voxel features to BEV via concatenation and channel reduction 27 | Args: 28 | batch_dict: 29 | voxel_features: (B, C, Z, Y, X), Voxel feature representation 30 | Returns: 31 | batch_dict: 32 | spatial_features: (B, C, Y, X), BEV feature representation 33 | """ 34 | voxel_features = batch_dict["voxel_features"] 35 | bev_features = voxel_features.flatten(start_dim=1, end_dim=2) # (B, C, Z, Y, X) -> (B, C*Z, Y, X) 36 | bev_features = self.block(bev_features) # (B, C*Z, Y, X) -> (B, C, Y, X) 37 | batch_dict["spatial_features"] = bev_features 38 | return batch_dict 39 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/height_compression.py: -------------------------------------------------------------------------------- 1 | import torch.nn as nn 2 | import torch 3 | 4 | 5 | class HeightCompression(nn.Module): 6 | def __init__(self, model_cfg, **kwargs): 7 | super().__init__() 8 | self.model_cfg = model_cfg 9 | self.num_bev_features = self.model_cfg.NUM_BEV_FEATURES 10 | 11 | def forward(self, batch_dict): 12 | """ 13 | Args: 14 | batch_dict: 15 | encoded_spconv_tensor: sparse tensor 16 | Returns: 17 | batch_dict: 18 | spatial_features: 19 | 20 | """ 21 | encoded_spconv_tensor = batch_dict['encoded_spconv_tensor'] 22 | # self.bev_density_map = self.get_density_map(encoded_spconv_tensor) 23 | spatial_features = encoded_spconv_tensor.dense() 24 | N, C, D, H, W = spatial_features.shape 25 | spatial_features = spatial_features.view(N, C * D, H, W) 26 | batch_dict['spatial_features'] = spatial_features 27 | batch_dict['spatial_features_stride'] = batch_dict['encoded_spconv_tensor_stride'] 28 | return batch_dict 29 | 30 | def get_density_map(self, spconv_tensor): 31 | pass 32 | 33 | # The Accurate way: close to simple pooling 34 | # spatial_shape = spconv_tensor.spatial_shape 35 | # voxel_coords = spconv_tensor.indices 36 | # batch_size = spconv_tensor.batch_size 37 | # pool_size = 4 38 | # for i_bs in range(batch_size): 39 | # voxels_cur_batch = voxel_coords[torch.where(voxel_coords[:,0]==i_bs)[0],1:] # [N,3] 40 | # flattened_voxel_coords = voxel_coords[:,1]//pool_size + (voxel_coords[:,2]//pool_size)*(spatial_shape[1]//pool_size) 41 | # unique_voxel_coords, unique_counts = flattened_voxel_coords.unique(return_counts=True) 42 | # unique_voxel_coords = torch.stack([unique_voxel_coords//(spatial_shape[1]//pool_size),unique_voxel_coords%(spatial_shape[1]//pool_size)],dim=-1) 43 | 44 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_2d/map_to_bev/pointpillar_scatter.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | 4 | 5 | class PointPillarScatter(nn.Module): 6 | def __init__(self, model_cfg, grid_size, **kwargs): 7 | super().__init__() 8 | 9 | self.model_cfg = model_cfg 10 | self.num_bev_features = self.model_cfg.NUM_BEV_FEATURES 11 | self.nx, self.ny, self.nz = grid_size 12 | assert self.nz == 1 13 | 14 | def forward(self, batch_dict, **kwargs): 15 | pillar_features, coords = batch_dict['pillar_features'], batch_dict['voxel_coords'] 16 | batch_spatial_features = [] 17 | batch_size = coords[:, 0].max().int().item() + 1 18 | for batch_idx in range(batch_size): 19 | spatial_feature = torch.zeros( 20 | self.num_bev_features, 21 | self.nz * self.nx * self.ny, 22 | dtype=pillar_features.dtype, 23 | device=pillar_features.device) 24 | 25 | batch_mask = coords[:, 0] == batch_idx 26 | this_coords = coords[batch_mask, :] 27 | indices = this_coords[:, 1] + this_coords[:, 2] * self.nx + this_coords[:, 3] 28 | indices = indices.type(torch.long) 29 | pillars = pillar_features[batch_mask, :] 30 | pillars = pillars.t() 31 | spatial_feature[:, indices] = pillars 32 | batch_spatial_features.append(spatial_feature) 33 | 34 | batch_spatial_features = torch.stack(batch_spatial_features, 0) 35 | batch_spatial_features = batch_spatial_features.view(batch_size, self.num_bev_features * self.nz, self.ny, self.nx) 36 | batch_dict['spatial_features'] = batch_spatial_features 37 | return batch_dict 38 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__init__.py: -------------------------------------------------------------------------------- 1 | from .pointnet2_backbone import PointNet2Backbone, PointNet2MSG 2 | from .spconv_backbone import VoxelBackBone8x, VoxelResBackBone8x 3 | from .spconv_backbone_2d import PillarBackBone8x, PillarRes18BackBone8x 4 | from .spconv_backbone_focal import VoxelBackBone8xFocal 5 | from .spconv_unet import UNetV2 6 | 7 | __all__ = { 8 | 'VoxelBackBone8x': VoxelBackBone8x, 9 | 'UNetV2': UNetV2, 10 | 'PointNet2Backbone': PointNet2Backbone, 11 | 'PointNet2MSG': PointNet2MSG, 12 | 'VoxelResBackBone8x': VoxelResBackBone8x, 13 | 'VoxelBackBone8xFocal': VoxelBackBone8xFocal, 14 | 'PillarBackBone8x': PillarBackBone8x, 15 | 'PillarRes18BackBone8x': PillarRes18BackBone8x 16 | } 17 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/check_inbox.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/check_inbox.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/drop_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/drop_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/drop_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/drop_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/pointnet2_backbone.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/pointnet2_backbone.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/pointnet2_backbone.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/pointnet2_backbone.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone_2d.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone_2d.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone_2d.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone_2d.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone_focal.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone_focal.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone_focal.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_backbone_focal.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_unet.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_unet.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_unet.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/__pycache__/spconv_unet.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/basic_blocks.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/basic_blocks.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/basic_blocks.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/basic_blocks.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/pyramid_ffn.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/pyramid_ffn.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/pyramid_ffn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/pyramid_ffn.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/sem_deeplabv3.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/sem_deeplabv3.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/sem_deeplabv3.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/__pycache__/sem_deeplabv3.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/SemanticSeg/basic_blocks.py: -------------------------------------------------------------------------------- 1 | import torch.nn as nn 2 | 3 | class BasicBlock1D(nn.Module): 4 | 5 | def __init__(self, in_channels, out_channels, **kwargs): 6 | """ 7 | Initializes convolutional block 8 | Args: 9 | in_channels: int, Number of input channels 10 | out_channels: int, Number of output channels 11 | **kwargs: Dict, Extra arguments for nn.Conv2d 12 | """ 13 | super().__init__() 14 | self.in_channels = in_channels 15 | self.out_channels = out_channels 16 | self.conv = nn.Conv1d(in_channels=in_channels, 17 | out_channels=out_channels, 18 | **kwargs) 19 | self.bn = nn.BatchNorm1d(out_channels) 20 | self.relu = nn.ReLU(inplace=True) 21 | 22 | def forward(self, features): 23 | """ 24 | Applies convolutional block 25 | Args: 26 | features: (B, C_in, H, W), Input features 27 | Returns: 28 | x: (B, C_out, H, W), Output features 29 | """ 30 | x = self.conv(features) 31 | x = self.bn(x) 32 | x = self.relu(x) 33 | return x 34 | 35 | class BasicBlock2D(nn.Module): 36 | 37 | def __init__(self, in_channels, out_channels, **kwargs): 38 | """ 39 | Initializes convolutional block 40 | Args: 41 | in_channels: int, Number of input channels 42 | out_channels: int, Number of output channels 43 | **kwargs: Dict, Extra arguments for nn.Conv2d 44 | """ 45 | super().__init__() 46 | self.in_channels = in_channels 47 | self.out_channels = out_channels 48 | self.conv = nn.Conv2d(in_channels=in_channels, 49 | out_channels=out_channels, 50 | **kwargs) 51 | self.bn = nn.BatchNorm2d(out_channels) 52 | self.relu = nn.ReLU(inplace=True) 53 | 54 | def forward(self, features): 55 | """ 56 | Applies convolutional block 57 | Args: 58 | features: (B, C_in, H, W), Input features 59 | Returns: 60 | x: (B, C_out, H, W), Output features 61 | """ 62 | x = self.conv(features) 63 | x = self.bn(x) 64 | x = self.relu(x) 65 | return x 66 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/__pycache__/focal_sparse_conv.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/__pycache__/focal_sparse_conv.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/__pycache__/focal_sparse_conv.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/__pycache__/focal_sparse_conv.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/__pycache__/focal_sparse_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/__pycache__/focal_sparse_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/__pycache__/focal_sparse_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/focal_sparse_conv/__pycache__/focal_sparse_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/pfe/__init__.py: -------------------------------------------------------------------------------- 1 | from .voxel_set_abstraction import VoxelSetAbstraction 2 | 3 | __all__ = { 4 | 'VoxelSetAbstraction': VoxelSetAbstraction 5 | } 6 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/pfe/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/pfe/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/pfe/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/pfe/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/pfe/__pycache__/voxel_set_abstraction.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/pfe/__pycache__/voxel_set_abstraction.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/pfe/__pycache__/voxel_set_abstraction.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/pfe/__pycache__/voxel_set_abstraction.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__init__.py: -------------------------------------------------------------------------------- 1 | from .mean_vfe import MeanVFE 2 | from .pillar_vfe import PillarVFE 3 | from .dynamic_mean_vfe import DynamicMeanVFE 4 | from .dynamic_pillar_vfe import DynamicPillarVFE, DynamicPillarVFESimple2D 5 | from .image_vfe import ImageVFE 6 | from .drop_voxel_vfe import DropVoxelVFE 7 | from .vfe_template import VFETemplate 8 | 9 | __all__ = { 10 | 'VFETemplate': VFETemplate, 11 | 'MeanVFE': MeanVFE, 12 | 'PillarVFE': PillarVFE, 13 | 'ImageVFE': ImageVFE, 14 | 'DynMeanVFE': DynamicMeanVFE, 15 | 'DynPillarVFE': DynamicPillarVFE, 16 | 'DynamicPillarVFESimple2D': DynamicPillarVFESimple2D, 17 | 'DropVoxelVFE': DropVoxelVFE, 18 | } 19 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/drop_voxel_vfe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/drop_voxel_vfe.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/drop_voxel_vfe.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/drop_voxel_vfe.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/dynamic_mean_vfe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/dynamic_mean_vfe.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/dynamic_mean_vfe.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/dynamic_mean_vfe.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/dynamic_pillar_vfe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/dynamic_pillar_vfe.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/dynamic_pillar_vfe.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/dynamic_pillar_vfe.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/image_vfe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/image_vfe.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/image_vfe.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/image_vfe.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/mean_vfe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/mean_vfe.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/mean_vfe.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/mean_vfe.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/pillar_vfe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/pillar_vfe.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/pillar_vfe.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/pillar_vfe.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/vfe_template.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/vfe_template.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/vfe_template.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/__pycache__/vfe_template.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__init__.py: -------------------------------------------------------------------------------- 1 | from .frustum_to_voxel import FrustumToVoxel 2 | 3 | __all__ = { 4 | 'FrustumToVoxel': FrustumToVoxel 5 | } 6 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/frustum_grid_generator.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/frustum_grid_generator.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/frustum_grid_generator.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/frustum_grid_generator.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/frustum_to_voxel.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/frustum_to_voxel.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/frustum_to_voxel.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/frustum_to_voxel.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/sampler.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/sampler.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/sampler.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/__pycache__/sampler.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/f2v/sampler.py: -------------------------------------------------------------------------------- 1 | from functools import partial 2 | 3 | import torch 4 | import torch.nn as nn 5 | import torch.nn.functional as F 6 | 7 | 8 | class Sampler(nn.Module): 9 | 10 | def __init__(self, mode="bilinear", padding_mode="zeros"): 11 | """ 12 | Initializes module 13 | Args: 14 | mode: string, Sampling mode [bilinear/nearest] 15 | padding_mode: string, Padding mode for outside grid values [zeros/border/reflection] 16 | """ 17 | super().__init__() 18 | self.mode = mode 19 | self.padding_mode = padding_mode 20 | 21 | if torch.__version__ >= '1.3': 22 | self.grid_sample = partial(F.grid_sample, align_corners=True) 23 | else: 24 | self.grid_sample = F.grid_sample 25 | 26 | def forward(self, input_features, grid): 27 | """ 28 | Samples input using sampling grid 29 | Args: 30 | input_features: (B, C, D, H, W), Input frustum features 31 | grid: (B, X, Y, Z, 3), Sampling grids for input features 32 | Returns 33 | output_features: (B, C, X, Y, Z) Output voxel features 34 | """ 35 | # Sample from grid 36 | output = self.grid_sample(input=input_features, grid=grid, mode=self.mode, padding_mode=self.padding_mode) 37 | return output 38 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/__init__.py: -------------------------------------------------------------------------------- 1 | from .depth_ffn import DepthFFN 2 | 3 | __all__ = { 4 | 'DepthFFN': DepthFFN 5 | } 6 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/__pycache__/depth_ffn.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/__pycache__/depth_ffn.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/__pycache__/depth_ffn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/__pycache__/depth_ffn.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__init__.py: -------------------------------------------------------------------------------- 1 | from .ddn_deeplabv3 import DDNDeepLabV3 2 | 3 | __all__ = { 4 | 'DDNDeepLabV3': DDNDeepLabV3 5 | } 6 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/ddn_deeplabv3.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/ddn_deeplabv3.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/ddn_deeplabv3.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/ddn_deeplabv3.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/ddn_template.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/ddn_template.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/ddn_template.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/__pycache__/ddn_template.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn/ddn_deeplabv3.py: -------------------------------------------------------------------------------- 1 | from .ddn_template import DDNTemplate 2 | 3 | try: 4 | import torchvision 5 | except: 6 | pass 7 | 8 | 9 | class DDNDeepLabV3(DDNTemplate): 10 | 11 | def __init__(self, backbone_name, **kwargs): 12 | """ 13 | Initializes DDNDeepLabV3 model 14 | Args: 15 | backbone_name: string, ResNet Backbone Name [ResNet50/ResNet101] 16 | """ 17 | if backbone_name == "ResNet50": 18 | constructor = torchvision.models.segmentation.deeplabv3_resnet50 19 | elif backbone_name == "ResNet101": 20 | constructor = torchvision.models.segmentation.deeplabv3_resnet101 21 | else: 22 | raise NotImplementedError 23 | 24 | super().__init__(constructor=constructor, **kwargs) 25 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__init__.py: -------------------------------------------------------------------------------- 1 | from .ddn_loss import DDNLoss 2 | 3 | __all__ = { 4 | "DDNLoss": DDNLoss 5 | } 6 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/balancer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/balancer.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/balancer.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/balancer.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/ddn_loss.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/ddn_loss.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/ddn_loss.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/__pycache__/ddn_loss.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/image_vfe_modules/ffn/ddn_loss/balancer.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | 4 | from pcdet.utils import loss_utils 5 | 6 | 7 | class Balancer(nn.Module): 8 | def __init__(self, fg_weight, bg_weight, downsample_factor=1): 9 | """ 10 | Initialize fixed foreground/background loss balancer 11 | Args: 12 | fg_weight: float, Foreground loss weight 13 | bg_weight: float, Background loss weight 14 | downsample_factor: int, Depth map downsample factor 15 | """ 16 | super().__init__() 17 | self.fg_weight = fg_weight 18 | self.bg_weight = bg_weight 19 | self.downsample_factor = downsample_factor 20 | 21 | def forward(self, loss, gt_boxes2d): 22 | """ 23 | Forward pass 24 | Args: 25 | loss: (B, H, W), Pixel-wise loss 26 | gt_boxes2d: (B, N, 4), 2D box labels for foreground/background balancing 27 | Returns: 28 | loss: (1), Total loss after foreground/background balancing 29 | tb_dict: dict[float], All losses to log in tensorboard 30 | """ 31 | # Compute masks 32 | fg_mask = loss_utils.compute_fg_mask(gt_boxes2d=gt_boxes2d, 33 | shape=loss.shape, 34 | downsample_factor=self.downsample_factor, 35 | device=loss.device) 36 | bg_mask = ~fg_mask 37 | 38 | # Compute balancing weights 39 | weights = self.fg_weight * fg_mask + self.bg_weight * bg_mask 40 | num_pixels = fg_mask.sum() + bg_mask.sum() 41 | 42 | # Compute losses 43 | loss *= weights 44 | fg_loss = loss[fg_mask].sum() / num_pixels 45 | bg_loss = loss[bg_mask].sum() / num_pixels 46 | 47 | # Get total loss 48 | loss = fg_loss + bg_loss 49 | tb_dict = {"balancer_loss": loss.item(), "fg_loss": fg_loss.item(), "bg_loss": bg_loss.item()} 50 | return loss, tb_dict 51 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/mean_vfe.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | from .vfe_template import VFETemplate 4 | 5 | 6 | class MeanVFE(VFETemplate): 7 | def __init__(self, model_cfg, num_point_features, **kwargs): 8 | super().__init__(model_cfg=model_cfg) 9 | self.num_point_features = num_point_features 10 | 11 | def get_output_feature_dim(self): 12 | return self.num_point_features 13 | 14 | def forward(self, batch_dict, **kwargs): 15 | """ 16 | Args: 17 | batch_dict: 18 | voxels: (num_voxels, max_points_per_voxel, C) 19 | voxel_num_points: optional (num_voxels) 20 | **kwargs: 21 | 22 | Returns: 23 | vfe_features: (num_voxels, C) 24 | """ 25 | voxel_features, voxel_num_points = batch_dict['voxels'], batch_dict['voxel_num_points'] 26 | points_mean = voxel_features[:, :, :].sum(dim=1, keepdim=False) 27 | normalizer = torch.clamp_min(voxel_num_points.view(-1, 1), min=1.0).type_as(voxel_features) 28 | points_mean = points_mean / normalizer 29 | batch_dict['voxel_features'] = points_mean.contiguous() 30 | 31 | return batch_dict 32 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/backbones_3d/vfe/vfe_template.py: -------------------------------------------------------------------------------- 1 | import torch.nn as nn 2 | 3 | 4 | class VFETemplate(nn.Module): 5 | def __init__(self, model_cfg, **kwargs): 6 | super().__init__() 7 | self.model_cfg = model_cfg 8 | 9 | def get_output_feature_dim(self): 10 | raise NotImplementedError 11 | 12 | def forward(self, **kwargs): 13 | """ 14 | Args: 15 | **kwargs: 16 | 17 | Returns: 18 | batch_dict: 19 | ... 20 | vfe_features: (num_voxels, C) 21 | """ 22 | raise NotImplementedError 23 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__init__.py: -------------------------------------------------------------------------------- 1 | from .anchor_head_multi import AnchorHeadMulti 2 | from .anchor_head_single import AnchorHeadSingle 3 | from .anchor_head_template import AnchorHeadTemplate 4 | from .point_head_box import PointHeadBox 5 | from .point_head_simple import PointHeadSimple 6 | from .point_intra_part_head import PointIntraPartOffsetHead 7 | from .center_head import CenterHead 8 | 9 | __all__ = { 10 | 'AnchorHeadTemplate': AnchorHeadTemplate, 11 | 'AnchorHeadSingle': AnchorHeadSingle, 12 | 'PointIntraPartOffsetHead': PointIntraPartOffsetHead, 13 | 'PointHeadSimple': PointHeadSimple, 14 | 'PointHeadBox': PointHeadBox, 15 | 'AnchorHeadMulti': AnchorHeadMulti, 16 | 'CenterHead': CenterHead 17 | } 18 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_multi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_multi.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_multi.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_multi.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_single.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_single.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_single.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_single.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_template.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_template.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_template.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/anchor_head_template.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/center_head.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/center_head.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/center_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/center_head.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/point_head_box.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/point_head_box.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/point_head_box.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/point_head_box.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/point_head_simple.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/point_head_simple.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/point_head_simple.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/point_head_simple.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/point_head_template.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/point_head_template.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/point_head_template.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/point_head_template.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/point_intra_part_head.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/point_intra_part_head.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/__pycache__/point_intra_part_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/__pycache__/point_intra_part_head.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/target_assigner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/target_assigner/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/anchor_generator.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/anchor_generator.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/anchor_generator.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/anchor_generator.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/atss_target_assigner.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/atss_target_assigner.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/atss_target_assigner.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/atss_target_assigner.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/axis_aligned_target_assigner.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/axis_aligned_target_assigner.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/axis_aligned_target_assigner.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/dense_heads/target_assigner/__pycache__/axis_aligned_target_assigner.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/PartA2_net.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | 3 | 4 | class PartA2Net(Detector3DTemplate): 5 | def __init__(self, model_cfg, num_class, dataset): 6 | super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset) 7 | self.module_list = self.build_networks() 8 | 9 | def forward(self, batch_dict): 10 | for cur_module in self.module_list: 11 | batch_dict = cur_module(batch_dict) 12 | 13 | if self.training: 14 | loss, tb_dict, disp_dict = self.get_training_loss() 15 | 16 | ret_dict = { 17 | 'loss': loss 18 | } 19 | return ret_dict, tb_dict, disp_dict 20 | else: 21 | pred_dicts, recall_dicts = self.post_processing(batch_dict) 22 | return pred_dicts, recall_dicts 23 | 24 | def get_training_loss(self): 25 | disp_dict = {} 26 | loss_rpn, tb_dict = self.dense_head.get_loss() 27 | loss_point, tb_dict = self.point_head.get_loss(tb_dict) 28 | loss_rcnn, tb_dict = self.roi_head.get_loss(tb_dict) 29 | 30 | loss = loss_rpn + loss_point + loss_rcnn 31 | return loss, tb_dict, disp_dict 32 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__init__.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | from .PartA2_net import PartA2Net 3 | from .point_rcnn import PointRCNN 4 | from .pointpillar import PointPillar 5 | from .pv_rcnn import PVRCNN 6 | from .second_net import SECONDNet 7 | from .second_net_iou import SECONDNetIoU 8 | from .caddn import CaDDN 9 | from .voxel_rcnn import VoxelRCNN 10 | from .centerpoint import CenterPoint 11 | from .pv_rcnn_plusplus import PVRCNNPlusPlus 12 | from .mppnet import MPPNet 13 | from .mppnet_e2e import MPPNetE2E 14 | from .pillarnet import PillarNet 15 | 16 | __all__ = { 17 | 'Detector3DTemplate': Detector3DTemplate, 18 | 'SECONDNet': SECONDNet, 19 | 'PartA2Net': PartA2Net, 20 | 'PVRCNN': PVRCNN, 21 | 'PointPillar': PointPillar, 22 | 'PointRCNN': PointRCNN, 23 | 'SECONDNetIoU': SECONDNetIoU, 24 | 'CaDDN': CaDDN, 25 | 'VoxelRCNN': VoxelRCNN, 26 | 'CenterPoint': CenterPoint, 27 | 'PillarNet': PillarNet, 28 | 'PVRCNNPlusPlus': PVRCNNPlusPlus, 29 | 'MPPNet': MPPNet, 30 | 'MPPNetE2E': MPPNetE2E, 31 | 'PillarNet': PillarNet 32 | } 33 | 34 | 35 | def build_detector(model_cfg, num_class, dataset): 36 | model = __all__[model_cfg.NAME]( 37 | model_cfg=model_cfg, num_class=num_class, dataset=dataset 38 | ) 39 | 40 | return model 41 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/PartA2_net.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/PartA2_net.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/PartA2_net.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/PartA2_net.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/caddn.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/caddn.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/caddn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/caddn.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/centerpoint.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/centerpoint.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/centerpoint.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/centerpoint.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/detector3d_template.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/detector3d_template.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/detector3d_template.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/detector3d_template.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/mppnet.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/mppnet.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/mppnet.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/mppnet.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/mppnet_e2e.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/mppnet_e2e.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/mppnet_e2e.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/mppnet_e2e.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/pillarnet.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/pillarnet.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/pillarnet.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/pillarnet.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/point_rcnn.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/point_rcnn.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/point_rcnn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/point_rcnn.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/pointpillar.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/pointpillar.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/pointpillar.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/pointpillar.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/pv_rcnn.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/pv_rcnn.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/pv_rcnn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/pv_rcnn.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/pv_rcnn_plusplus.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/pv_rcnn_plusplus.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/pv_rcnn_plusplus.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/pv_rcnn_plusplus.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/second_net.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/second_net.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/second_net.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/second_net.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/second_net_iou.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/second_net_iou.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/second_net_iou.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/second_net_iou.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/voxel_rcnn.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/voxel_rcnn.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/__pycache__/voxel_rcnn.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/detectors/__pycache__/voxel_rcnn.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/caddn.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | 3 | 4 | class CaDDN(Detector3DTemplate): 5 | def __init__(self, model_cfg, num_class, dataset): 6 | super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset) 7 | self.module_list = self.build_networks() 8 | 9 | def forward(self, batch_dict): 10 | for cur_module in self.module_list: 11 | batch_dict = cur_module(batch_dict) 12 | 13 | if self.training: 14 | loss, tb_dict, disp_dict = self.get_training_loss() 15 | 16 | ret_dict = { 17 | 'loss': loss 18 | } 19 | return ret_dict, tb_dict, disp_dict 20 | else: 21 | pred_dicts, recall_dicts = self.post_processing(batch_dict) 22 | return pred_dicts, recall_dicts 23 | 24 | def get_training_loss(self): 25 | disp_dict = {} 26 | 27 | loss_rpn, tb_dict_rpn = self.dense_head.get_loss() 28 | loss_depth, tb_dict_depth = self.vfe.get_loss() 29 | 30 | tb_dict = { 31 | 'loss_rpn': loss_rpn.item(), 32 | 'loss_depth': loss_depth.item(), 33 | **tb_dict_rpn, 34 | **tb_dict_depth 35 | } 36 | 37 | loss = loss_rpn + loss_depth 38 | return loss, tb_dict, disp_dict 39 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/pillarnet.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | 3 | 4 | class PillarNet(Detector3DTemplate): 5 | def __init__(self, model_cfg, num_class, dataset): 6 | super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset) 7 | self.module_list = self.build_networks() 8 | 9 | def forward(self, batch_dict): 10 | for cur_module in self.module_list: 11 | batch_dict = cur_module(batch_dict) 12 | 13 | if self.training: 14 | loss, tb_dict, disp_dict = self.get_training_loss() 15 | 16 | ret_dict = { 17 | 'loss': loss 18 | } 19 | return ret_dict, tb_dict, disp_dict 20 | else: 21 | pred_dicts, recall_dicts = self.post_processing(batch_dict) 22 | return pred_dicts, recall_dicts 23 | 24 | def get_training_loss(self): 25 | disp_dict = {} 26 | 27 | loss_rpn, tb_dict = self.dense_head.get_loss() 28 | tb_dict = { 29 | 'loss_rpn': loss_rpn.item(), 30 | **tb_dict 31 | } 32 | 33 | loss = loss_rpn 34 | return loss, tb_dict, disp_dict 35 | 36 | def post_processing(self, batch_dict): 37 | post_process_cfg = self.model_cfg.POST_PROCESSING 38 | batch_size = batch_dict['batch_size'] 39 | final_pred_dict = batch_dict['final_box_dicts'] 40 | recall_dict = {} 41 | for index in range(batch_size): 42 | pred_boxes = final_pred_dict[index]['pred_boxes'] 43 | 44 | recall_dict = self.generate_recall_record( 45 | box_preds=pred_boxes, 46 | recall_dict=recall_dict, batch_index=index, data_dict=batch_dict, 47 | thresh_list=post_process_cfg.RECALL_THRESH_LIST 48 | ) 49 | 50 | return final_pred_dict, recall_dict -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/point_rcnn.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | 3 | 4 | class PointRCNN(Detector3DTemplate): 5 | def __init__(self, model_cfg, num_class, dataset): 6 | super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset) 7 | self.module_list = self.build_networks() 8 | 9 | def forward(self, batch_dict): 10 | for cur_module in self.module_list: 11 | batch_dict = cur_module(batch_dict) 12 | 13 | if self.training: 14 | loss, tb_dict, disp_dict = self.get_training_loss() 15 | 16 | ret_dict = { 17 | 'loss': loss 18 | } 19 | return ret_dict, tb_dict, disp_dict 20 | else: 21 | pred_dicts, recall_dicts = self.post_processing(batch_dict) 22 | return pred_dicts, recall_dicts 23 | 24 | def get_training_loss(self): 25 | disp_dict = {} 26 | loss_point, tb_dict = self.point_head.get_loss() 27 | loss_rcnn, tb_dict = self.roi_head.get_loss(tb_dict) 28 | 29 | loss = loss_point + loss_rcnn 30 | return loss, tb_dict, disp_dict 31 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/pointpillar.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | 3 | 4 | class PointPillar(Detector3DTemplate): 5 | def __init__(self, model_cfg, num_class, dataset): 6 | super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset) 7 | self.module_list = self.build_networks() 8 | 9 | def forward(self, batch_dict): 10 | for cur_module in self.module_list: 11 | batch_dict = cur_module(batch_dict) 12 | 13 | if self.training: 14 | loss, tb_dict, disp_dict = self.get_training_loss() 15 | 16 | ret_dict = { 17 | 'loss': loss 18 | } 19 | return ret_dict, tb_dict, disp_dict 20 | else: 21 | pred_dicts, recall_dicts = self.post_processing(batch_dict) 22 | return pred_dicts, recall_dicts 23 | 24 | def get_training_loss(self): 25 | disp_dict = {} 26 | 27 | loss_rpn, tb_dict = self.dense_head.get_loss() 28 | tb_dict = { 29 | 'loss_rpn': loss_rpn.item(), 30 | **tb_dict 31 | } 32 | 33 | loss = loss_rpn 34 | return loss, tb_dict, disp_dict 35 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/pv_rcnn.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | 3 | 4 | class PVRCNN(Detector3DTemplate): 5 | def __init__(self, model_cfg, num_class, dataset): 6 | super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset) 7 | self.module_list = self.build_networks() 8 | 9 | def forward(self, batch_dict): 10 | for cur_module in self.module_list: 11 | batch_dict = cur_module(batch_dict) 12 | 13 | if self.training: 14 | loss, tb_dict, disp_dict = self.get_training_loss() 15 | 16 | ret_dict = { 17 | 'loss': loss 18 | } 19 | return ret_dict, tb_dict, disp_dict 20 | else: 21 | pred_dicts, recall_dicts = self.post_processing(batch_dict) 22 | return pred_dicts, recall_dicts 23 | 24 | def get_training_loss(self): 25 | disp_dict = {} 26 | loss_rpn, tb_dict = self.dense_head.get_loss() 27 | loss_point, tb_dict = self.point_head.get_loss(tb_dict) 28 | loss_rcnn, tb_dict = self.roi_head.get_loss(tb_dict) 29 | 30 | loss = loss_rpn + loss_point + loss_rcnn 31 | 32 | if hasattr(self.backbone_3d, 'get_loss'): 33 | loss_backbone3d, tb_dict = self.backbone_3d.get_loss(tb_dict) 34 | loss += loss_backbone3d 35 | 36 | return loss, tb_dict, disp_dict 37 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/pv_rcnn_plusplus.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | 3 | 4 | class PVRCNNPlusPlus(Detector3DTemplate): 5 | def __init__(self, model_cfg, num_class, dataset): 6 | super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset) 7 | self.module_list = self.build_networks() 8 | 9 | def forward(self, batch_dict): 10 | batch_dict = self.vfe(batch_dict) 11 | batch_dict = self.backbone_3d(batch_dict) 12 | batch_dict = self.map_to_bev_module(batch_dict) 13 | batch_dict = self.backbone_2d(batch_dict) 14 | batch_dict = self.dense_head(batch_dict) 15 | 16 | batch_dict = self.roi_head.proposal_layer( 17 | batch_dict, nms_config=self.roi_head.model_cfg.NMS_CONFIG['TRAIN' if self.training else 'TEST'] 18 | ) 19 | if self.training: 20 | targets_dict = self.roi_head.assign_targets(batch_dict) 21 | batch_dict['rois'] = targets_dict['rois'] 22 | batch_dict['roi_labels'] = targets_dict['roi_labels'] 23 | batch_dict['roi_targets_dict'] = targets_dict 24 | num_rois_per_scene = targets_dict['rois'].shape[1] 25 | if 'roi_valid_num' in batch_dict: 26 | batch_dict['roi_valid_num'] = [num_rois_per_scene for _ in range(batch_dict['batch_size'])] 27 | 28 | batch_dict = self.pfe(batch_dict) 29 | batch_dict = self.point_head(batch_dict) 30 | batch_dict = self.roi_head(batch_dict) 31 | 32 | if self.training: 33 | loss, tb_dict, disp_dict = self.get_training_loss() 34 | 35 | ret_dict = { 36 | 'loss': loss 37 | } 38 | return ret_dict, tb_dict, disp_dict 39 | else: 40 | pred_dicts, recall_dicts = self.post_processing(batch_dict) 41 | return pred_dicts, recall_dicts 42 | 43 | def get_training_loss(self): 44 | disp_dict = {} 45 | loss_rpn, tb_dict = self.dense_head.get_loss() 46 | if self.point_head is not None: 47 | loss_point, tb_dict = self.point_head.get_loss(tb_dict) 48 | else: 49 | loss_point = 0 50 | loss_rcnn, tb_dict = self.roi_head.get_loss(tb_dict) 51 | 52 | loss = loss_rpn + loss_point + loss_rcnn 53 | return loss, tb_dict, disp_dict 54 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/second_net.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | 3 | 4 | class SECONDNet(Detector3DTemplate): 5 | def __init__(self, model_cfg, num_class, dataset): 6 | super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset) 7 | self.module_list = self.build_networks() 8 | 9 | def forward(self, batch_dict): 10 | for cur_module in self.module_list: 11 | batch_dict = cur_module(batch_dict) 12 | 13 | if self.training: 14 | loss, tb_dict, disp_dict = self.get_training_loss() 15 | 16 | ret_dict = { 17 | 'loss': loss 18 | } 19 | return ret_dict, tb_dict, disp_dict 20 | else: 21 | pred_dicts, recall_dicts = self.post_processing(batch_dict) 22 | return pred_dicts, recall_dicts 23 | 24 | def get_training_loss(self): 25 | disp_dict = {} 26 | 27 | loss_rpn, tb_dict = self.dense_head.get_loss() 28 | tb_dict = { 29 | 'loss_rpn': loss_rpn.item(), 30 | **tb_dict 31 | } 32 | 33 | loss = loss_rpn 34 | return loss, tb_dict, disp_dict 35 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/detectors/voxel_rcnn.py: -------------------------------------------------------------------------------- 1 | from .detector3d_template import Detector3DTemplate 2 | 3 | 4 | class VoxelRCNN(Detector3DTemplate): 5 | def __init__(self, model_cfg, num_class, dataset): 6 | super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset) 7 | self.module_list = self.build_networks() 8 | 9 | def forward(self, batch_dict): 10 | for cur_module in self.module_list: 11 | batch_dict = cur_module(batch_dict) 12 | 13 | if self.training: 14 | loss, tb_dict, disp_dict = self.get_training_loss() 15 | 16 | ret_dict = { 17 | 'loss': loss 18 | } 19 | return ret_dict, tb_dict, disp_dict 20 | else: 21 | pred_dicts, recall_dicts = self.post_processing(batch_dict) 22 | return pred_dicts, recall_dicts 23 | 24 | def get_training_loss(self): 25 | disp_dict = {} 26 | loss = 0 27 | 28 | loss_rpn, tb_dict = self.dense_head.get_loss() 29 | loss_rcnn, tb_dict = self.roi_head.get_loss(tb_dict) 30 | 31 | loss = loss + loss_rpn + loss_rcnn 32 | 33 | if hasattr(self.backbone_3d, 'get_loss'): 34 | loss_backbone3d, tb_dict = self.backbone_3d.get_loss(tb_dict) 35 | loss += loss_backbone3d 36 | 37 | return loss, tb_dict, disp_dict 38 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/basic_block_2d.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/basic_block_2d.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/basic_block_2d.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/basic_block_2d.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/centernet_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/centernet_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/centernet_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/centernet_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/model_nms_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/model_nms_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/model_nms_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/model_nms_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/mppnet_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/mppnet_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/__pycache__/mppnet_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/model_utils/__pycache__/mppnet_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/model_utils/basic_block_2d.py: -------------------------------------------------------------------------------- 1 | import torch.nn as nn 2 | 3 | 4 | class BasicBlock2D(nn.Module): 5 | 6 | def __init__(self, in_channels, out_channels, **kwargs): 7 | """ 8 | Initializes convolutional block 9 | Args: 10 | in_channels: int, Number of input channels 11 | out_channels: int, Number of output channels 12 | **kwargs: Dict, Extra arguments for nn.Conv2d 13 | """ 14 | super().__init__() 15 | self.in_channels = in_channels 16 | self.out_channels = out_channels 17 | self.conv = nn.Conv2d(in_channels=in_channels, 18 | out_channels=out_channels, 19 | **kwargs) 20 | self.bn = nn.BatchNorm2d(out_channels) 21 | self.relu = nn.ReLU(inplace=True) 22 | 23 | def forward(self, features): 24 | """ 25 | Applies convolutional block 26 | Args: 27 | features: (B, C_in, H, W), Input features 28 | Returns: 29 | x: (B, C_out, H, W), Output features 30 | """ 31 | x = self.conv(features) 32 | x = self.bn(x) 33 | x = self.relu(x) 34 | return x 35 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__init__.py: -------------------------------------------------------------------------------- 1 | from .partA2_head import PartA2FCHead 2 | from .pointrcnn_head import PointRCNNHead 3 | from .pvrcnn_head import PVRCNNHead 4 | from .second_head import SECONDHead 5 | from .voxelrcnn_head import VoxelRCNNHead 6 | from .roi_head_template import RoIHeadTemplate 7 | from .mppnet_head import MPPNetHead 8 | from .mppnet_memory_bank_e2e import MPPNetHeadE2E 9 | 10 | __all__ = { 11 | 'RoIHeadTemplate': RoIHeadTemplate, 12 | 'PartA2FCHead': PartA2FCHead, 13 | 'PVRCNNHead': PVRCNNHead, 14 | 'SECONDHead': SECONDHead, 15 | 'PointRCNNHead': PointRCNNHead, 16 | 'VoxelRCNNHead': VoxelRCNNHead, 17 | 'MPPNetHead': MPPNetHead, 18 | 'MPPNetHeadE2E': MPPNetHeadE2E, 19 | } 20 | -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/mppnet_head.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/mppnet_head.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/mppnet_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/mppnet_head.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/mppnet_memory_bank_e2e.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/mppnet_memory_bank_e2e.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/mppnet_memory_bank_e2e.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/mppnet_memory_bank_e2e.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/partA2_head.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/partA2_head.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/partA2_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/partA2_head.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/pointrcnn_head.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/pointrcnn_head.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/pointrcnn_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/pointrcnn_head.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/pvrcnn_head.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/pvrcnn_head.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/pvrcnn_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/pvrcnn_head.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/roi_head_template.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/roi_head_template.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/roi_head_template.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/roi_head_template.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/second_head.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/second_head.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/second_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/second_head.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/voxelrcnn_head.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/voxelrcnn_head.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/__pycache__/voxelrcnn_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/__pycache__/voxelrcnn_head.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/target_assigner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/target_assigner/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/target_assigner/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/target_assigner/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/target_assigner/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/target_assigner/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/target_assigner/__pycache__/proposal_target_layer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/target_assigner/__pycache__/proposal_target_layer.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/models/roi_heads/target_assigner/__pycache__/proposal_target_layer.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/models/roi_heads/target_assigner/__pycache__/proposal_target_layer.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/iou3d_nms/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/iou3d_nms/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/iou3d_nms/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/iou3d_nms/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/iou3d_nms/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/iou3d_nms/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/iou3d_nms/__pycache__/iou3d_nms_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/iou3d_nms/__pycache__/iou3d_nms_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/iou3d_nms/__pycache__/iou3d_nms_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/iou3d_nms/__pycache__/iou3d_nms_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/iou3d_nms/src/iou3d_cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef IOU3D_CPU_H 2 | #define IOU3D_CPU_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | int boxes_iou_bev_cpu(at::Tensor boxes_a_tensor, at::Tensor boxes_b_tensor, at::Tensor ans_iou_tensor); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/iou3d_nms/src/iou3d_nms.h: -------------------------------------------------------------------------------- 1 | #ifndef IOU3D_NMS_H 2 | #define IOU3D_NMS_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | int boxes_overlap_bev_gpu(at::Tensor boxes_a, at::Tensor boxes_b, at::Tensor ans_overlap); 10 | int boxes_iou_bev_gpu(at::Tensor boxes_a, at::Tensor boxes_b, at::Tensor ans_iou); 11 | int nms_gpu(at::Tensor boxes, at::Tensor keep, float nms_overlap_thresh); 12 | int nms_normal_gpu(at::Tensor boxes, at::Tensor keep, float nms_overlap_thresh); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/iou3d_nms/src/iou3d_nms_api.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "iou3d_cpu.h" 8 | #include "iou3d_nms.h" 9 | 10 | 11 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 12 | m.def("boxes_overlap_bev_gpu", &boxes_overlap_bev_gpu, "oriented boxes overlap"); 13 | m.def("boxes_iou_bev_gpu", &boxes_iou_bev_gpu, "oriented boxes iou"); 14 | m.def("nms_gpu", &nms_gpu, "oriented nms gpu"); 15 | m.def("nms_normal_gpu", &nms_normal_gpu, "nms gpu"); 16 | m.def("boxes_iou_bev_cpu", &boxes_iou_bev_cpu, "oriented boxes iou"); 17 | } 18 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/pointnet2_modules.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/pointnet2_modules.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/pointnet2_modules.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/pointnet2_modules.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/pointnet2_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/pointnet2_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/pointnet2_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_batch/__pycache__/pointnet2_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/ball_query.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | batch version of ball query, modified from the original implementation of official PointNet++ codes. 3 | Written by Shaoshuai Shi 4 | All Rights Reserved 2018. 5 | */ 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "ball_query_gpu.h" 13 | 14 | #define CHECK_CUDA(x) do { \ 15 | if (!x.type().is_cuda()) { \ 16 | fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 17 | exit(-1); \ 18 | } \ 19 | } while (0) 20 | #define CHECK_CONTIGUOUS(x) do { \ 21 | if (!x.is_contiguous()) { \ 22 | fprintf(stderr, "%s must be contiguous tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 23 | exit(-1); \ 24 | } \ 25 | } while (0) 26 | #define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x) 27 | 28 | 29 | int ball_query_wrapper_fast(int b, int n, int m, float radius, int nsample, 30 | at::Tensor new_xyz_tensor, at::Tensor xyz_tensor, at::Tensor idx_tensor) { 31 | CHECK_INPUT(new_xyz_tensor); 32 | CHECK_INPUT(xyz_tensor); 33 | const float *new_xyz = new_xyz_tensor.data(); 34 | const float *xyz = xyz_tensor.data(); 35 | int *idx = idx_tensor.data(); 36 | 37 | ball_query_kernel_launcher_fast(b, n, m, radius, nsample, new_xyz, xyz, idx); 38 | return 1; 39 | } 40 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/ball_query_gpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _BALL_QUERY_GPU_H 2 | #define _BALL_QUERY_GPU_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | int ball_query_wrapper_fast(int b, int n, int m, float radius, int nsample, 10 | at::Tensor new_xyz_tensor, at::Tensor xyz_tensor, at::Tensor idx_tensor); 11 | 12 | void ball_query_kernel_launcher_fast(int b, int n, int m, float radius, int nsample, 13 | const float *xyz, const float *new_xyz, int *idx); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/cuda_utils.h: -------------------------------------------------------------------------------- 1 | #ifndef _CUDA_UTILS_H 2 | #define _CUDA_UTILS_H 3 | 4 | #include 5 | 6 | #define TOTAL_THREADS 1024 7 | #define THREADS_PER_BLOCK 256 8 | #define DIVUP(m,n) ((m) / (n) + ((m) % (n) > 0)) 9 | 10 | inline int opt_n_threads(int work_size) { 11 | const int pow_2 = std::log(static_cast(work_size)) / std::log(2.0); 12 | 13 | return max(min(1 << pow_2, TOTAL_THREADS), 1); 14 | } 15 | #endif 16 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/group_points.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | batch version of point grouping, modified from the original implementation of official PointNet++ codes. 3 | Written by Shaoshuai Shi 4 | All Rights Reserved 2018. 5 | */ 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "group_points_gpu.h" 13 | 14 | 15 | int group_points_grad_wrapper_fast(int b, int c, int n, int npoints, int nsample, 16 | at::Tensor grad_out_tensor, at::Tensor idx_tensor, at::Tensor grad_points_tensor) { 17 | 18 | float *grad_points = grad_points_tensor.data(); 19 | const int *idx = idx_tensor.data(); 20 | const float *grad_out = grad_out_tensor.data(); 21 | 22 | group_points_grad_kernel_launcher_fast(b, c, n, npoints, nsample, grad_out, idx, grad_points); 23 | return 1; 24 | } 25 | 26 | 27 | int group_points_wrapper_fast(int b, int c, int n, int npoints, int nsample, 28 | at::Tensor points_tensor, at::Tensor idx_tensor, at::Tensor out_tensor) { 29 | 30 | const float *points = points_tensor.data(); 31 | const int *idx = idx_tensor.data(); 32 | float *out = out_tensor.data(); 33 | 34 | group_points_kernel_launcher_fast(b, c, n, npoints, nsample, points, idx, out); 35 | return 1; 36 | } 37 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/group_points_gpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _GROUP_POINTS_GPU_H 2 | #define _GROUP_POINTS_GPU_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | int group_points_wrapper_fast(int b, int c, int n, int npoints, int nsample, 11 | at::Tensor points_tensor, at::Tensor idx_tensor, at::Tensor out_tensor); 12 | 13 | void group_points_kernel_launcher_fast(int b, int c, int n, int npoints, int nsample, 14 | const float *points, const int *idx, float *out); 15 | 16 | int group_points_grad_wrapper_fast(int b, int c, int n, int npoints, int nsample, 17 | at::Tensor grad_out_tensor, at::Tensor idx_tensor, at::Tensor grad_points_tensor); 18 | 19 | void group_points_grad_kernel_launcher_fast(int b, int c, int n, int npoints, int nsample, 20 | const float *grad_out, const int *idx, float *grad_points); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/interpolate.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | batch version of point interpolation, modified from the original implementation of official PointNet++ codes. 3 | Written by Shaoshuai Shi 4 | All Rights Reserved 2018. 5 | */ 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "interpolate_gpu.h" 16 | 17 | 18 | void three_nn_wrapper_fast(int b, int n, int m, at::Tensor unknown_tensor, 19 | at::Tensor known_tensor, at::Tensor dist2_tensor, at::Tensor idx_tensor) { 20 | const float *unknown = unknown_tensor.data(); 21 | const float *known = known_tensor.data(); 22 | float *dist2 = dist2_tensor.data(); 23 | int *idx = idx_tensor.data(); 24 | 25 | three_nn_kernel_launcher_fast(b, n, m, unknown, known, dist2, idx); 26 | } 27 | 28 | 29 | void three_interpolate_wrapper_fast(int b, int c, int m, int n, 30 | at::Tensor points_tensor, 31 | at::Tensor idx_tensor, 32 | at::Tensor weight_tensor, 33 | at::Tensor out_tensor) { 34 | 35 | const float *points = points_tensor.data(); 36 | const float *weight = weight_tensor.data(); 37 | float *out = out_tensor.data(); 38 | const int *idx = idx_tensor.data(); 39 | 40 | three_interpolate_kernel_launcher_fast(b, c, m, n, points, idx, weight, out); 41 | } 42 | 43 | 44 | void three_interpolate_grad_wrapper_fast(int b, int c, int n, int m, 45 | at::Tensor grad_out_tensor, 46 | at::Tensor idx_tensor, 47 | at::Tensor weight_tensor, 48 | at::Tensor grad_points_tensor) { 49 | 50 | const float *grad_out = grad_out_tensor.data(); 51 | const float *weight = weight_tensor.data(); 52 | float *grad_points = grad_points_tensor.data(); 53 | const int *idx = idx_tensor.data(); 54 | 55 | three_interpolate_grad_kernel_launcher_fast(b, c, n, m, grad_out, idx, weight, grad_points); 56 | } 57 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/interpolate_gpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTERPOLATE_GPU_H 2 | #define _INTERPOLATE_GPU_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | void three_nn_wrapper_fast(int b, int n, int m, at::Tensor unknown_tensor, 11 | at::Tensor known_tensor, at::Tensor dist2_tensor, at::Tensor idx_tensor); 12 | 13 | void three_nn_kernel_launcher_fast(int b, int n, int m, const float *unknown, 14 | const float *known, float *dist2, int *idx); 15 | 16 | 17 | void three_interpolate_wrapper_fast(int b, int c, int m, int n, at::Tensor points_tensor, 18 | at::Tensor idx_tensor, at::Tensor weight_tensor, at::Tensor out_tensor); 19 | 20 | void three_interpolate_kernel_launcher_fast(int b, int c, int m, int n, 21 | const float *points, const int *idx, const float *weight, float *out); 22 | 23 | 24 | void three_interpolate_grad_wrapper_fast(int b, int c, int n, int m, at::Tensor grad_out_tensor, 25 | at::Tensor idx_tensor, at::Tensor weight_tensor, at::Tensor grad_points_tensor); 26 | 27 | void three_interpolate_grad_kernel_launcher_fast(int b, int c, int n, int m, const float *grad_out, 28 | const int *idx, const float *weight, float *grad_points); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/pointnet2_api.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "ball_query_gpu.h" 5 | #include "group_points_gpu.h" 6 | #include "sampling_gpu.h" 7 | #include "interpolate_gpu.h" 8 | 9 | 10 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 11 | m.def("ball_query_wrapper", &ball_query_wrapper_fast, "ball_query_wrapper_fast"); 12 | 13 | m.def("group_points_wrapper", &group_points_wrapper_fast, "group_points_wrapper_fast"); 14 | m.def("group_points_grad_wrapper", &group_points_grad_wrapper_fast, "group_points_grad_wrapper_fast"); 15 | 16 | m.def("gather_points_wrapper", &gather_points_wrapper_fast, "gather_points_wrapper_fast"); 17 | m.def("gather_points_grad_wrapper", &gather_points_grad_wrapper_fast, "gather_points_grad_wrapper_fast"); 18 | 19 | m.def("farthest_point_sampling_wrapper", &farthest_point_sampling_wrapper, "farthest_point_sampling_wrapper"); 20 | 21 | m.def("three_nn_wrapper", &three_nn_wrapper_fast, "three_nn_wrapper_fast"); 22 | m.def("three_interpolate_wrapper", &three_interpolate_wrapper_fast, "three_interpolate_wrapper_fast"); 23 | m.def("three_interpolate_grad_wrapper", &three_interpolate_grad_wrapper_fast, "three_interpolate_grad_wrapper_fast"); 24 | } 25 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/sampling.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | batch version of point sampling and gathering, modified from the original implementation of official PointNet++ codes. 3 | Written by Shaoshuai Shi 4 | All Rights Reserved 2018. 5 | */ 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | #include "sampling_gpu.h" 12 | 13 | 14 | int gather_points_wrapper_fast(int b, int c, int n, int npoints, 15 | at::Tensor points_tensor, at::Tensor idx_tensor, at::Tensor out_tensor){ 16 | const float *points = points_tensor.data(); 17 | const int *idx = idx_tensor.data(); 18 | float *out = out_tensor.data(); 19 | 20 | gather_points_kernel_launcher_fast(b, c, n, npoints, points, idx, out); 21 | return 1; 22 | } 23 | 24 | 25 | int gather_points_grad_wrapper_fast(int b, int c, int n, int npoints, 26 | at::Tensor grad_out_tensor, at::Tensor idx_tensor, at::Tensor grad_points_tensor) { 27 | 28 | const float *grad_out = grad_out_tensor.data(); 29 | const int *idx = idx_tensor.data(); 30 | float *grad_points = grad_points_tensor.data(); 31 | 32 | gather_points_grad_kernel_launcher_fast(b, c, n, npoints, grad_out, idx, grad_points); 33 | return 1; 34 | } 35 | 36 | 37 | int farthest_point_sampling_wrapper(int b, int n, int m, 38 | at::Tensor points_tensor, at::Tensor temp_tensor, at::Tensor idx_tensor) { 39 | 40 | const float *points = points_tensor.data(); 41 | float *temp = temp_tensor.data(); 42 | int *idx = idx_tensor.data(); 43 | 44 | farthest_point_sampling_kernel_launcher(b, n, m, points, temp, idx); 45 | return 1; 46 | } 47 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_batch/src/sampling_gpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _SAMPLING_GPU_H 2 | #define _SAMPLING_GPU_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | int gather_points_wrapper_fast(int b, int c, int n, int npoints, 10 | at::Tensor points_tensor, at::Tensor idx_tensor, at::Tensor out_tensor); 11 | 12 | void gather_points_kernel_launcher_fast(int b, int c, int n, int npoints, 13 | const float *points, const int *idx, float *out); 14 | 15 | 16 | int gather_points_grad_wrapper_fast(int b, int c, int n, int npoints, 17 | at::Tensor grad_out_tensor, at::Tensor idx_tensor, at::Tensor grad_points_tensor); 18 | 19 | void gather_points_grad_kernel_launcher_fast(int b, int c, int n, int npoints, 20 | const float *grad_out, const int *idx, float *grad_points); 21 | 22 | 23 | int farthest_point_sampling_wrapper(int b, int n, int m, 24 | at::Tensor points_tensor, at::Tensor temp_tensor, at::Tensor idx_tensor); 25 | 26 | void farthest_point_sampling_kernel_launcher(int b, int n, int m, 27 | const float *dataset, float *temp, int *idxs); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/pointnet2_modules.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/pointnet2_modules.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/pointnet2_modules.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/pointnet2_modules.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/pointnet2_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/pointnet2_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/pointnet2_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/pointnet2_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/voxel_pool_modules.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/voxel_pool_modules.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/voxel_pool_modules.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/voxel_pool_modules.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/voxel_query_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/voxel_query_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/voxel_query_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/pointnet2/pointnet2_stack/__pycache__/voxel_query_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/ball_query.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Stacked-batch-data version of ball query, modified from the original implementation of official PointNet++ codes. 3 | Written by Shaoshuai Shi 4 | All Rights Reserved 2019-2020. 5 | */ 6 | 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "ball_query_gpu.h" 13 | 14 | #define CHECK_CUDA(x) do { \ 15 | if (!x.type().is_cuda()) { \ 16 | fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 17 | exit(-1); \ 18 | } \ 19 | } while (0) 20 | #define CHECK_CONTIGUOUS(x) do { \ 21 | if (!x.is_contiguous()) { \ 22 | fprintf(stderr, "%s must be contiguous tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 23 | exit(-1); \ 24 | } \ 25 | } while (0) 26 | #define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x) 27 | 28 | 29 | int ball_query_wrapper_stack(int B, int M, float radius, int nsample, 30 | at::Tensor new_xyz_tensor, at::Tensor new_xyz_batch_cnt_tensor, 31 | at::Tensor xyz_tensor, at::Tensor xyz_batch_cnt_tensor, at::Tensor idx_tensor) { 32 | CHECK_INPUT(new_xyz_tensor); 33 | CHECK_INPUT(xyz_tensor); 34 | CHECK_INPUT(new_xyz_batch_cnt_tensor); 35 | CHECK_INPUT(xyz_batch_cnt_tensor); 36 | 37 | const float *new_xyz = new_xyz_tensor.data(); 38 | const float *xyz = xyz_tensor.data(); 39 | const int *new_xyz_batch_cnt = new_xyz_batch_cnt_tensor.data(); 40 | const int *xyz_batch_cnt = xyz_batch_cnt_tensor.data(); 41 | int *idx = idx_tensor.data(); 42 | 43 | ball_query_kernel_launcher_stack(B, M, radius, nsample, new_xyz, new_xyz_batch_cnt, xyz, xyz_batch_cnt, idx); 44 | return 1; 45 | } 46 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/ball_query_gpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | Stacked-batch-data version of ball query, modified from the original implementation of official PointNet++ codes. 3 | Written by Shaoshuai Shi 4 | All Rights Reserved 2019-2020. 5 | */ 6 | 7 | 8 | #ifndef _STACK_BALL_QUERY_GPU_H 9 | #define _STACK_BALL_QUERY_GPU_H 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | int ball_query_wrapper_stack(int B, int M, float radius, int nsample, 17 | at::Tensor new_xyz_tensor, at::Tensor new_xyz_batch_cnt_tensor, 18 | at::Tensor xyz_tensor, at::Tensor xyz_batch_cnt_tensor, at::Tensor idx_tensor); 19 | 20 | 21 | void ball_query_kernel_launcher_stack(int B, int M, float radius, int nsample, 22 | const float *new_xyz, const int *new_xyz_batch_cnt, const float *xyz, const int *xyz_batch_cnt, int *idx); 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/cuda_utils.h: -------------------------------------------------------------------------------- 1 | #ifndef _STACK_CUDA_UTILS_H 2 | #define _STACK_CUDA_UTILS_H 3 | 4 | #include 5 | 6 | #define THREADS_PER_BLOCK 256 7 | #define DIVUP(m,n) ((m) / (n) + ((m) % (n) > 0)) 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/group_points_gpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | Stacked-batch-data version of point grouping, modified from the original implementation of official PointNet++ codes. 3 | Written by Shaoshuai Shi 4 | All Rights Reserved 2019-2020. 5 | */ 6 | 7 | 8 | #ifndef _STACK_GROUP_POINTS_GPU_H 9 | #define _STACK_GROUP_POINTS_GPU_H 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | int group_points_wrapper_stack(int B, int M, int C, int nsample, 18 | at::Tensor features_tensor, at::Tensor features_batch_cnt_tensor, 19 | at::Tensor idx_tensor, at::Tensor idx_batch_cnt_tensor, at::Tensor out_tensor); 20 | 21 | void group_points_kernel_launcher_stack(int B, int M, int C, int nsample, 22 | const float *features, const int *features_batch_cnt, const int *idx, const int *idx_batch_cnt, float *out); 23 | 24 | int group_points_grad_wrapper_stack(int B, int M, int C, int N, int nsample, 25 | at::Tensor grad_out_tensor, at::Tensor idx_tensor, at::Tensor idx_batch_cnt_tensor, 26 | at::Tensor features_batch_cnt_tensor, at::Tensor grad_features_tensor); 27 | 28 | void group_points_grad_kernel_launcher_stack(int B, int M, int C, int N, int nsample, 29 | const float *grad_out, const int *idx, const int *idx_batch_cnt, const int *features_batch_cnt, float *grad_features); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/interpolate_gpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTERPOLATE_GPU_H 2 | #define _INTERPOLATE_GPU_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | void three_nn_wrapper_stack(at::Tensor unknown_tensor, 11 | at::Tensor unknown_batch_cnt_tensor, at::Tensor known_tensor, 12 | at::Tensor known_batch_cnt_tensor, at::Tensor dist2_tensor, at::Tensor idx_tensor); 13 | 14 | 15 | void three_interpolate_wrapper_stack(at::Tensor features_tensor, 16 | at::Tensor idx_tensor, at::Tensor weight_tensor, at::Tensor out_tensor); 17 | 18 | 19 | 20 | void three_interpolate_grad_wrapper_stack(at::Tensor grad_out_tensor, at::Tensor idx_tensor, 21 | at::Tensor weight_tensor, at::Tensor grad_features_tensor); 22 | 23 | 24 | void three_nn_kernel_launcher_stack(int batch_size, int N, int M, const float *unknown, 25 | const int *unknown_batch_cnt, const float *known, const int *known_batch_cnt, 26 | float *dist2, int *idx); 27 | 28 | 29 | void three_interpolate_kernel_launcher_stack(int N, int channels, 30 | const float *features, const int *idx, const float *weight, float *out); 31 | 32 | 33 | 34 | void three_interpolate_grad_kernel_launcher_stack(int N, int channels, const float *grad_out, 35 | const int *idx, const float *weight, float *grad_features); 36 | 37 | 38 | 39 | #endif -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/pointnet2_api.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "ball_query_gpu.h" 5 | #include "group_points_gpu.h" 6 | #include "sampling_gpu.h" 7 | #include "interpolate_gpu.h" 8 | #include "voxel_query_gpu.h" 9 | #include "vector_pool_gpu.h" 10 | 11 | 12 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 13 | m.def("ball_query_wrapper", &ball_query_wrapper_stack, "ball_query_wrapper_stack"); 14 | m.def("voxel_query_wrapper", &voxel_query_wrapper_stack, "voxel_query_wrapper_stack"); 15 | 16 | m.def("farthest_point_sampling_wrapper", &farthest_point_sampling_wrapper, "farthest_point_sampling_wrapper"); 17 | m.def("stack_farthest_point_sampling_wrapper", &stack_farthest_point_sampling_wrapper, "stack_farthest_point_sampling_wrapper"); 18 | 19 | m.def("group_points_wrapper", &group_points_wrapper_stack, "group_points_wrapper_stack"); 20 | m.def("group_points_grad_wrapper", &group_points_grad_wrapper_stack, "group_points_grad_wrapper_stack"); 21 | 22 | m.def("three_nn_wrapper", &three_nn_wrapper_stack, "three_nn_wrapper_stack"); 23 | m.def("three_interpolate_wrapper", &three_interpolate_wrapper_stack, "three_interpolate_wrapper_stack"); 24 | m.def("three_interpolate_grad_wrapper", &three_interpolate_grad_wrapper_stack, "three_interpolate_grad_wrapper_stack"); 25 | 26 | m.def("query_stacked_local_neighbor_idxs_wrapper_stack", &query_stacked_local_neighbor_idxs_wrapper_stack, "query_stacked_local_neighbor_idxs_wrapper_stack"); 27 | m.def("query_three_nn_by_stacked_local_idxs_wrapper_stack", &query_three_nn_by_stacked_local_idxs_wrapper_stack, "query_three_nn_by_stacked_local_idxs_wrapper_stack"); 28 | 29 | m.def("vector_pool_wrapper", &vector_pool_wrapper_stack, "vector_pool_grad_wrapper_stack"); 30 | m.def("vector_pool_grad_wrapper", &vector_pool_grad_wrapper_stack, "vector_pool_grad_wrapper_stack"); 31 | } 32 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/sampling.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "sampling_gpu.h" 5 | 6 | #define CHECK_CUDA(x) do { \ 7 | if (!x.type().is_cuda()) { \ 8 | fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 9 | exit(-1); \ 10 | } \ 11 | } while (0) 12 | #define CHECK_CONTIGUOUS(x) do { \ 13 | if (!x.is_contiguous()) { \ 14 | fprintf(stderr, "%s must be contiguous tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 15 | exit(-1); \ 16 | } \ 17 | } while (0) 18 | #define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x) 19 | 20 | 21 | int farthest_point_sampling_wrapper(int b, int n, int m, 22 | at::Tensor points_tensor, at::Tensor temp_tensor, at::Tensor idx_tensor) { 23 | 24 | CHECK_INPUT(points_tensor); 25 | CHECK_INPUT(temp_tensor); 26 | CHECK_INPUT(idx_tensor); 27 | 28 | const float *points = points_tensor.data(); 29 | float *temp = temp_tensor.data(); 30 | int *idx = idx_tensor.data(); 31 | 32 | farthest_point_sampling_kernel_launcher(b, n, m, points, temp, idx); 33 | return 1; 34 | } 35 | 36 | 37 | int stack_farthest_point_sampling_wrapper(at::Tensor points_tensor, 38 | at::Tensor temp_tensor, at::Tensor xyz_batch_cnt_tensor, at::Tensor idx_tensor, 39 | at::Tensor num_sampled_points_tensor) { 40 | 41 | CHECK_INPUT(points_tensor); 42 | CHECK_INPUT(temp_tensor); 43 | CHECK_INPUT(idx_tensor); 44 | CHECK_INPUT(xyz_batch_cnt_tensor); 45 | CHECK_INPUT(num_sampled_points_tensor); 46 | 47 | int batch_size = xyz_batch_cnt_tensor.size(0); 48 | int N = points_tensor.size(0); 49 | const float *points = points_tensor.data(); 50 | float *temp = temp_tensor.data(); 51 | int *xyz_batch_cnt = xyz_batch_cnt_tensor.data(); 52 | int *idx = idx_tensor.data(); 53 | int *num_sampled_points = num_sampled_points_tensor.data(); 54 | 55 | stack_farthest_point_sampling_kernel_launcher(N, batch_size, points, temp, xyz_batch_cnt, idx, num_sampled_points); 56 | return 1; 57 | } -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/sampling_gpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _SAMPLING_GPU_H 2 | #define _SAMPLING_GPU_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | int farthest_point_sampling_wrapper(int b, int n, int m, 10 | at::Tensor points_tensor, at::Tensor temp_tensor, at::Tensor idx_tensor); 11 | 12 | void farthest_point_sampling_kernel_launcher(int b, int n, int m, 13 | const float *dataset, float *temp, int *idxs); 14 | 15 | int stack_farthest_point_sampling_wrapper( 16 | at::Tensor points_tensor, at::Tensor temp_tensor, at::Tensor xyz_batch_cnt_tensor, 17 | at::Tensor idx_tensor, at::Tensor num_sampled_points_tensor); 18 | 19 | 20 | void stack_farthest_point_sampling_kernel_launcher(int N, int batch_size, 21 | const float *dataset, float *temp, int *xyz_batch_cnt, int *idxs, int *num_sampled_points); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/voxel_query.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "voxel_query_gpu.h" 9 | 10 | #define CHECK_CUDA(x) do { \ 11 | if (!x.type().is_cuda()) { \ 12 | fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 13 | exit(-1); \ 14 | } \ 15 | } while (0) 16 | #define CHECK_CONTIGUOUS(x) do { \ 17 | if (!x.is_contiguous()) { \ 18 | fprintf(stderr, "%s must be contiguous tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 19 | exit(-1); \ 20 | } \ 21 | } while (0) 22 | #define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x) 23 | 24 | 25 | int voxel_query_wrapper_stack(int M, int R1, int R2, int R3, int nsample, float radius, 26 | int z_range, int y_range, int x_range, at::Tensor new_xyz_tensor, at::Tensor xyz_tensor, 27 | at::Tensor new_coords_tensor, at::Tensor point_indices_tensor, at::Tensor idx_tensor) { 28 | CHECK_INPUT(new_coords_tensor); 29 | CHECK_INPUT(point_indices_tensor); 30 | CHECK_INPUT(new_xyz_tensor); 31 | CHECK_INPUT(xyz_tensor); 32 | 33 | const float *new_xyz = new_xyz_tensor.data(); 34 | const float *xyz = xyz_tensor.data(); 35 | const int *new_coords = new_coords_tensor.data(); 36 | const int *point_indices = point_indices_tensor.data(); 37 | int *idx = idx_tensor.data(); 38 | 39 | voxel_query_kernel_launcher_stack(M, R1, R2, R3, nsample, radius, z_range, y_range, x_range, new_xyz, xyz, new_coords, point_indices, idx); 40 | return 1; 41 | } 42 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/pointnet2/pointnet2_stack/src/voxel_query_gpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _STACK_VOXEL_QUERY_GPU_H 2 | #define _STACK_VOXEL_QUERY_GPU_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | int voxel_query_wrapper_stack(int M, int R1, int R2, int R3, int nsample, float radius, 10 | int z_range, int y_range, int x_range, at::Tensor new_xyz_tensor, at::Tensor xyz_tensor, 11 | at::Tensor new_coords_tensor, at::Tensor point_indices_tensor, at::Tensor idx_tensor); 12 | 13 | 14 | void voxel_query_kernel_launcher_stack(int M, int R1, int R2, int R3, int nsample, 15 | float radius, int z_range, int y_range, int x_range, const float *new_xyz, 16 | const float *xyz, const int *new_coords, const int *point_indices, int *idx); 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roiaware_pool3d/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roiaware_pool3d/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roiaware_pool3d/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roiaware_pool3d/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roiaware_pool3d/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roiaware_pool3d/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roiaware_pool3d/__pycache__/roiaware_pool3d_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roiaware_pool3d/__pycache__/roiaware_pool3d_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roiaware_pool3d/__pycache__/roiaware_pool3d_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roiaware_pool3d/__pycache__/roiaware_pool3d_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roipoint_pool3d/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roipoint_pool3d/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roipoint_pool3d/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roipoint_pool3d/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roipoint_pool3d/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roipoint_pool3d/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roipoint_pool3d/__pycache__/roipoint_pool3d_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roipoint_pool3d/__pycache__/roipoint_pool3d_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roipoint_pool3d/__pycache__/roipoint_pool3d_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/ops/roipoint_pool3d/__pycache__/roipoint_pool3d_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/ops/roipoint_pool3d/src/roipoint_pool3d.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define CHECK_CUDA(x) do { \ 5 | if (!x.type().is_cuda()) { \ 6 | fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 7 | exit(-1); \ 8 | } \ 9 | } while (0) 10 | #define CHECK_CONTIGUOUS(x) do { \ 11 | if (!x.is_contiguous()) { \ 12 | fprintf(stderr, "%s must be contiguous tensor at %s:%d\n", #x, __FILE__, __LINE__); \ 13 | exit(-1); \ 14 | } \ 15 | } while (0) 16 | #define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x) 17 | 18 | 19 | void roipool3dLauncher(int batch_size, int pts_num, int boxes_num, int feature_in_len, int sampled_pts_num, 20 | const float *xyz, const float *boxes3d, const float *pts_feature, float *pooled_features, int *pooled_empty_flag); 21 | 22 | 23 | int roipool3d_gpu(at::Tensor xyz, at::Tensor boxes3d, at::Tensor pts_feature, at::Tensor pooled_features, at::Tensor pooled_empty_flag){ 24 | // params xyz: (B, N, 3) 25 | // params boxes3d: (B, M, 7) 26 | // params pts_feature: (B, N, C) 27 | // params pooled_features: (B, M, 512, 3+C) 28 | // params pooled_empty_flag: (B, M) 29 | CHECK_INPUT(xyz); 30 | CHECK_INPUT(boxes3d); 31 | CHECK_INPUT(pts_feature); 32 | CHECK_INPUT(pooled_features); 33 | CHECK_INPUT(pooled_empty_flag); 34 | 35 | int batch_size = xyz.size(0); 36 | int pts_num = xyz.size(1); 37 | int boxes_num = boxes3d.size(1); 38 | int feature_in_len = pts_feature.size(2); 39 | int sampled_pts_num = pooled_features.size(2); 40 | 41 | 42 | const float * xyz_data = xyz.data(); 43 | const float * boxes3d_data = boxes3d.data(); 44 | const float * pts_feature_data = pts_feature.data(); 45 | float * pooled_features_data = pooled_features.data(); 46 | int * pooled_empty_flag_data = pooled_empty_flag.data(); 47 | 48 | roipool3dLauncher(batch_size, pts_num, boxes_num, feature_in_len, sampled_pts_num, 49 | xyz_data, boxes3d_data, pts_feature_data, pooled_features_data, pooled_empty_flag_data); 50 | 51 | 52 | 53 | return 1; 54 | } 55 | 56 | 57 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 58 | m.def("forward", &roipool3d_gpu, "roipool3d forward (CUDA)"); 59 | } 60 | 61 | -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__init__.py -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/box_coder_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/box_coder_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/box_coder_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/box_coder_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/box_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/box_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/box_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/box_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/calibration_kitti.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/calibration_kitti.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/calibration_kitti.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/calibration_kitti.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/common_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/common_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/common_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/common_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/commu_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/commu_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/commu_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/commu_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/loss_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/loss_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/loss_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/loss_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/object3d_kitti.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/object3d_kitti.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/object3d_kitti.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/object3d_kitti.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/spconv_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/spconv_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/spconv_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/spconv_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/transform_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/transform_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/__pycache__/transform_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/pcdet/utils/__pycache__/transform_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/pcdet/utils/spconv_utils.py: -------------------------------------------------------------------------------- 1 | from typing import Set 2 | 3 | try: 4 | import spconv.pytorch as spconv 5 | except: 6 | import spconv as spconv 7 | 8 | import torch.nn as nn 9 | 10 | 11 | def find_all_spconv_keys(model: nn.Module, prefix="") -> Set[str]: 12 | """ 13 | Finds all spconv keys that need to have weight's transposed 14 | """ 15 | found_keys: Set[str] = set() 16 | for name, child in model.named_children(): 17 | new_prefix = f"{prefix}.{name}" if prefix != "" else name 18 | 19 | if isinstance(child, spconv.conv.SparseConvolution): 20 | new_prefix = f"{new_prefix}.weight" 21 | found_keys.add(new_prefix) 22 | 23 | found_keys.update(find_all_spconv_keys(child, prefix=new_prefix)) 24 | 25 | return found_keys 26 | 27 | 28 | def replace_feature(out, new_features): 29 | if "replace_feature" in out.__dir__(): 30 | # spconv 2.x behaviour 31 | return out.replace_feature(new_features) 32 | else: 33 | out.features = new_features 34 | return out 35 | -------------------------------------------------------------------------------- /openpcdet/pcdet/version.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.6.0+0000000" 2 | -------------------------------------------------------------------------------- /openpcdet/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | llvmlite 3 | numba 4 | torch==1.9.1+cu111 5 | tensorboardX 6 | easydict 7 | pyyaml 8 | scikit-image 9 | tqdm 10 | torchvision 11 | SharedArray 12 | opencv-python 13 | -------------------------------------------------------------------------------- /openpcdet/tools/__pycache__/_init_path.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/__pycache__/_init_path.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/tools/__pycache__/_init_path.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/__pycache__/_init_path.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/tools/__pycache__/test.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/__pycache__/test.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/tools/__pycache__/test.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/__pycache__/test.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/tools/_init_path.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.path.insert(0, '../') -------------------------------------------------------------------------------- /openpcdet/tools/cfgs/dataset_configs/custom_dataset.yaml: -------------------------------------------------------------------------------- 1 | DATASET: 'CustomDataset' 2 | DATA_PATH: '../data/custom' 3 | 4 | POINT_CLOUD_RANGE: [-75.2, -75.2, -2, 75.2, 75.2, 4] 5 | 6 | MAP_CLASS_TO_KITTI: { 7 | 'Vehicle': 'Car', 8 | 'Pedestrian': 'Pedestrian', 9 | 'Cyclist': 'Cyclist', 10 | } 11 | 12 | DATA_SPLIT: { 13 | 'train': train, 14 | 'test': val 15 | } 16 | 17 | INFO_PATH: { 18 | 'train': [custom_infos_train.pkl], 19 | 'test': [custom_infos_val.pkl], 20 | } 21 | 22 | POINT_FEATURE_ENCODING: { 23 | encoding_type: absolute_coordinates_encoding, 24 | used_feature_list: ['x', 'y', 'z', 'intensity'], 25 | src_feature_list: ['x', 'y', 'z', 'intensity'], 26 | } 27 | 28 | DATA_AUGMENTOR: 29 | DISABLE_AUG_LIST: ['placeholder'] 30 | AUG_CONFIG_LIST: 31 | - NAME: gt_sampling 32 | USE_ROAD_PLANE: False 33 | DB_INFO_PATH: 34 | - custom_dbinfos_train.pkl 35 | PREPARE: { 36 | filter_by_min_points: ['Vehicle:5', 'Pedestrian:5', 'Cyclist:5'], 37 | } 38 | 39 | SAMPLE_GROUPS: ['Vehicle:20', 'Pedestrian:15', 'Cyclist:15'] 40 | NUM_POINT_FEATURES: 4 41 | DATABASE_WITH_FAKELIDAR: False 42 | REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0] 43 | LIMIT_WHOLE_SCENE: True 44 | 45 | - NAME: random_world_flip 46 | ALONG_AXIS_LIST: ['x', 'y'] 47 | 48 | - NAME: random_world_rotation 49 | WORLD_ROT_ANGLE: [-0.78539816, 0.78539816] 50 | 51 | - NAME: random_world_scaling 52 | WORLD_SCALE_RANGE: [0.95, 1.05] 53 | 54 | DATA_PROCESSOR: 55 | - NAME: mask_points_and_boxes_outside_range 56 | REMOVE_OUTSIDE_BOXES: True 57 | 58 | - NAME: shuffle_points 59 | SHUFFLE_ENABLED: { 60 | 'train': True, 61 | 'test': False 62 | } 63 | 64 | - NAME: transform_points_to_voxels 65 | VOXEL_SIZE: [0.1, 0.1, 0.15] 66 | MAX_POINTS_PER_VOXEL: 5 67 | MAX_NUMBER_OF_VOXELS: { 68 | 'train': 150000, 69 | 'test': 150000 70 | } -------------------------------------------------------------------------------- /openpcdet/tools/cfgs/dataset_configs/kitti_dataset.yaml: -------------------------------------------------------------------------------- 1 | DATASET: 'KittiDataset' 2 | DATA_PATH: '../data/kitti' 3 | 4 | POINT_CLOUD_RANGE: [0, -40, -3, 70.4, 40, 1] 5 | 6 | DATA_SPLIT: { 7 | 'train': train, 8 | 'test': val 9 | } 10 | 11 | INFO_PATH: { 12 | 'train': [kitti_infos_train.pkl], 13 | 'test': [kitti_infos_val.pkl], 14 | } 15 | 16 | GET_ITEM_LIST: ["points"] 17 | FOV_POINTS_ONLY: True 18 | 19 | DATA_AUGMENTOR: 20 | DISABLE_AUG_LIST: ['placeholder'] 21 | AUG_CONFIG_LIST: 22 | - NAME: gt_sampling 23 | USE_ROAD_PLANE: True 24 | DB_INFO_PATH: 25 | - kitti_dbinfos_train.pkl 26 | PREPARE: { 27 | filter_by_min_points: ['Car:5', 'Pedestrian:5', 'Cyclist:5'], 28 | filter_by_difficulty: [-1], 29 | } 30 | 31 | SAMPLE_GROUPS: ['Car:20','Pedestrian:15', 'Cyclist:15'] 32 | NUM_POINT_FEATURES: 4 33 | DATABASE_WITH_FAKELIDAR: False 34 | REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0] 35 | LIMIT_WHOLE_SCENE: True 36 | 37 | - NAME: random_world_flip 38 | ALONG_AXIS_LIST: ['x'] 39 | 40 | - NAME: random_world_rotation 41 | WORLD_ROT_ANGLE: [-0.78539816, 0.78539816] 42 | 43 | - NAME: random_world_scaling 44 | WORLD_SCALE_RANGE: [0.95, 1.05] 45 | 46 | 47 | POINT_FEATURE_ENCODING: { 48 | encoding_type: absolute_coordinates_encoding, 49 | used_feature_list: ['x', 'y', 'z', 'intensity'], 50 | src_feature_list: ['x', 'y', 'z', 'intensity'], 51 | } 52 | 53 | 54 | DATA_PROCESSOR: 55 | - NAME: mask_points_and_boxes_outside_range 56 | REMOVE_OUTSIDE_BOXES: True 57 | 58 | - NAME: shuffle_points 59 | SHUFFLE_ENABLED: { 60 | 'train': True, 61 | 'test': False 62 | } 63 | 64 | - NAME: transform_points_to_voxels 65 | VOXEL_SIZE: [0.05, 0.05, 0.1] 66 | MAX_POINTS_PER_VOXEL: 5 67 | MAX_NUMBER_OF_VOXELS: { 68 | 'train': 16000, 69 | 'test': 40000 70 | } 71 | -------------------------------------------------------------------------------- /openpcdet/tools/cfgs/dataset_configs/lyft_dataset.yaml: -------------------------------------------------------------------------------- 1 | DATASET: 'LyftDataset' 2 | DATA_PATH: '../data/lyft' 3 | 4 | VERSION: 'trainval' 5 | SET_NAN_VELOCITY_TO_ZEROS: True 6 | FILTER_MIN_POINTS_IN_GT: 1 7 | MAX_SWEEPS: 5 8 | EVAL_LYFT_IOU_LIST: [0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95] 9 | 10 | DATA_SPLIT: { 11 | 'train': train, 12 | 'test': val 13 | } 14 | 15 | INFO_PATH: { 16 | 'train': [lyft_infos_train.pkl], 17 | 'test': [lyft_infos_val.pkl], 18 | } 19 | 20 | POINT_CLOUD_RANGE: [-80.0, -80.0, -5.0, 80.0, 80.0, 3.0] 21 | 22 | DATA_AUGMENTOR: 23 | DISABLE_AUG_LIST: ['placeholder'] 24 | AUG_CONFIG_LIST: 25 | - NAME: gt_sampling 26 | DB_INFO_PATH: 27 | - lyft_dbinfos_10sweeps.pkl 28 | PREPARE: { 29 | filter_by_min_points: [ 30 | 'car:5','pedestrian:5', 'motorcycle:5', 'bicycle:5', 'other_vehicle:5', 31 | 'bus:5', 'truck:5', 'emergency_vehicle:5', 'animal:5' 32 | ], 33 | } 34 | 35 | SAMPLE_GROUPS: [ 36 | 'car:3','pedestrian:3', 'motorcycle:6', 'bicycle:6', 'other_vehicle:4', 37 | 'bus:4', 'truck:3', 'emergency_vehicle:7', 'animal:3' 38 | ] 39 | 40 | NUM_POINT_FEATURES: 5 41 | DATABASE_WITH_FAKELIDAR: False 42 | REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0] 43 | LIMIT_WHOLE_SCENE: True 44 | 45 | - NAME: random_world_flip 46 | ALONG_AXIS_LIST: ['x', 'y'] 47 | 48 | - NAME: random_world_rotation 49 | WORLD_ROT_ANGLE: [-0.3925, 0.3925] 50 | 51 | - NAME: random_world_scaling 52 | WORLD_SCALE_RANGE: [0.95, 1.05] 53 | 54 | 55 | POINT_FEATURE_ENCODING: { 56 | encoding_type: absolute_coordinates_encoding, 57 | used_feature_list: ['x', 'y', 'z', 'intensity', 'timestamp'], 58 | src_feature_list: ['x', 'y', 'z', 'intensity', 'timestamp'], 59 | } 60 | 61 | 62 | DATA_PROCESSOR: 63 | - NAME: mask_points_and_boxes_outside_range 64 | REMOVE_OUTSIDE_BOXES: True 65 | 66 | - NAME: shuffle_points 67 | SHUFFLE_ENABLED: { 68 | 'train': True, 69 | 'test': True 70 | } 71 | 72 | - NAME: transform_points_to_voxels 73 | VOXEL_SIZE: [0.1, 0.1, 0.2] 74 | MAX_POINTS_PER_VOXEL: 10 75 | MAX_NUMBER_OF_VOXELS: { 76 | 'train': 80000, 77 | 'test': 80000 78 | } -------------------------------------------------------------------------------- /openpcdet/tools/cfgs/dataset_configs/once_dataset.yaml: -------------------------------------------------------------------------------- 1 | DATASET: 'ONCEDataset' 2 | DATA_PATH: '../data/once' 3 | CLOUD_DATA_PATH: '/cache/once' 4 | 5 | POINT_CLOUD_RANGE: [-75.2, -75.2, -5.0, 75.2, 75.2, 3.0] 6 | 7 | INFO_PATH: { 8 | 'train': [once_infos_train.pkl], 9 | 'val': [once_infos_val.pkl], 10 | 'test': [once_infos_test.pkl], 11 | } 12 | 13 | DATA_SPLIT: { 14 | 'train': train, 15 | 'test': val 16 | } 17 | 18 | DATA_AUGMENTOR: 19 | DISABLE_AUG_LIST: ['placeholder'] 20 | AUG_CONFIG_LIST: 21 | - NAME: gt_sampling 22 | USE_ROAD_PLANE: False 23 | DB_INFO_PATH: 24 | - once_dbinfos_train.pkl 25 | PREPARE: { 26 | filter_by_min_points: ['Car:5', 'Bus:5', 'Truck:5', 'Pedestrian:5', 'Cyclist:5'], 27 | } 28 | 29 | SAMPLE_GROUPS: ['Car:1', 'Bus:4', 'Truck:3', 'Pedestrian:2', 'Cyclist:2'] 30 | NUM_POINT_FEATURES: 4 31 | REMOVE_EXTRA_WIDTH: [0.0, 0.0, 0.0] 32 | LIMIT_WHOLE_SCENE: True 33 | 34 | - NAME: random_world_flip 35 | ALONG_AXIS_LIST: ['x', 'y'] 36 | 37 | - NAME: random_world_rotation 38 | WORLD_ROT_ANGLE: [-0.78539816, 0.78539816] 39 | 40 | - NAME: random_world_scaling 41 | WORLD_SCALE_RANGE: [0.95, 1.05] 42 | 43 | 44 | POINT_FEATURE_ENCODING: { 45 | encoding_type: absolute_coordinates_encoding, 46 | used_feature_list: ['x', 'y', 'z', 'intensity'], 47 | src_feature_list: ['x', 'y', 'z', 'intensity'], 48 | } 49 | 50 | 51 | DATA_PROCESSOR: 52 | - NAME: mask_points_and_boxes_outside_range 53 | REMOVE_OUTSIDE_BOXES: True 54 | 55 | - NAME: shuffle_points 56 | SHUFFLE_ENABLED: { 57 | 'train': True, 58 | 'test': False 59 | } 60 | 61 | - NAME: transform_points_to_voxels 62 | VOXEL_SIZE: [0.1, 0.1, 0.2] 63 | MAX_POINTS_PER_VOXEL: 5 64 | MAX_NUMBER_OF_VOXELS: { 65 | 'train': 60000, 66 | 'test': 60000 67 | } -------------------------------------------------------------------------------- /openpcdet/tools/eval_utils/__pycache__/eval_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/eval_utils/__pycache__/eval_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/tools/eval_utils/__pycache__/eval_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/eval_utils/__pycache__/eval_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/tools/scripts/check_exported_acts.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import sys 3 | import os 4 | 5 | if len(sys.argv) < 2: 6 | x = torch.load(os.path.join('./exported_intermediates.pth'),'cpu') 7 | else: 8 | x = torch.load(sys.argv[1],'cpu') 9 | 10 | print(x['model_3d']) 11 | for k,v in x.items(): 12 | if '3d_' in k and ('pre' in k or 'post' in k): 13 | print(k, v[0].features.shape) 14 | 15 | print(x['model_2d']) 16 | for k,v in x.items(): 17 | if 'block' in k: 18 | sparse_rate = (v[0]==0).int().sum() / v[0].nelement() 19 | print(k, sparse_rate) 20 | -------------------------------------------------------------------------------- /openpcdet/tools/scripts/dist_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | NGPUS=$1 5 | PY_ARGS=${@:2} 6 | 7 | python -m torch.distributed.launch --nproc_per_node=${NGPUS} --master_port 123458 test.py --launcher pytorch ${PY_ARGS} 8 | -------------------------------------------------------------------------------- /openpcdet/tools/scripts/dist_train.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | NGPUS=$1 5 | PY_ARGS=${@:2} 6 | 7 | while true 8 | do 9 | PORT=$(( ((RANDOM<<15)|RANDOM) % 49152 + 10000 )) 10 | status="$(nc -z 127.0.0.1 $PORT < /dev/null &>/dev/null; echo $?)" 11 | if [ "${status}" != "0" ]; then 12 | break; 13 | fi 14 | done 15 | echo $PORT 16 | 17 | # python -m torch.distributed.launch --nproc_per_node=${NGPUS} --rdzv_endpoint=localhost:${PORT} train.py --launcher pytorch ${PY_ARGS} 18 | python -m torch.distributed.launch --nproc_per_node=${NGPUS} --master_port $PORT train.py --launcher pytorch ${PY_ARGS} 19 | 20 | 21 | -------------------------------------------------------------------------------- /openpcdet/tools/scripts/procetss_ckpt_masked_bn.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | checkpoint = torch.load('./latest_model.pth','cpu') 4 | 5 | bn_op_names = [] 6 | for k in checkpoint['model_state'].keys(): 7 | if 'running_mean' in k and 'backbone_2d' in k: 8 | bn_op_name = k.replace('.running_mean','') 9 | bn_op_names.append(bn_op_name) 10 | 11 | print(bn_op_names) 12 | if 'optimizer_state' in checkpoint.keys(): 13 | del checkpoint['optimizer_state'] 14 | 15 | # drop running_mean, beta, number_batches_tracked 16 | # keep running_var and weight 17 | name_to_drop = ['running_mean','bias'] # also drop 'weight' if affine=False 18 | # name_to_modify = ['weight'] # change the bn.weight 19 | for n1 in bn_op_names: 20 | for n2 in name_to_drop: 21 | del checkpoint['model_state'][n1+'.'+n2] 22 | 23 | torch.save(checkpoint, 'latest_model_for_masked_bn.pth') 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /openpcdet/tools/scripts/slurm_test_mgpu.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | PARTITION=$1 6 | GPUS=$2 7 | GPUS_PER_NODE=$GPUS 8 | PY_ARGS=${@:3} 9 | JOB_NAME=eval 10 | SRUN_ARGS=${SRUN_ARGS:-""} 11 | 12 | while true 13 | do 14 | PORT=$(( ((RANDOM<<15)|RANDOM) % 49152 + 10000 )) 15 | status="$(nc -z 127.0.0.1 $PORT < /dev/null &>/dev/null; echo $?)" 16 | if [ "${status}" != "0" ]; then 17 | break; 18 | fi 19 | done 20 | echo $PORT 21 | 22 | srun -p ${PARTITION} \ 23 | --job-name=${JOB_NAME} \ 24 | --gres=gpu:${GPUS_PER_NODE} \ 25 | --ntasks=${GPUS} \ 26 | --ntasks-per-node=${GPUS_PER_NODE} \ 27 | --kill-on-bad-exit=1 \ 28 | ${SRUN_ARGS} \ 29 | python -u test.py --launcher slurm --tcp_port $PORT ${PY_ARGS} 30 | 31 | -------------------------------------------------------------------------------- /openpcdet/tools/scripts/slurm_test_single.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | PARTITION=$1 6 | GPUS=1 7 | GPUS_PER_NODE=1 8 | PY_ARGS=${@:2} 9 | JOB_NAME=eval 10 | SRUN_ARGS=${SRUN_ARGS:-""} 11 | 12 | srun -p ${PARTITION} \ 13 | --job-name=${JOB_NAME} \ 14 | --gres=gpu:${GPUS_PER_NODE} \ 15 | --ntasks=${GPUS} \ 16 | --ntasks-per-node=${GPUS_PER_NODE} \ 17 | --kill-on-bad-exit=1 \ 18 | ${SRUN_ARGS} \ 19 | python -u test.py ${PY_ARGS} 20 | -------------------------------------------------------------------------------- /openpcdet/tools/scripts/slurm_train.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | PARTITION=$1 6 | JOB_NAME=$2 7 | GPUS=$3 8 | PY_ARGS=${@:4} 9 | 10 | GPUS_PER_NODE=${GPUS_PER_NODE:-8} 11 | CPUS_PER_TASK=${CPUS_PER_TASK:-5} 12 | SRUN_ARGS=${SRUN_ARGS:-""} 13 | 14 | while true 15 | do 16 | PORT=$(( ((RANDOM<<15)|RANDOM) % 49152 + 10000 )) 17 | status="$(nc -z 127.0.0.1 $PORT < /dev/null &>/dev/null; echo $?)" 18 | if [ "${status}" != "0" ]; then 19 | break; 20 | fi 21 | done 22 | echo $PORT 23 | 24 | srun -p ${PARTITION} \ 25 | --job-name=${JOB_NAME} \ 26 | --gres=gpu:${GPUS_PER_NODE} \ 27 | --ntasks=${GPUS} \ 28 | --ntasks-per-node=${GPUS_PER_NODE} \ 29 | --cpus-per-task=${CPUS_PER_TASK} \ 30 | --kill-on-bad-exit=1 \ 31 | ${SRUN_ARGS} \ 32 | python -u train.py --launcher slurm --tcp_port $PORT ${PY_ARGS} 33 | -------------------------------------------------------------------------------- /openpcdet/tools/scripts/torch_train.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | NGPUS=$1 5 | PY_ARGS=${@:2} 6 | 7 | while true 8 | do 9 | PORT=$(( ((RANDOM<<15)|RANDOM) % 49152 + 10000 )) 10 | status="$(nc -z 127.0.0.1 $PORT < /dev/null &>/dev/null; echo $?)" 11 | if [ "${status}" != "0" ]; then 12 | break; 13 | fi 14 | done 15 | echo $PORT 16 | 17 | torchrun --nproc_per_node=${NGPUS} --rdzv_endpoint=localhost:${PORT} train.py --launcher pytorch ${PY_ARGS} 18 | 19 | -------------------------------------------------------------------------------- /openpcdet/tools/train_utils/__pycache__/train_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/train_utils/__pycache__/train_utils.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/tools/train_utils/__pycache__/train_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/train_utils/__pycache__/train_utils.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/tools/train_utils/optimization/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/train_utils/optimization/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/tools/train_utils/optimization/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/train_utils/optimization/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/tools/train_utils/optimization/__pycache__/fastai_optim.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/train_utils/optimization/__pycache__/fastai_optim.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/tools/train_utils/optimization/__pycache__/fastai_optim.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/train_utils/optimization/__pycache__/fastai_optim.cpython-38.pyc -------------------------------------------------------------------------------- /openpcdet/tools/train_utils/optimization/__pycache__/learning_schedules_fastai.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/train_utils/optimization/__pycache__/learning_schedules_fastai.cpython-37.pyc -------------------------------------------------------------------------------- /openpcdet/tools/train_utils/optimization/__pycache__/learning_schedules_fastai.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/A-suozhang/ada3d/9512743df55281e9f5933b09f503ae2882fe9a5a/openpcdet/tools/train_utils/optimization/__pycache__/learning_schedules_fastai.cpython-38.pyc --------------------------------------------------------------------------------