open-mmlab / OpenPCDet

OpenPCDet Toolbox for LiDAR-based 3D Object Detection.
Apache License 2.0
4.62k stars 1.29k forks source link

prediction on the custom data #147

Closed zhixiongzh closed 4 years ago

zhixiongzh commented 4 years ago

I have successfully run the test.py on the KITTI dataset. I am a student new to the 3D detection research. I want to ask for help, with this wonderful toolkit OpenPCDet, how can I predict using a pre-trained model on my own data provided by the teacher. Can anybody give me some help or blog which I can refer to. I want to check the result on the data my radar collected. Thanks for the kind help!

here is the bag information on my own data:

path:        2018-01-06-15-14-01.bag
version:     2.0
duration:    14:51s (891s)
start:       Jan 06 2018 15:14:01.43 (1515222841.43)
end:         Jan 06 2018 15:28:52.53 (1515223732.53)
size:        8.5 GB
messages:    45378
compression: none [8842/8842 chunks]
types:       nav_msgs/Odometry       [cd5e73d190d741a2f92e81eda573aca7]
             sensor_msgs/Imu         [6a62c6daae103f4ff57a132d6f95cec2]
             sensor_msgs/NavSatFix   [2d3a8cd499b9b4a0249fb98fd05cfa48]
             sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
topics:      /fix              892 msgs    : sensor_msgs/NavSatFix  
             /imu_raw        17823 msgs    : sensor_msgs/Imu        
             /odom_encoder   17822 msgs    : nav_msgs/Odometry      
             /points_raw      8841 msgs    : sensor_msgs/PointCloud2
