예제 #1
0
 def func_co(x):
     x.sort()
     Eval = NuScenesEval('', '', args.format)
     fused_data = cu.matching_and_fusion(cam_test_list[x[0]],cam_test_list[x[1]])
     fused_gt = cu.filt_gt_labels_tuple(cam_gt_list[x[0]],cam_gt_list[x[1]])
     mAP_temp = Eval.my_evaluate(fused_data,fused_gt)
     return 1- mAP_temp
예제 #2
0
 def fuse_constellation(x):
     #根据x的维度进行融合
     x.sort()
     size_n = x.shape[0]
     main_cam = x[0]
     gt_list = []
     gt_list.append(cam_gt_list[main_cam])
     for i in x[1:]:
         fused_data = cu.matching_and_fusion(cam_test_list[main_cam],cam_test_list[i]) #融合
         gt_list.append(cam_gt_list[i])
     fused_gt = cu.filt_gt_labels_tuple(*gt_list)
     Eval = NuScenesEval('', '', args.format)
     mAP_temp = Eval.my_evaluate(fused_data,fused_gt)
     return 1- mAP_temp
예제 #3
0
파일: test.py 프로젝트: goodxue/CenterNet
 #         for k in range(j+1,34):
 #             fused_data = cu.matching_and_fusion(fused_data,cam_test_list[k]) #融合
 #             for z in range(k+1,34):
 #                 Eval = NuScenesEval('', '', args.format)
 #                 fused_data = cu.matching_and_fusion(fused_data,cam_test_list[z]) #融合
 #                 fused_gt = cu.filt_gt_labels_tuple(cam_gt_list[i],cam_gt_list[j],cam_gt_list[k],cam_gt_list[z])
 #                 #评估
 #                 mAP_temp = Eval.my_evaluate(fused_data,fused_gt)
 #                 if mAP_temp > max_map:
 #                     max_map = mAP_temp
 #                     max_i,max_j = i,j
 #                     print('temp max mAP: {}..........   time: ##   i: {}   j: {}  k:{}  z:{}'.format(max_map,i,j,k,z))
 #print(mAP_temp)
 max_map = 0
 max_i, max_j = 0, 0
 fused_gt = cu.filt_gt_labels_tuple(*cam_gt_list)
 for i in range(34):
     for j in range(i + 1, 34):
         fused_data = cu.matching_and_fusion(cam_test_list[i],
                                             cam_test_list[j])  #融合
         Eval = NuScenesEval('', '', args.format)
         #fused_gt = cu.filt_gt_labels_tuple(cam_gt_list[i],cam_gt_list[j],cam_gt_list[k])
         #评估
         mAP_temp = Eval.my_evaluate(fused_data, fused_gt)
         if mAP_temp > max_map:
             max_map = mAP_temp
             max_i, max_j = i, j
             print(
                 'temp max mAP: {}..........   time: ##   i: {}   j: {}  '.
                 format(max_map, i, j))
             #print(mAP_temp)