sshaoshuai / PointRCNN

PointRCNN: 3D Object Proposal Generation and Detection from Point Cloud, CVPR 2019.
MIT License
1.72k stars 425 forks source link

Which folder are the test results stored in? #78

Open shengyuwoo opened 5 years ago

shengyuwoo commented 5 years ago

Hi, When using the trained model to detect. Which folder does your 3D point cloud target detection result have? What format is saved, txt or npy or other? Can I visualize the target detection directly with mayavi?

bmankirLinker commented 5 years ago

Assuming you're using the pre-trained model, the results of cuboids with classes in KITTI format are saved in output/rcnn/default/eval/epoch_no_number/val/final_result/data in txt format. You'll have the image boxes and 3d boxes provided there, you can visualize with the tool you like.

shengyuwoo commented 5 years ago

Assuming you're using the pre-trained model, the results of cuboids with classes in KITTI format are saved in output/rcnn/default/eval/epoch_no_number/val/final_result/data in txt format. You'll have the image boxes and 3d boxes provided there, you can visualize with the tool you like.

Now, I have completed two stages of RPN and RCNN training according to the author's steps. After training in RCNN at this stage, I got a checkpoint_epoch_30.pth file. I used eval_rcnn.py to load this file, but it was not as successful as loading a pre-trained model. Is the checkpoint_epoch_30.pth file different from the PointRCNN.pth file after training in this RCNN phase?

bmankirLinker commented 5 years ago

Assuming you're using the default.yaml, did you use the --set RPN.LOC_XZ_FINE False while running eval_rcnn.py for your own trained model , because you shouldn't have.

shengyuwoo commented 5 years ago

Assuming you're using the default.yaml, did you use the --set RPN.LOC_XZ_FINE False while running eval_rcnn.py for your own trained model , because you shouldn't have.

But I deleted the sentence - set RPN. LOC_XZ_FINE False, which also showed an error. What should I do? Modify the default. yaml file or add any commands?

bmankirLinker commented 5 years ago

@shengyuwoo can you paste the error message here?

shengyuwoo commented 5 years ago

@shengyuwoo can you paste the error message here?

OK,the error message following: Traceback (most recent call last): File "eval_rcnn.py", line 902, in eval_single_ckpt(root_result_dir) File "eval_rcnn.py", line 762, in eval_single_ckpt load_ckpt_based_on_args(model, logger) File "eval_rcnn.py", line 719, in load_ckpt_based_on_args train_utils.load_checkpoint(model, filename=args.ckpt, logger=logger) File "/home/wushengyu/PointRCNN/tools/../tools/train_utils/train_utils.py", line 85, in load_checkpoint model.load_state_dict(checkpoint['model_state']) File "/home/wushengyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 777, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for PointRCNN: Missing key(s) in state_dict: "rpn.backbone_net.SA_modules.0.mlps.0.layer0.conv.weight", "rpn.backbone_net.SA_modules.0.mlps.0.layer0.bn.bn.weight", "rpn.backbone_net.SA_modules.0.mlps.0.layer0.bn.bn.bias", "rpn.backbone_net.SA_modules.0.mlps.0.layer0.bn.bn.running~~

bmankirLinker commented 5 years ago

@shengyuwoo can you also put the command you run.

shengyuwoo commented 5 years ago

@shengyuwoo can you also put the command you run.

I don't know what's wrong with this. Can you tell me?

bmankirLinker commented 5 years ago

@shengyuwoo It looks like the model you provide with --ckpt doesn't have the rpn params. But you have to provide the commands that you run through the whole process to understand the case.

shengyuwoo commented 5 years ago

@shengyuwoo It looks like the model you provide with --ckpt doesn't have the rpn params. But you have to provide the commands that you run through the whole process to understand the case.

I tried to run the model file checkpoint_epoch_200 trained by RPN in the first stage or checkpoint_epoch_30 trained by RCNN in the second stage. The results were all unsuccessful. Do I need to run both files at the same time?

bmankirLinker commented 5 years ago

@shengyuwoo since you don't provide the commands, I can't understand what you were really up to :)

shengyuwoo commented 5 years ago

@shengyuwoo since you don't provide the commands, I can't understand what you were really up to :)