sshaoshuai commented 4 years ago
  1. Load your custom data, and get the raw point cloud (N, 3) with x, y, z. (The provided pretrained-model used (N, 4) with x, y, z, intensity, if you doesn't have the intensity, then you need to train a new model without intensity. )
  2. You need to feed the points (N, 3 or 4) to the model, just refer to the _getitem_ function of kitti_dataset.py to repace the kitti points with your own points.

Also remember that the coordinate of your points (N, 3) should in the unified normative coordinate of PCDet as shown in the README.md. And the radar points are much sparser than the KITTI LiDAR points, so I guess you may get a bad prediction results if you only use the radar points.

zhixiongzh commented 4 years ago

@sshaoshuai Thanks for your kind help and it is my mistake, it is lidar data, not radar.

From other issues I did the following things.

  1. Replace the files in ./data/kitti/testing/velodyne with my PC.bin files
  2. Copy one file in the /testing/calib as much as the number of my PC.bin files and rename them after the index, because I don't have that kind of file and just want to check the result on lidar rather than images.
  3. Do the second step to the data in the image_2 directory.
  4. run python -m pcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml to generate info.pkl, which is successful
  5. according to other contents in issues, I change the DATA_SPLIT['test']=test and INFO_PATH['test']=kitti_infos_test.pkl in kitti_dataset.yaml, and then run python test.py --cfg_file ./cfgs/kitti_models/pv_rcnn.yaml --batch_size 2 --ckpt ./cfgs/kitti_models/pv_rcnn_8369.pth

the following errors appear. Is there anything wrong with my steps? I used to test successfully on the official kitti test data. Could you please kindly have a check on my steps and the errors?


(base) shawn@shawn-HP:~/OpenPCDet/tools$ python test.py --cfg_file ./cfgs/kitti_models/pv_rcnn.yaml --batch_size 2 --ckpt ./cfgs/kitti_models/pv_rcnn_8369.pth
2020-07-15 17:34:52,322   INFO  **********************Start logging**********************
2020-07-15 17:34:52,323   INFO  CUDA_VISIBLE_DEVICES=ALL
2020-07-15 17:34:52,323   INFO  cfg_file         ./cfgs/kitti_models/pv_rcnn.yaml
2020-07-15 17:34:52,323   INFO  batch_size       2
2020-07-15 17:34:52,323   INFO  epochs           80
2020-07-15 17:34:52,323   INFO  workers          4
2020-07-15 17:34:52,323   INFO  extra_tag        default
2020-07-15 17:34:52,323   INFO  ckpt             ./cfgs/kitti_models/pv_rcnn_8369.pth
2020-07-15 17:34:52,323   INFO  mgpus            False
2020-07-15 17:34:52,323   INFO  launcher         none
2020-07-15 17:34:52,323   INFO  tcp_port         18888
2020-07-15 17:34:52,323   INFO  local_rank       0
2020-07-15 17:34:52,323   INFO  set_cfgs         None
2020-07-15 17:34:52,323   INFO  max_waiting_mins 30
2020-07-15 17:34:52,323   INFO  start_epoch      0
2020-07-15 17:34:52,323   INFO  eval_tag         default
2020-07-15 17:34:52,323   INFO  eval_all         False
2020-07-15 17:34:52,323   INFO  ckpt_dir         None
2020-07-15 17:34:52,323   INFO  save_to_file     False
2020-07-15 17:34:52,323   INFO  cfg.ROOT_DIR: /home/shawn/OpenPCDet
2020-07-15 17:34:52,323   INFO  cfg.LOCAL_RANK: 0
2020-07-15 17:34:52,324   INFO  cfg.CLASS_NAMES: ['Car', 'Pedestrian', 'Cyclist']
2020-07-15 17:34:52,324   INFO  
cfg.DATA_CONFIG = edict()
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.DATASET: KittiDataset
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.DATA_PATH: ../data/kitti
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.POINT_CLOUD_RANGE: [0, -40, -3, 70.4, 40, 1]
2020-07-15 17:34:52,324   INFO  
cfg.DATA_CONFIG.DATA_SPLIT = edict()
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.DATA_SPLIT.train: train
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.DATA_SPLIT.test: test
2020-07-15 17:34:52,324   INFO  
cfg.DATA_CONFIG.INFO_PATH = edict()
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.INFO_PATH.train: ['kitti_infos_train.pkl']
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.INFO_PATH.test: ['kitti_infos_test.pkl']
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.FOV_POINTS_ONLY: True
2020-07-15 17:34:52,324   INFO  
cfg.DATA_CONFIG.DATA_AUGMENTOR = edict()
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.DATA_AUGMENTOR.DISABLE_AUG_LIST: ['placeholder']
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.DATA_AUGMENTOR.AUG_CONFIG_LIST: [{'NAME': 'gt_sampling', 'USE_ROAD_PLANE': True, 'DB_INFO_PATH': ['kitti_dbinfos_train.pkl'], 'PREPARE': {'filter_by_min_points': ['Car:5', 'Pedestrian:5', 'Cyclist:5'], 'filter_by_difficulty': [-1]}, 'SAMPLE_GROUPS': ['Car:15', 'Pedestrian:10', 'Cyclist:10'], 'NUM_POINT_FEATURES': 4, 'DATABASE_WITH_FAKELIDAR': False, 'REMOVE_EXTRA_WIDTH': [0.0, 0.0, 0.0], 'LIMIT_WHOLE_SCENE': False}, {'NAME': 'random_world_flip', 'ALONG_AXIS_LIST': ['x']}, {'NAME': 'random_world_rotation', 'WORLD_ROT_ANGLE': [-0.78539816, 0.78539816]}, {'NAME': 'random_world_scaling', 'WORLD_SCALE_RANGE': [0.95, 1.05]}]
2020-07-15 17:34:52,324   INFO  
cfg.DATA_CONFIG.POINT_FEATURE_ENCODING = edict()
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.POINT_FEATURE_ENCODING.encoding_type: absolute_coordinates_encoding
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.POINT_FEATURE_ENCODING.used_feature_list: ['x', 'y', 'z', 'intensity']
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.POINT_FEATURE_ENCODING.src_feature_list: ['x', 'y', 'z', 'intensity']
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG.DATA_PROCESSOR: [{'NAME': 'mask_points_and_boxes_outside_range', 'REMOVE_OUTSIDE_BOXES': True}, {'NAME': 'shuffle_points', 'SHUFFLE_ENABLED': {'train': True, 'test': False}}, {'NAME': 'transform_points_to_voxels', 'VOXEL_SIZE': [0.05, 0.05, 0.1], 'MAX_POINTS_PER_VOXEL': 5, 'MAX_NUMBER_OF_VOXELS': {'train': 16000, 'test': 40000}}]
2020-07-15 17:34:52,324   INFO  cfg.DATA_CONFIG._BASE_CONFIG_: cfgs/dataset_configs/kitti_dataset.yaml
2020-07-15 17:34:52,324   INFO  
cfg.MODEL = edict()
2020-07-15 17:34:52,324   INFO  cfg.MODEL.NAME: PVRCNN
2020-07-15 17:34:52,324   INFO  
cfg.MODEL.VFE = edict()
2020-07-15 17:34:52,324   INFO  cfg.MODEL.VFE.NAME: MeanVFE
2020-07-15 17:34:52,324   INFO  
cfg.MODEL.BACKBONE_3D = edict()
2020-07-15 17:34:52,324   INFO  cfg.MODEL.BACKBONE_3D.NAME: VoxelBackBone8x
2020-07-15 17:34:52,324   INFO  
cfg.MODEL.MAP_TO_BEV = edict()
2020-07-15 17:34:52,324   INFO  cfg.MODEL.MAP_TO_BEV.NAME: HeightCompression
2020-07-15 17:34:52,325   INFO  cfg.MODEL.MAP_TO_BEV.NUM_BEV_FEATURES: 256
2020-07-15 17:34:52,325   INFO  
cfg.MODEL.BACKBONE_2D = edict()
2020-07-15 17:34:52,325   INFO  cfg.MODEL.BACKBONE_2D.NAME: BaseBEVBackbone
2020-07-15 17:34:52,325   INFO  cfg.MODEL.BACKBONE_2D.LAYER_NUMS: [5, 5]
2020-07-15 17:34:52,325   INFO  cfg.MODEL.BACKBONE_2D.LAYER_STRIDES: [1, 2]
2020-07-15 17:34:52,325   INFO  cfg.MODEL.BACKBONE_2D.NUM_FILTERS: [128, 256]
2020-07-15 17:34:52,325   INFO  cfg.MODEL.BACKBONE_2D.UPSAMPLE_STRIDES: [1, 2]
2020-07-15 17:34:52,325   INFO  cfg.MODEL.BACKBONE_2D.NUM_UPSAMPLE_FILTERS: [256, 256]
2020-07-15 17:34:52,325   INFO  
cfg.MODEL.DENSE_HEAD = edict()
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.NAME: AnchorHeadSingle
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.CLASS_AGNOSTIC: False
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.USE_DIRECTION_CLASSIFIER: True
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.DIR_OFFSET: 0.78539
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.DIR_LIMIT_OFFSET: 0.0
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.NUM_DIR_BINS: 2
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.ANCHOR_GENERATOR_CONFIG: [{'class_name': 'Car', 'anchor_sizes': [[3.9, 1.6, 1.56]], 'anchor_rotations': [0, 1.57], 'anchor_bottom_heights': [-1.78], 'align_center': False, 'feature_map_stride': 8, 'matched_threshold': 0.6, 'unmatched_threshold': 0.45}, {'class_name': 'Pedestrian', 'anchor_sizes': [[0.8, 0.6, 1.73]], 'anchor_rotations': [0, 1.57], 'anchor_bottom_heights': [-0.6], 'align_center': False, 'feature_map_stride': 8, 'matched_threshold': 0.5, 'unmatched_threshold': 0.35}, {'class_name': 'Cyclist', 'anchor_sizes': [[1.76, 0.6, 1.73]], 'anchor_rotations': [0, 1.57], 'anchor_bottom_heights': [-0.6], 'align_center': False, 'feature_map_stride': 8, 'matched_threshold': 0.5, 'unmatched_threshold': 0.35}]
2020-07-15 17:34:52,325   INFO  
cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG = edict()
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.NAME: AxisAlignedTargetAssigner
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.POS_FRACTION: -1.0
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.SAMPLE_SIZE: 512
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.NORM_BY_NUM_EXAMPLES: False
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.MATCH_HEIGHT: False
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.TARGET_ASSIGNER_CONFIG.BOX_CODER: ResidualCoder
2020-07-15 17:34:52,325   INFO  
cfg.MODEL.DENSE_HEAD.LOSS_CONFIG = edict()
2020-07-15 17:34:52,325   INFO  
cfg.MODEL.DENSE_HEAD.LOSS_CONFIG.LOSS_WEIGHTS = edict()
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.cls_weight: 1.0
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.loc_weight: 2.0
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.dir_weight: 0.2
2020-07-15 17:34:52,325   INFO  cfg.MODEL.DENSE_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.code_weights: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
2020-07-15 17:34:52,326   INFO  
cfg.MODEL.PFE = edict()
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.NAME: VoxelSetAbstraction
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.POINT_SOURCE: raw_points
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.NUM_KEYPOINTS: 2048
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.NUM_OUTPUT_FEATURES: 128
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SAMPLE_METHOD: FPS
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.FEATURES_SOURCE: ['bev', 'x_conv1', 'x_conv2', 'x_conv3', 'x_conv4', 'raw_points']
2020-07-15 17:34:52,326   INFO  
cfg.MODEL.PFE.SA_LAYER = edict()
2020-07-15 17:34:52,326   INFO  
cfg.MODEL.PFE.SA_LAYER.raw_points = edict()
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.raw_points.MLPS: [[16, 16], [16, 16]]
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.raw_points.POOL_RADIUS: [0.4, 0.8]
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.raw_points.NSAMPLE: [16, 16]
2020-07-15 17:34:52,326   INFO  
cfg.MODEL.PFE.SA_LAYER.x_conv1 = edict()
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv1.DOWNSAMPLE_FACTOR: 1
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv1.MLPS: [[16, 16], [16, 16]]
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv1.POOL_RADIUS: [0.4, 0.8]
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv1.NSAMPLE: [16, 16]
2020-07-15 17:34:52,326   INFO  
cfg.MODEL.PFE.SA_LAYER.x_conv2 = edict()
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv2.DOWNSAMPLE_FACTOR: 2
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv2.MLPS: [[32, 32], [32, 32]]
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv2.POOL_RADIUS: [0.8, 1.2]
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv2.NSAMPLE: [16, 32]
2020-07-15 17:34:52,326   INFO  
cfg.MODEL.PFE.SA_LAYER.x_conv3 = edict()
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv3.DOWNSAMPLE_FACTOR: 4
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv3.MLPS: [[64, 64], [64, 64]]
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv3.POOL_RADIUS: [1.2, 2.4]
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv3.NSAMPLE: [16, 32]
2020-07-15 17:34:52,326   INFO  
cfg.MODEL.PFE.SA_LAYER.x_conv4 = edict()
2020-07-15 17:34:52,326   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv4.DOWNSAMPLE_FACTOR: 8
2020-07-15 17:34:52,327   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv4.MLPS: [[64, 64], [64, 64]]
2020-07-15 17:34:52,327   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv4.POOL_RADIUS: [2.4, 4.8]
2020-07-15 17:34:52,327   INFO  cfg.MODEL.PFE.SA_LAYER.x_conv4.NSAMPLE: [16, 32]
2020-07-15 17:34:52,327   INFO  
cfg.MODEL.POINT_HEAD = edict()
2020-07-15 17:34:52,327   INFO  cfg.MODEL.POINT_HEAD.NAME: PointHeadSimple
2020-07-15 17:34:52,327   INFO  cfg.MODEL.POINT_HEAD.CLS_FC: [256, 256]
2020-07-15 17:34:52,327   INFO  cfg.MODEL.POINT_HEAD.CLASS_AGNOSTIC: True
2020-07-15 17:34:52,327   INFO  cfg.MODEL.POINT_HEAD.USE_POINT_FEATURES_BEFORE_FUSION: True
2020-07-15 17:34:52,327   INFO  
cfg.MODEL.POINT_HEAD.TARGET_CONFIG = edict()
2020-07-15 17:34:52,327   INFO  cfg.MODEL.POINT_HEAD.TARGET_CONFIG.GT_EXTRA_WIDTH: [0.2, 0.2, 0.2]
2020-07-15 17:34:52,327   INFO  
cfg.MODEL.POINT_HEAD.LOSS_CONFIG = edict()
2020-07-15 17:34:52,327   INFO  cfg.MODEL.POINT_HEAD.LOSS_CONFIG.LOSS_REG: smooth-l1
2020-07-15 17:34:52,327   INFO  
cfg.MODEL.POINT_HEAD.LOSS_CONFIG.LOSS_WEIGHTS = edict()
2020-07-15 17:34:52,327   INFO  cfg.MODEL.POINT_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.point_cls_weight: 1.0
2020-07-15 17:34:52,327   INFO  
cfg.MODEL.ROI_HEAD = edict()
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.NAME: PVRCNNHead
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.CLASS_AGNOSTIC: True
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.SHARED_FC: [256, 256]
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.CLS_FC: [256, 256]
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.REG_FC: [256, 256]
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.DP_RATIO: 0.3
2020-07-15 17:34:52,327   INFO  
cfg.MODEL.ROI_HEAD.NMS_CONFIG = edict()
2020-07-15 17:34:52,327   INFO  
cfg.MODEL.ROI_HEAD.NMS_CONFIG.TRAIN = edict()
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TRAIN.NMS_TYPE: nms_gpu
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TRAIN.MULTI_CLASSES_NMS: False
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TRAIN.NMS_PRE_MAXSIZE: 9000
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TRAIN.NMS_POST_MAXSIZE: 512
2020-07-15 17:34:52,327   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TRAIN.NMS_THRESH: 0.8
2020-07-15 17:34:52,327   INFO  
cfg.MODEL.ROI_HEAD.NMS_CONFIG.TEST = edict()
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TEST.NMS_TYPE: nms_gpu
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TEST.MULTI_CLASSES_NMS: False
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TEST.NMS_PRE_MAXSIZE: 1024
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TEST.NMS_POST_MAXSIZE: 100
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.NMS_CONFIG.TEST.NMS_THRESH: 0.7
2020-07-15 17:34:52,328   INFO  
cfg.MODEL.ROI_HEAD.ROI_GRID_POOL = edict()
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.ROI_GRID_POOL.GRID_SIZE: 6
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.ROI_GRID_POOL.MLPS: [[64, 64], [64, 64]]
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.ROI_GRID_POOL.POOL_RADIUS: [0.8, 1.6]
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.ROI_GRID_POOL.NSAMPLE: [16, 16]
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.ROI_GRID_POOL.POOL_METHOD: max_pool
2020-07-15 17:34:52,328   INFO  
cfg.MODEL.ROI_HEAD.TARGET_CONFIG = edict()
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.BOX_CODER: ResidualCoder
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.ROI_PER_IMAGE: 128
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.FG_RATIO: 0.5
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.SAMPLE_ROI_BY_EACH_CLASS: True
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.CLS_SCORE_TYPE: roi_iou
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.CLS_FG_THRESH: 0.75
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.CLS_BG_THRESH: 0.25
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.CLS_BG_THRESH_LO: 0.1
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.HARD_BG_RATIO: 0.8
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.TARGET_CONFIG.REG_FG_THRESH: 0.55
2020-07-15 17:34:52,328   INFO  
cfg.MODEL.ROI_HEAD.LOSS_CONFIG = edict()
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.LOSS_CONFIG.CLS_LOSS: BinaryCrossEntropy
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.LOSS_CONFIG.REG_LOSS: smooth-l1
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.LOSS_CONFIG.CORNER_LOSS_REGULARIZATION: True
2020-07-15 17:34:52,328   INFO  
cfg.MODEL.ROI_HEAD.LOSS_CONFIG.LOSS_WEIGHTS = edict()
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.rcnn_cls_weight: 1.0
2020-07-15 17:34:52,328   INFO  cfg.MODEL.ROI_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.rcnn_reg_weight: 1.0
2020-07-15 17:34:52,329   INFO  cfg.MODEL.ROI_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.rcnn_corner_weight: 1.0
2020-07-15 17:34:52,329   INFO  cfg.MODEL.ROI_HEAD.LOSS_CONFIG.LOSS_WEIGHTS.code_weights: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
2020-07-15 17:34:52,329   INFO  
cfg.MODEL.POST_PROCESSING = edict()
2020-07-15 17:34:52,329   INFO  cfg.MODEL.POST_PROCESSING.RECALL_THRESH_LIST: [0.3, 0.5, 0.7]
2020-07-15 17:34:52,329   INFO  cfg.MODEL.POST_PROCESSING.SCORE_THRESH: 0.1
2020-07-15 17:34:52,329   INFO  cfg.MODEL.POST_PROCESSING.OUTPUT_RAW_SCORE: False
2020-07-15 17:34:52,329   INFO  cfg.MODEL.POST_PROCESSING.EVAL_METRIC: kitti
2020-07-15 17:34:52,329   INFO  
cfg.MODEL.POST_PROCESSING.NMS_CONFIG = edict()
2020-07-15 17:34:52,329   INFO  cfg.MODEL.POST_PROCESSING.NMS_CONFIG.MULTI_CLASSES_NMS: False
2020-07-15 17:34:52,329   INFO  cfg.MODEL.POST_PROCESSING.NMS_CONFIG.NMS_TYPE: nms_gpu
2020-07-15 17:34:52,329   INFO  cfg.MODEL.POST_PROCESSING.NMS_CONFIG.NMS_THRESH: 0.1
2020-07-15 17:34:52,329   INFO  cfg.MODEL.POST_PROCESSING.NMS_CONFIG.NMS_PRE_MAXSIZE: 4096
2020-07-15 17:34:52,329   INFO  cfg.MODEL.POST_PROCESSING.NMS_CONFIG.NMS_POST_MAXSIZE: 500
2020-07-15 17:34:52,329   INFO  
cfg.OPTIMIZATION = edict()
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.OPTIMIZER: adam_onecycle
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.LR: 0.01
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.WEIGHT_DECAY: 0.01
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.MOMENTUM: 0.9
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.MOMS: [0.95, 0.85]
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.PCT_START: 0.4
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.DIV_FACTOR: 10
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.DECAY_STEP_LIST: [35, 45]
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.LR_DECAY: 0.1
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.LR_CLIP: 1e-07
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.LR_WARMUP: False
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.WARMUP_EPOCH: 1
2020-07-15 17:34:52,329   INFO  cfg.OPTIMIZATION.GRAD_NORM_CLIP: 10
2020-07-15 17:34:52,329   INFO  cfg.TAG: pv_rcnn
2020-07-15 17:34:52,329   INFO  cfg.EXP_GROUP_PATH: cfgs/kitti_models
2020-07-15 17:34:52,375   INFO  Loading KITTI dataset
2020-07-15 17:34:52,385   INFO  Total samples for KITTI dataset: 1772
2020-07-15 17:34:54,231   INFO  ==> Loading parameters from checkpoint ./cfgs/kitti_models/pv_rcnn_8369.pth to GPU
2020-07-15 17:34:54,793   INFO  ==> Done (loaded 367/367)
2020-07-15 17:34:54,817   INFO  *************** EPOCH 8369 EVALUATION *****************
eval:   0%|                                             | 0/886 [00:00<?, ?it/s]/home/shawn/OpenPCDet/pcdet/datasets/kitti/kitti_dataset.py:113: RuntimeWarning: invalid value encountered in greater_equal
  pts_valid_flag = np.logical_and(val_flag_merge, pts_rect_depth >= 0)
/home/shawn/OpenPCDet/pcdet/datasets/kitti/kitti_dataset.py:113: RuntimeWarning: invalid value encountered in greater_equal
  pts_valid_flag = np.logical_and(val_flag_merge, pts_rect_depth >= 0)
/home/shawn/OpenPCDet/pcdet/datasets/kitti/kitti_dataset.py:113: RuntimeWarning: invalid value encountered in greater_equal
  pts_valid_flag = np.logical_and(val_flag_merge, pts_rect_depth >= 0)
/home/shawn/OpenPCDet/pcdet/datasets/kitti/kitti_dataset.py:113: RuntimeWarning: invalid value encountered in greater_equal
  pts_valid_flag = np.logical_and(val_flag_merge, pts_rect_depth >= 0)
eval:  17%|██          | 154/886 [00:54<04:09,  2.93it/s, recall_0.3=(0, 0) / 0]Traceback (most recent call last):
  File "test.py", line 190, in <module>
    main()
  File "test.py", line 186, in main
    eval_single_ckpt(model, test_loader, args, eval_output_dir, logger, epoch_id, dist_test=dist_test)
  File "test.py", line 60, in eval_single_ckpt
    result_dir=eval_output_dir, save_to_file=args.save_to_file
  File "/home/shawn/OpenPCDet/tools/eval_utils/eval_utils.py", line 57, in eval_one_epoch
    pred_dicts, ret_dict = model(batch_dict)
  File "/home/shawn/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/shawn/OpenPCDet/pcdet/models/detectors/pv_rcnn.py", line 11, in forward
    batch_dict = cur_module(batch_dict)
  File "/home/shawn/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/shawn/OpenPCDet/pcdet/models/backbones_3d/pfe/voxel_set_abstraction.py", line 176, in forward
    keypoints = self.get_sampled_points(batch_dict)
  File "/home/shawn/OpenPCDet/pcdet/models/backbones_3d/pfe/voxel_set_abstraction.py", line 146, in get_sampled_points
    keypoints = sampled_points[0][cur_pt_idxs[0]].unsqueeze(dim=0)
IndexError: index is out of bounds for dimension with size 0
eval:  17%|██          | 154/886 [00:54<04:18,  2.83it/s, recall_0.3=(0, 0) / 0]
zhixiongzh commented 4 years ago

The position of some pc equals 0, which causes such errors. I would close the issue.

zzqjh commented 4 years ago

hello,i also want to use my own dataset ,but i wonder how i can get the .bin file about the lidar data.could you please give me some suggestions about getting the .bin file from the rosbag file?

zhixiongzh commented 4 years ago

@zzqjh please refer to this project https://github.com/leofansq/Tools_RosBag2KITTI

zzqjh commented 4 years ago

thank you for giving me the great advice!

alixiansen91 commented 3 years ago

Hello, on the basis of using only 3D point cloud data, how to use the reference coordinate system under KITTI? There is another question, how do you know what your coordinate system is like?

zjx99 commented 3 years ago

Hello, on the basis of using only 3D point cloud data, how to use the reference coordinate system under KITTI? There is another question, how do you know what your coordinate system is like?

Have the same question.

clytze0216 commented 3 years ago

@ zjx99 hi, I have the same question. Did you solve it?

zjx99 commented 3 years ago

Hi, clytze0216,

Sorry, not yet, still in the middle of it.

Ysnnnn commented 6 months ago

The position of some pc equals 0, which causes such errors. I would close the issue.

why the position of some pc equals 0 will cause error? Would you please tell me how do you fix this problem, thanks!

zhixiongzh commented 6 months ago

The position of some pc equals 0, which causes such errors. I would close the issue.

why the position of some pc equals 0 will cause error? Would you please tell me how do you fix this problem, thanks!

@Ysnnnn I cannot recall what was happening, it is long time ago, but index is out of bounds for dimension with size 0 usually means the index is larger than the amount of data. So you can set a debug point there and check your data. I guess in my case there is no data( i guess).

Ysnnnn commented 6 months ago

The position of some pc equals 0, which causes such errors. I would close the issue.

why the position of some pc equals 0 will cause error? Would you please tell me how do you fix this problem, thanks!

@Ysnnnn I cannot recall what was happening, it is long time ago, but index is out of bounds for dimension with size 0 usually means the index is larger than the amount of data. So you can set a debug point there and check your data. I guess in my case there is no data( i guess).

I will try, thank you

adri1cc commented 6 months ago

@sshaoshuai Thanks for your kind help and it is my mistake, it is lidar data, not radar.

From other issues I did the following things.

  1. Replace the files in ./data/kitti/testing/velodyne with my PC.bin files
  2. Copy one file in the /testing/calib as much as the number of my PC.bin files and rename them after the index, because I don't have that kind of file and just want to check the result on lidar rather than images.
  3. Do the second step to the data in the image_2 directory.
  4. run python -m pcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml to generate info.pkl, which is successful
  5. according to other contents in issues, I change the DATA_SPLIT['test']=test and INFO_PATH['test']=kitti_infos_test.pkl in kitti_dataset.yaml, and then run python test.py --cfg_file ./cfgs/kitti_models/pv_rcnn.yaml --batch_size 2 --ckpt ./cfgs/kitti_models/pv_rcnn_8369.pth

@zhixiongzh Hi, I'm new to 3D object detection and I'm trying to learn how to use this library, and how to use my own dataset. Was this the right method to start ?

Petros626 commented 1 week ago

@zhixiongzh following the custom dataset readme, read all issues about this process.