Point-to-Box Network for 3D Object Tracking in Point Clouds踩坑。
实验室的网配个conda虚拟环境配了一年,conda创建虚拟环境,按github仓库指令安装依赖包
pip install -r requirements.txt
后因为速度慢,搜了一下有解决方案,利用镜像安装。见加速
这个配置文件有bug,第一行改为
git+https://github.com/v-wewei/etw_pytorch_utils.git@v1.1.1#egg=etw_pytorch_utils
编译pomegranate这个包还需要安装Cython。干脆传个完整的requirements.txt。
git+https://github.com/v-wewei/etw_pytorch_utils.git@v1.1.1#egg=etw_pytorch_utils
h5py
numpy
torch
torchvision
pprint
enum34
future
pandas
shapely
matplotlib
ipykernel
jupyter
imageio
pyquaternion
Cython
pomegranate
继续编译pointnet2的fps库,正常情况没有bug,我这报了个cuda驱动程序版本太低的错,根据驱动安装更新到我这个卡的最新驱动430,编译成功。注意更新驱动后要重启。
在pycharm里调试test_tracking.py时,报错。
ImportError: libcudart.so.10.0: cannot open shared object file: No such file or directory
根据经验判断是这个库没找到,但是cuda路径已经添加到环境变量里,所以有可能是路径冲突。因为我cuda实际安装路径是/usr/local/cuda-10.0,然后创了个软连接到/usr/local/cuda。google了一堆答案不靠谱,靠谱的是这个here,在pycharm里添加两个环境变量,import成功,但是又报错…
RuntimeError: Error(s) in loading state_dict for Pointnet_Tracking:
Missing key(s) in state_dict: "backbone_net.SA_modules.0.mlps.0.layer0.conv.weight", "backbone_net.SA_modules.0.mlps.0.layer0.normlayer.bn.weight", "backbone_net.SA_modules.0.mlps.0.layer0.normlayer.bn.bias", "backbone_net.SA_modules.0.mlps.0.layer0.normlayer.bn.running_mean", "backbone_net.SA_modules.0.mlps.0.layer0.normlayer.bn.running_var", "backbone_net.SA_modules.0.mlps.0.layer1.conv.weight", "backbone_net.SA_modules.0.mlps.0.layer1.normlayer.bn.weight", "backbone_net.SA_modules.0.mlps.0.layer1.normlayer.bn.bias", "backbone_net.SA_modules.0.mlps.0.layer1.normlayer.bn.running_mean", "backbone_net.SA_modules.0.mlps.0.layer1.normlayer.bn.running_var", "backbone_net.SA_modules.0.mlps.0.layer2.conv.weight", "backbone_net.SA_modules.0.mlps.0.layer2.normlayer.bn.weight", "backbone_net.SA_modules.0.mlps.0.layer2.normlayer.bn.bias", "backbone_net.SA_modules.0.mlps.0.layer2.normlayer.bn.running_mean", "backbone_net.SA_modules.0.mlps.0.layer2.normlayer.bn.running_var", "backbone_net.SA_modules.1.mlps.0.layer0.conv.weight", "backbone_net.SA_modules.1.mlps.0.layer0.normlayer.bn.weight", "backbone_net.SA_modules.1.mlps.0.layer0.normlayer.bn.bias", "backbone_net.SA_modules.1.mlps.0.layer0.normlayer.bn.running_mean", "backbone_net.SA_modules.1.mlps.0.layer0.normlayer.bn.running_var", "backbone_net.SA_modules.1.mlps.0.layer1.conv.weight", "backbone_net.SA_modules.1.mlps.0.layer1.normlayer.bn.weight", "backbone_net.SA_modules.1.mlps.0.layer1.normlayer.bn.bias", "backbone_net.SA_modules.1.mlps.0.layer1.normlayer.bn.running_mean", "backbone_net.SA_modules.1.mlps.0.layer1.normlayer.bn.running_var", "backbone_net.SA_modules.1.mlps.0.layer2.conv.weight", "backbone_net.SA_modules.1.mlps.0.layer2.normlayer.bn.weight", "backbone_net.SA_modules.1.mlps.0.layer2.normlayer.bn.bias", "backbone_net.SA_modules.1.mlps.0.layer2.normlayer.bn.running_mean", "backbone_net.SA_modules.1.mlps.0.layer2.normlayer.bn.running_var", "backbone_net.SA_modules.2.mlps.0.layer0.conv.weight", "backbone_net.SA_modules.2.mlps.0.layer0.normlayer.bn.weight", "backbone_net.SA_modules.2.mlps.0.layer0.normlayer.bn.bias", "backbone_net.SA_modules.2.mlps.0.layer0.normlayer.bn.running_mean", "backbone_net.SA_modules.2.mlps.0.layer0.normlayer.bn.running_var", "backbone_net.SA_modules.2.mlps.0.layer1.conv.weight", "backbone_net.SA_modules.2.mlps.0.layer1.normlayer.bn.weight", "backbone_net.SA_modules.2.mlps.0.layer1.normlayer.bn.bias", "backbone_net.SA_modules.2.mlps.0.layer1.normlayer.bn.running_mean", "backbone_net.SA_modules.2.mlps.0.layer1.normlayer.bn.running_var", "backbone_net.SA_modules.2.mlps.0.layer2.conv.weight", "backbone_net.SA_modules.2.mlps.0.layer2.normlayer.bn.weight", "backbone_net.SA_modules.2.mlps.0.layer2.normlayer.bn.bias", "backbone_net.SA_modules.2.mlps.0.layer2.normlayer.bn.running_mean", "backbone_net.SA_modules.2.mlps.0.layer2.normlayer.bn.running_var", "backbone_net.cov_final.weight", "backbone_net.cov_final.bias", "mlp.layer0.conv.weight", "mlp.layer0.normlayer.bn.weight", "mlp.layer0.normlayer.bn.bias", "mlp.layer0.normlayer.bn.running_mean", "mlp.layer0.normlayer.bn.running_var", "mlp.layer1.conv.weight", "mlp.layer1.normlayer.bn.weight", "mlp.layer1.normlayer.bn.bias", "mlp.layer1.normlayer.bn.running_mean", "mlp.layer1.normlayer.bn.running_var", "mlp.layer2.conv.weight", "mlp.layer2.normlayer.bn.weight", "mlp.layer2.normlayer.bn.bias", "mlp.layer2.normlayer.bn.running_mean", "mlp.layer2.normlayer.bn.running_var", "FC_layer_cla.0.conv.weight", "FC_layer_cla.0.normlayer.bn.weight", "FC_layer_cla.0.normlayer.bn.bias", "FC_layer_cla.0.normlayer.bn.running_mean", "FC_layer_cla.0.normlayer.bn.running_var", "FC_layer_cla.1.conv.weight", "FC_layer_cla.1.normlayer.bn.weight", "FC_layer_cla.1.normlayer.bn.bias", "FC_layer_cla.1.normlayer.bn.running_mean", "FC_layer_cla.1.normlayer.bn.running_var", "FC_layer_cla.2.conv.weight", "FC_layer_cla.2.conv.bias", "fea_layer.0.conv.weight", "fea_layer.0.normlayer.bn.weight", "fea_layer.0.normlayer.bn.bias", "fea_layer.0.normlayer.bn.running_mean", "fea_layer.0.normlayer.bn.running_var", "fea_layer.1.conv.weight", "fea_layer.1.conv.bias", "vote_layer.0.conv.weight", "vote_layer.0.normlayer.bn.weight", "vote_layer.0.normlayer.bn.bias", "vote_layer.0.normlayer.bn.running_mean", "vote_layer.0.normlayer.bn.running_var", "vote_layer.1.conv.weight", "vote_layer.1.normlayer.bn.weight", "vote_layer.1.normlayer.bn.bias", "vote_layer.1.normlayer.bn.running_mean", "vote_layer.1.normlayer.bn.running_var", "vote_layer.2.conv.weight", "vote_layer.2.conv.bias", "vote_aggregation.mlps.0.layer0.conv.weight", "vote_aggregation.mlps.0.layer0.normlayer.bn.weight", "vote_aggregation.mlps.0.layer0.normlayer.bn.bias", "vote_aggregation.mlps.0.layer0.normlayer.bn.running_mean", "vote_aggregation.mlps.0.layer0.normlayer.bn.running_var", "vote_aggregation.mlps.0.layer1.conv.weight", "vote_aggregation.mlps.0.layer1.normlayer.bn.weight", "vote_aggregation.mlps.0.layer1.normlayer.bn.bias", "vote_aggregation.mlps.0.layer1.normlayer.bn.running_mean", "vote_aggregation.mlps.0.layer1.normlayer.bn.running_var", "vote_aggregation.mlps.0.layer2.conv.weight", "vote_aggregation.mlps.0.layer2.normlayer.bn.weight", "vote_aggregation.mlps.0.layer2.normlayer.bn.bias", "vote_aggregation.mlps.0.layer2.normlayer.bn.running_mean", "vote_aggregation.mlps.0.layer2.normlayer.bn.running_var", "FC_proposal.0.conv.weight", "FC_proposal.0.normlayer.bn.weight", "FC_proposal.0.normlayer.bn.bias", "FC_proposal.0.normlayer.bn.running_mean", "FC_proposal.0.normlayer.bn.running_var", "FC_proposal.1.conv.weight", "FC_proposal.1.normlayer.bn.weight", "FC_proposal.1.normlayer.bn.bias", "FC_proposal.1.normlayer.bn.running_mean", "FC_proposal.1.normlayer.bn.running_var", "FC_proposal.2.conv.weight", "FC_proposal.2.conv.bias".
Unexpected key(s) in state_dict: "module.backbone_net.SA_modules.0.mlps.0.layer0.conv.weight", "module.backbone_net.SA_modules.0.mlps.0.layer0.normlayer.bn.weight", "module.backbone_net.SA_modules.0.mlps.0.layer0.normlayer.bn.bias", "module.backbone_net.SA_modules.0.mlps.0.layer0.normlayer.bn.running_mean", "module.backbone_net.SA_modules.0.mlps.0.layer0.normlayer.bn.running_var", "module.backbone_net.SA_modules.0.mlps.0.layer0.normlayer.bn.num_batches_tracked", "module.backbone_net.SA_modules.0.mlps.0.layer1.conv.weight", "module.backbone_net.SA_modules.0.mlps.0.layer1.normlayer.bn.weight", "module.backbone_net.SA_modules.0.mlps.0.layer1.normlayer.bn.bias", "module.backbone_net.SA_modules.0.mlps.0.layer1.normlayer.bn.running_mean", "module.backbone_net.SA_modules.0.mlps.0.layer1.normlayer.bn.running_var", "module.backbone_net.SA_modules.0.mlps.0.layer1.normlayer.bn.num_batches_tracked", "module.backbone_net.SA_modules.0.mlps.0.layer2.conv.weight", "module.backbone_net.SA_modules.0.mlps.0.layer2.normlayer.bn.weight", "module.backbone_net.SA_modules.0.mlps.0.layer2.normlayer.bn.bias", "module.backbone_net.SA_modules.0.mlps.0.layer2.normlayer.bn.running_mean", "module.backbone_net.SA_modules.0.mlps.0.layer2.normlayer.bn.running_var", "module.backbone_net.SA_modules.0.mlps.0.layer2.normlayer.bn.num_batches_tracked", "module.backbone_net.SA_modules.1.mlps.0.layer0.conv.weight", "module.backbone_net.SA_modules.1.mlps.0.layer0.normlayer.bn.weight", "module.backbone_net.SA_modules.1.mlps.0.layer0.normlayer.bn.bias", "module.backbone_net.SA_modules.1.mlps.0.layer0.normlayer.bn.running_mean", "module.backbone_net.SA_modules.1.mlps.0.layer0.normlayer.bn.running_var", "module.backbone_net.SA_modules.1.mlps.0.layer0.normlayer.bn.num_batches_tracked", "module.backbone_net.SA_modules.1.mlps.0.layer1.conv.weight", "module.backbone_net.SA_modules.1.mlps.0.layer1.normlayer.bn.weight", "module.backbone_net.SA_modules.1.mlps.0.layer1.normlayer.bn.bias", "module.backbone_net.SA_modules.1.mlps.0.layer1.normlayer.bn.running_mean", "module.backbone_net.SA_modules.1.mlps.0.layer1.normlayer.bn.running_var", "module.backbone_net.SA_modules.1.mlps.0.layer1.normlayer.bn.num_batches_tracked", "module.backbone_net.SA_modules.1.mlps.0.layer2.conv.weight", "module.backbone_net.SA_modules.1.mlps.0.layer2.normlayer.bn.weight", "module.backbone_net.SA_modules.1.mlps.0.layer2.normlayer.bn.bias", "module.backbone_net.SA_modules.1.mlps.0.layer2.normlayer.bn.running_mean", "module.backbone_net.SA_modules.1.mlps.0.layer2.normlayer.bn.running_var", "module.backbone_net.SA_modules.1.mlps.0.layer2.normlayer.bn.num_batches_tracked", "module.backbone_net.SA_modules.2.mlps.0.layer0.conv.weight", "module.backbone_net.SA_modules.2.mlps.0.layer0.normlayer.bn.weight", "module.backbone_net.SA_modules.2.mlps.0.layer0.normlayer.bn.bias", "module.backbone_net.SA_modules.2.mlps.0.layer0.normlayer.bn.running_mean", "module.backbone_net.SA_modules.2.mlps.0.layer0.normlayer.bn.running_var", "module.backbone_net.SA_modules.2.mlps.0.layer0.normlayer.bn.num_batches_tracked", "module.backbone_net.SA_modules.2.mlps.0.layer1.conv.weight", "module.backbone_net.SA_modules.2.mlps.0.layer1.normlayer.bn.weight", "module.backbone_net.SA_modules.2.mlps.0.layer1.normlayer.bn.bias", "module.backbone_net.SA_modules.2.mlps.0.layer1.normlayer.bn.running_mean", "module.backbone_net.SA_modules.2.mlps.0.layer1.normlayer.bn.running_var", "module.backbone_net.SA_modules.2.mlps.0.layer1.normlayer.bn.num_batches_tracked", "module.backbone_net.SA_modules.2.mlps.0.layer2.conv.weight", "module.backbone_net.SA_modules.2.mlps.0.layer2.normlayer.bn.weight", "module.backbone_net.SA_modules.2.mlps.0.layer2.normlayer.bn.bias", "module.backbone_net.SA_modules.2.mlps.0.layer2.normlayer.bn.running_mean", "module.backbone_net.SA_modules.2.mlps.0.layer2.normlayer.bn.running_var", "module.backbone_net.SA_modules.2.mlps.0.layer2.normlayer.bn.num_batches_tracked", "module.backbone_net.cov_final.weight", "module.backbone_net.cov_final.bias", "module.mlp.layer0.conv.weight", "module.mlp.layer0.normlayer.bn.weight", "module.mlp.layer0.normlayer.bn.bias", "module.mlp.layer0.normlayer.bn.running_mean", "module.mlp.layer0.normlayer.bn.running_var", "module.mlp.layer0.normlayer.bn.num_batches_tracked", "module.mlp.layer1.conv.weight", "module.mlp.layer1.normlayer.bn.weight", "module.mlp.layer1.normlayer.bn.bias", "module.mlp.layer1.normlayer.bn.running_mean", "module.mlp.layer1.normlayer.bn.running_var", "module.mlp.layer1.normlayer.bn.num_batches_tracked", "module.mlp.layer2.conv.weight", "module.mlp.layer2.normlayer.bn.weight", "module.mlp.layer2.normlayer.bn.bias", "module.mlp.layer2.normlayer.bn.running_mean", "module.mlp.layer2.normlayer.bn.running_var", "module.mlp.layer2.normlayer.bn.num_batches_tracked", "module.FC_layer_cla.0.conv.weight", "module.FC_layer_cla.0.normlayer.bn.weight", "module.FC_layer_cla.0.normlayer.bn.bias", "module.FC_layer_cla.0.normlayer.bn.running_mean", "module.FC_layer_cla.0.normlayer.bn.running_var", "module.FC_layer_cla.0.normlayer.bn.num_batches_tracked", "module.FC_layer_cla.1.conv.weight", "module.FC_layer_cla.1.normlayer.bn.weight", "module.FC_layer_cla.1.normlayer.bn.bias", "module.FC_layer_cla.1.normlayer.bn.running_mean", "module.FC_layer_cla.1.normlayer.bn.running_var", "module.FC_layer_cla.1.normlayer.bn.num_batches_tracked", "module.FC_layer_cla.2.conv.weight", "module.FC_layer_cla.2.conv.bias", "module.fea_layer.0.conv.weight", "module.fea_layer.0.normlayer.bn.weight", "module.fea_layer.0.normlayer.bn.bias", "module.fea_layer.0.normlayer.bn.running_mean", "module.fea_layer.0.normlayer.bn.running_var", "module.fea_layer.0.normlayer.bn.num_batches_tracked", "module.fea_layer.1.conv.weight", "module.fea_layer.1.conv.bias", "module.vote_layer.0.conv.weight", "module.vote_layer.0.normlayer.bn.weight", "module.vote_layer.0.normlayer.bn.bias", "module.vote_layer.0.normlayer.bn.running_mean", "module.vote_layer.0.normlayer.bn.running_var", "module.vote_layer.0.normlayer.bn.num_batches_tracked", "module.vote_layer.1.conv.weight", "module.vote_layer.1.normlayer.bn.weight", "module.vote_layer.1.normlayer.bn.bias", "module.vote_layer.1.normlayer.bn.running_mean", "module.vote_layer.1.normlayer.bn.running_var", "module.vote_layer.1.normlayer.bn.num_batches_tracked", "module.vote_layer.2.conv.weight", "module.vote_layer.2.conv.bias", "module.vote_aggregation.mlps.0.layer0.conv.weight", "module.vote_aggregation.mlps.0.layer0.normlayer.bn.weight", "module.vote_aggregation.mlps.0.layer0.normlayer.bn.bias", "module.vote_aggregation.mlps.0.layer0.normlayer.bn.running_mean", "module.vote_aggregation.mlps.0.layer0.normlayer.bn.running_var", "module.vote_aggregation.mlps.0.layer0.normlayer.bn.num_batches_tracked", "module.vote_aggregation.mlps.0.layer1.conv.weight", "module.vote_aggregation.mlps.0.layer1.normlayer.bn.weight", "module.vote_aggregation.mlps.0.layer1.normlayer.bn.bias", "module.vote_aggregation.mlps.0.layer1.normlayer.bn.running_mean", "module.vote_aggregation.mlps.0.layer1.normlayer.bn.running_var", "module.vote_aggregation.mlps.0.layer1.normlayer.bn.num_batches_tracked", "module.vote_aggregation.mlps.0.layer2.conv.weight", "module.vote_aggregation.mlps.0.layer2.normlayer.bn.weight", "module.vote_aggregation.mlps.0.layer2.normlayer.bn.bias", "module.vote_aggregation.mlps.0.layer2.normlayer.bn.running_mean", "module.vote_aggregation.mlps.0.layer2.normlayer.bn.running_var", "module.vote_aggregation.mlps.0.layer2.normlayer.bn.num_batches_tracked", "module.FC_proposal.0.conv.weight", "module.FC_proposal.0.normlayer.bn.weight", "module.FC_proposal.0.normlayer.bn.bias", "module.FC_proposal.0.normlayer.bn.running_mean", "module.FC_proposal.0.normlayer.bn.running_var", "module.FC_proposal.0.normlayer.bn.num_batches_tracked", "module.FC_proposal.1.conv.weight", "module.FC_proposal.1.normlayer.bn.weight", "module.FC_proposal.1.normlayer.bn.bias", "module.FC_proposal.1.normlayer.bn.running_mean", "module.FC_proposal.1.normlayer.bn.running_var", "module.FC_proposal.1.normlayer.bn.num_batches_tracked", "module.FC_proposal.2.conv.weight", "module.FC_proposal.2.conv.bias".
Debug一下发现是自己new出来的模型和导入模型的参数字典key不一致,预训练的模型导入不进来。给导入函数传个参数,解决。这里false表示两个字典的key值不需要严格一致。
netR.load_state_dict(torch.load(os.path.join(args.save_root_dir, args.model)), False)
至此,所有bug解决完毕,运行测试脚本,跑出来的结果却很令人失望…,精度并没有达到作者论文里给的数,github上有几个老哥跟我一样,测出来结果也很差。作者回复说是数据路径可能搞错了,但是我确认路径没错,无奈摊手。
Test 1: Time 0.037s (it:0.041s) Data:0.436s (it:0.493s), Succ/Prec:6.6/4.4: 100%|██████████| 6424/6424 [03:56<00:00, 27.15it/s]
接下来看issue有没有更新吧,没有的话暂时先不搞这个了。