Browse Source

iou判定修改,在infer的choice_m比原有的小情况下,不再补全
题号修改

lighttxu 4 years ago
parent
commit
9e72fc2a40

BIN
db.sqlite3


+ 2 - 1
segment/sheet_resolve/analysis/resolve.py

@@ -104,7 +104,8 @@ def sheet(series_number, image_path, image, conf_thresh, mns_thresh, subject, sh
                     for tf_box in choice_m_old_list:
                         tf_loc = tf_box['bounding_box']
                         iou = utils.cal_iou(infer_loc, tf_loc)
-                        if iou[0] > 0.70 or iou[1] > 0.70 or iou[2] > 0.70:
+                        # if iou[0] > 0.70 or iou[1] > 0.70 or iou[2] > 0.70:
+                        if iou[0] > 0.70 or iou[2] > 0.70:
                             # if infer_box not in remain_choice_m:
                             #     remain_choice_m.append(infer_box)
                             #     choice_m_list.remove(infer_box)

File diff suppressed because it is too large
+ 932 - 134
segment/sheet_resolve/analysis/sheet/ocr_key_words.py


+ 1 - 1
segment/sheet_resolve/analysis/sheet/sheet_points.py

@@ -172,7 +172,7 @@ def get_total_title_quantity_and_value(box_with_content):
                     if digital_value == None:
                         value = -1
                     else:
-                        value = digital_value[0]
+                        value = digital_value.group()
                     title_two_value.append(int(value))
                 else:
                     title_two_number0 = result2[0]

+ 3 - 2
segment/sheet_views.py

@@ -52,11 +52,11 @@ tf_sess_dict = {
     # 'math_zxhx': TfSess('math_zxhx'),
     # 'math_zxhx_detail': TfSess('math_zxhx_detail'),
 
-    # 'math': TfSess('math'),
+    'math': TfSess('math'),
     # 'english': TfSess('english'),
     # 'chinese': TfSess('chinese'),
     # 'physics': TfSess('physics'),
-    'chemistry': TfSess('chemistry'),
+    # 'chemistry': TfSess('chemistry'),
     # 'biology': TfSess('biology'),
     # 'politics': TfSess('politics'),
     # 'history': TfSess('history'),
@@ -464,6 +464,7 @@ def analysis_box_once_with_multiple_img(request):
                 error_info = error_info + 'number and points error;'
 
             try:
+                logger.info('before format: {}\n'.format(res_info_list))
                 init_number = 500
                 crt_numbers = []
                 for i, ele in enumerate(res_info_list):

Some files were not shown because too many files changed in this diff