Browse Source

修改位置信息字段

lang 3 years ago
parent
commit
53e5090139
1 changed files with 5 additions and 5 deletions
  1. 5 5
      Controller/AiController.py

+ 5 - 5
Controller/AiController.py

@@ -351,10 +351,10 @@ class AiView(View):
         # merge_image_width = image_size['width']
         single_height = merge_image_height//image_size['num']
         new_bounding_box_dict = {}
-        new_bounding_box_dict[n_time+'_0'] = []
-        new_bounding_box_dict[n_time+'_1'] = []
-        new_bounding_box_dict[n_time+'_2'] = []
-        new_bounding_box_dict[n_time+'_3'] = []
+        new_bounding_box_dict['file_0'] = []
+        new_bounding_box_dict['file_1'] = []
+        new_bounding_box_dict['file_2'] = []
+        new_bounding_box_dict['file_3'] = []
         for k, val in enumerate(boundingBoxList):
             boundingBoxTop = merge_image_height * val['Top']
             #找出当前边框属于哪张图片范围
@@ -368,7 +368,7 @@ class AiView(View):
                     boxDict['Height'] = merge_image_height*val['Height']/single_height
                     boxDict['Top'] = ((merge_image_height*val['Top'])-(i*single_height))/single_height #减去前i张图片的高度
                     boxDict['Left'] = val['Left']
-                    new_bounding_box_dict["{n_time}_{i}".format(n_time=n_time,i=i)].append(boxDict)
+                    new_bounding_box_dict["file_{i}".format(i=i)].append(boxDict)
         # exit(new_bounding_box_list)
         conform_user_d_group = list(conform_user_d_group)
         conform_user_d_group.sort()