I completed the second stage of RCNN training, got a checkppoint_epoch_30.pth file, and then I executed the command:python eval_rcnn.py --cfg_file cfgs/default.yaml --ckpt checkpoint_epoch_30.pth --batch_size 1 --eval_mode rcnn --set RPN.LOC_XZ_FINE False , then the following problems arise: Traceback (most recent call last): File "eval_rcnn.py", line 902, in eval_single_ckpt(root_result_dir) File "eval_rcnn.py", line 762, in eval_single_ckpt load_ckpt_based_on_args(model, logger) File "eval_rcnn.py", line 719, in load_ckpt_based_on_args train_utils.load_checkpoint(model, filename=args.ckpt, logger=logger) File "/home/wushengyu/PointRCNN/tools/../tools/train_utils/train_utils.py", line 85, in load_checkpoint model.load_state_dict(checkpoint['model_state']) File "/home/wushengyu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 777, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for PointRCNN: Missing key(s) in state_dict: "rpn.backbone_net.SA_modules.0.mlps.0.laye

bmankirLinker commented 5 years ago

My guess is that it looks like your training in the second stage had some issues, RPN side didn't load correctly so the final ckpt RCNN has missing keys of RPN. And also your ckpt file should be in the output directory under output/rcnn/default/ckpt, don't know if you moved the file.

shengyuwoo commented 5 years ago

My guess is that it looks like your training in the second stage had some issues, RPN side didn't load correctly so the final ckpt RCNN has missing keys of RPN. And also your ckpt file should be in the output directory under output/rcnn/default/ckpt, don't know if you moved the file.

Did you follow the author's steps to train successfully and test successfully? Have you changed any parameters in which file?

fxy2012 commented 5 years ago

@shengyuwoo ,I have the same problem as yours. And I tried to run the second line of inference code.I found that in ../output/rcnn/ckpt folder , checkpoint_epoch_32.pth can test successfully. I think 32-70 are all ok to test, 1-30 , which we trained in the last step , may have some problems. And I didn't find the reason , if you have some thoughts, please share with me.

bmankirLinker commented 5 years ago

My guess is that it looks like your training in the second stage had some issues, RPN side didn't load correctly so the final ckpt RCNN has missing keys of RPN. And also your ckpt file should be in the output directory under output/rcnn/default/ckpt, don't know if you moved the file.

Did you follow the author's steps to train successfully and test successfully? Have you changed any parameters in which file?

For the car detection training on KITTI, you don't need to change anything, if you don't want to update some hyper-params to improve accuracy.

shengyuwoo commented 5 years ago

My guess is that it looks like your training in the second stage had some issues, RPN side didn't load correctly so the final ckpt RCNN has missing keys of RPN. And also your ckpt file should be in the output directory under output/rcnn/default/ckpt, don't know if you moved the file.

Did you follow the author's steps to train successfully and test successfully? Have you changed any parameters in which file?

For the car detection training on KITTI, you don't need to change anything, if you don't want to update some hyper-params to improve accuracy.

Because of the poor performance of my computer, I changed the size of batch_size in the two stages of training. Is that the reason why the model I trained can not be used?

shengyuwoo commented 5 years ago

@shengyuwoo ,I have the same problem as yours. And I tried to run the second line of inference code.I found that in ../output/rcnn/ckpt folder , checkpoint_epoch_32.pth can test successfully. I think 32-70 are all ok to test, 1-30 , which we trained in the last step , may have some problems. And I didn't find the reason , if you have some thoughts, please share with me.

Because of the poor performance of my computer, I changed the size of batch_size in the two stages of training. Is that the reason why the model I trained can not be used? Did you choose the same batch_size as the code provided by the author when training the model?

bmankirLinker commented 5 years ago

@shengyuwoo ,I have the same problem as yours. And I tried to run the second line of inference code.I found that in ../output/rcnn/ckpt folder , checkpoint_epoch_32.pth can test successfully. I think 32-70 are all ok to test, 1-30 , which we trained in the last step , may have some problems. And I didn't find the reason , if you have some thoughts, please share with me.

Because of the poor performance of my computer, I changed the size of batch_size in the two stages of training. Is that the reason why the model I trained can not be used? Did you choose the same batch_size as the code provided by the author when training the model?

Yeah, I have used the same batch size, but I wouldn't say that would create an error only a minor performance degradation maybe.

fxy2012 commented 5 years ago

@shengyuwoo , I use the same parameters as the author, but I still came across the same problem which you mentioned above. I don't think batchsize is the reason.

York1996OutLook commented 4 years ago

if you use rcnn_offline mode,you should specify the rcnn_training_feature_dir and rcnn_training_roi_dir.

Laihu08 commented 4 years ago

Assuming you're using the pre-trained model, the results of cuboids with classes in KITTI format are saved in output/rcnn/default/eval/epoch_no_number/val/final_result/data in txt format. You'll have the image boxes and 3d boxes provided there, you can visualize with the tool you like.

how to visualize with the .txt format in Mayavi ?