打印gt_annos
和dt_annos
代码
# pcdet/datasets/kitti/kitti_object_eval_python/eval.py
print('============================ details of evaluation of image6 start====================')
print('gt_annos:',gt_annos)
print('dt_annos:',dt_annos)
print('overlaps:',overlaps)
print('============================ details of evaluation of image6 end====================')
采用的测试集
# data/kitti/ImageSets/val.txt
000006
开始测试
python test.py --cfg_file cfgs/kitti_models/pv_rcnn.yaml --batch_size 1 --ckpt ../output/kitti_models/pv_rcnn/mydata_1/ckpt/checkpoint_epoch_10.pth --extra_tag 'mydata_2'
输出结果
============================ details of evaluation of image6 start====================
gt_annos:
[{
'name': array(['Car', 'Car', 'Car', 'Car', 'DontCare', 'DontCare'], dtype='<U8'),
'truncated': array([ 0., 0., 0., 0., -1., -1.]),
'occluded': array([ 2., 0., 0., 1., -1., -1.]),
'alpha': array([ -1.55, -1.21, 0.15, 2.05, -10. , -10. ]),
'bbox':
array([[548. , 171.33, 572.4 , 194.42],
[505.25, 168.37, 575.44, 209.18],
[ 49.7 , 185.65, 227.42, 246.96],
[328.67, 170.65, 397.24, 204.16],
[603.36, 169.62, 631.06, 186.56],
[578.97, 168.88, 603.78, 187.56]], dtype=float32),
'dimensions':
array([[ 3.62, 1.48, 1.56],
[ 4.32, 1.67, 1.64],
[ 3.88, 1.5 , 1.62],
[ 4.29, 1.68, 1.67],
[-1. , -1. , -1. ],
[-1. , -1. , -1. ]]),
'location':
array([[-2.720e+00, 8.200e-01, 4.822e+01],
[-2.610e+00, 1.130e+00, 3.173e+01],
[-1.254e+01, 1.640e+00, 1.972e+01],
[-1.266e+01, 1.130e+00, 3.844e+01],
[-1.000e+03, -1.000e+03, -1.000e+03],
[-1.000e+03, -1.000e+03, -1.000e+03]], dtype=float32),
'rotation_y': array([ -1.62, -1.3 , -0.42, 1.73, -10. , -10. ]),
'score': array([-1., -1., -1., -1., -1., -1.]),
'difficulty': array([-1, 0, 0, 1, -1, -1], dtype=int32),
'index': array([ 0, 1, 2, 3, -1, -1], dtype=int32),
'gt_boxes_lidar':
array([[48.47077179, 2.95906162, -0.25629205, 3.62 , 1.56 , 1.48 , 0.04920367],
[31.9806385 , 2.77186871, -0.42351833, 4.32 , 1.64 , 1.67 , -0.27079633],
[19.92111015, 12.64801311, -0.87546992, 3.88 , 1.62 , 1.5 , -1.15079633],
[38.64176178, 12.85393906, -0.3297669 , 4.29 , 1.67 , 1.68 , -3.30079633]]),
'num_points_in_gt': array([ 9, 64, 321, 26, -1, -1], dtype=int32)
}]
dt_annos:
[{
'name': array(['Car', 'Car', 'Car', 'Car', 'Car', 'Car', 'Car', 'Pedestrian', 'Car', 'Cyclist', 'Car'], dtype='<U10'),
'truncated': array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]),
'occluded': array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]),
'alpha':
array([-6.103507 , -7.479403 , -7.229924 , -7.605979 , -7.675108 ,
-7.8643575, -6.357685 , -3.6272836, -7.6954 , -7.394093 ,
-7.70753 ], dtype=float32),
'bbox':
array([[ 35.64774 , 183.85912 , 223.3187 , 243.51346 ],
[507.01978 , 169.10129 , 575.2891 , 208.25652 ],
[327.06696 , 179.01222 , 396.99054 , 207.22461 ],
[579.0248 , 168.23694 , 606.95654 , 186.32397 ],
[604.25714 , 168.71461 , 630.9089 , 188.09676 ],
[554.41064 , 170.54095 , 578.0972 , 192.97998 ],
[ 0. , 169.64636 , 133.15398 , 211.0606 ],
[767.56995 , 167.53271 , 775.1517 , 193.86832 ],
[621.69293 , 162.00407 , 646.0002 , 181.39088 ],
[ 0. , 173.6811 , 26.973091, 215.62674 ],
[ 0. , 177.35478 , 40.594414, 208.54866 ]], dtype=float32),
'dimensions':
array([[4.051301 , 1.4906676 , 1.6367772 ],
[4.1166224 , 1.6087878 , 1.6226968 ],
[3.876073 , 1.4151212 , 1.5551785 ],
[3.9821217 , 1.5950358 , 1.6364912 ],
[3.8610003 , 1.5991639 , 1.632775 ],
[3.5636995 , 1.4554182 , 1.5348462 ],
[4.695579 , 1.728069 , 1.7498904 ],
[0.35432252, 1.9271181 , 0.4870359 ],
[4.127525 , 1.8036367 , 1.724487 ],
[1.8084677 , 1.7363664 , 0.4653614 ],
[3.7997792 , 1.626316 , 1.6570537 ]], dtype=float32),
'location':
array([[-1.2713813e+01, 1.5605631e+00, 1.9605337e+01],
[-2.5947142e+00, 1.0996835e+00, 3.1718645e+01],
[-1.2629819e+01, 1.2905513e+00, 3.8112820e+01],
[-7.0229030e-01, 4.2516139e-01, 6.5473595e+01],
[ 1.4379555e+00, 5.4409987e-01, 6.1320782e+01],
[-2.3913438e+00, 7.4463969e-01, 4.8419548e+01],
[-2.3906298e+01, 1.2337779e+00, 3.2173038e+01],
[ 1.2514790e+01, 9.0499169e-01, 5.2845219e+01],
[ 3.1855197e+00, -1.1204358e-02, 6.9050949e+01],
[-2.5308802e+01, 1.4130213e+00, 3.0669430e+01],
[-3.2187435e+01, 1.4103941e+00, 3.9506737e+01]], dtype=float32),
'rotation_y':
array([-6.677984 , -7.565404 , -7.552907 , -7.6215177, -7.6566405,
-7.918352 , -6.9978104, -3.4008198, -7.65427 , -8.084847 ,
-8.392922 ], dtype=float32),
'score':
array([0.9947767 , 0.9884449 , 0.87549245, 0.7574657 , 0.7471658 ,
0.6317981 , 0.5018368 , 0.33131832, 0.170293 , 0.12664953,
0.11167401], dtype=float32),
'boxes_lidar':
array([[ 19.805847 , 12.820396 , -1.5438182 , 4.051301 , 1.6367772 , 1.4906676 , 5.1071877 ],
[ 31.96945 , 2.7562013 , -1.2283354 , 4.1166224 , 1.6226968 , 1.6087878 , 5.9946074 ],
[ 38.314247 , 12.823895 , -1.3296634 , 3.876073 , 1.5551785 , 1.4151212 , 5.9821105 ],
[ 65.73507 , 1.0215081 , -0.6745052 , 3.9821217 , 1.6364912 , 1.5950358 , 6.050721 ],
[ 61.59235 , -1.1375881 , -0.8042521 , 3.8610003 , 1.632775 , 1.5991639 , 6.085844 ],
[ 48.67214 , 2.6305897 , -0.92508245, 3.5636995 , 1.5348462 , 1.4554182 , 6.3475556 ],
[ 32.32002 , 24.069956 , -1.133335 , 4.695579 , 1.7498904 , 1.728069 , 5.427014 ],
[ 53.169582 , -12.251147 , -1.2597351 , 0.35432252, 0.4870359 , 1.9271181 , 1.8300234 ],
[ 69.33254 , -2.8532667 , -0.29082227, 4.127525 , 1.724487 , 1.8036367 , 6.0834737 ],
[ 30.80909 , 25.466953 , -1.2929395 , 1.8084677 , 0.4653614 , 1.7363664 , 6.514051 ],
[ 39.612885 , 32.38824 , -1.242166 , 3.7997792 , 1.6570537 , 1.626316 , 6.8221264 ]], dtype=float32),
'frame_id': '000006'
}]
overlaps:
[
array([[0. , 0. , 0.78456026, 0. , 0. , 0. ],
[0. , 0.89253873, 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0.50814879, 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. ],
[0.54982352, 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. ]])
]
============================ details of evaluation of image6 end====================
从overlaps
中可以看出gt
和dt
的对应关系为
pic: 6 , total_dt_num: 11 , total_gt_num: 6
dt idx: 0 , gt idx: 2 , iou: 0.7845602631568909
dt idx: 1 , gt idx: 1 , iou: 0.8925387263298035
dt idx: 2 , gt idx: 3 , iou: 0.5081487894058228
dt idx: 5 , gt idx: 0 , iou: 0.549823522567749
以0
号dt
和2
号gt
为例,具体数据为
dt_annos:
[{
'name': 'Car',
'truncated':0.,
'occluded': 0.,
'bbox': [ 35.64774 , 183.85912 , 223.3187 , 243.51346 ],
'dimensions': [4.051301 , 1.4906676 , 1.6367772 ],
'location': [-1.2713813e+01, 1.5605631e+00, 1.9605337e+01],
'score':0.9947767 ,
}]
gt_annos:
[{
'name': 'Car',
'truncated': 0.,
'occluded': 0.,
'bbox':[ 49.7 , 185.65, 227.42, 246.96],
'dimensions': [ 3.88, 1.5 , 1.62],
'location': [-1.254e+01, 1.640e+00, 1.972e+01],
'score': -1.,
'difficulty': 0,
'index': 2,
}]
我的其他PV-RCNN代码测试系列文章,如果对你有帮助的话,请给我点赞哦~
PV-RCNN代码测试——TP,FP,TN,FN的计算(一)
PV-RCNN代码测试——TP,FP,TN,FN的计算(二)
PV-RCNN代码测试——gt_annos & dt_annos
PV-RCNN代码测试——计算iou