更新OCR版本,Bata版,还不能上线
This commit is contained in:
@@ -24,7 +24,7 @@ def write_visual_result(image, angle=0, layout=None, result=None):
|
||||
img_name = img[:last_dot_index]
|
||||
img_type = img[last_dot_index + 1:]
|
||||
|
||||
img_array = image_util.read(image)
|
||||
img_array, _ = image_util.read(image)
|
||||
if angle != 0:
|
||||
img_array = image_util.rotate(img_array, angle)
|
||||
with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as temp_file:
|
||||
@@ -63,7 +63,7 @@ def visual_model_test(model_type, test_img, task_path, schema):
|
||||
img["y_offset"] -= offset_y
|
||||
|
||||
temp_files_paths.append(temp_file.name)
|
||||
parsed_doc = util.get_ocr_layout(
|
||||
parsed_doc, _ = util.get_ocr_layout(
|
||||
PaddleOCR(det_db_box_thresh=0.3, det_db_thresh=0.1, det_limit_side_len=1248, drop_score=0.3,
|
||||
save_crop_res=False),
|
||||
temp_file.name)
|
||||
|
||||
Reference in New Issue
Block a user