优化测试功能

This commit is contained in:
2024-07-30 10:54:40 +08:00
parent 9e0e3d0e7d
commit ecf26c1bf6
3 changed files with 7 additions and 2 deletions

View File

@@ -64,7 +64,8 @@ def visual_model_test(model_type, test_img, task_path, schema):
temp_files_paths.append(temp_file.name)
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),
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)
# parsed_doc = doc_parser.parse({"doc": temp_file.name})["layout"]
if img["x_offset"] or img["y_offset"]:
@@ -150,7 +151,7 @@ def main(model_type, pic_name=None):
if __name__ == '__main__':
main("ocr", "PH20240727000461_1_085531_1.PNG.jpg")
main("ocr")
# main("settlement")
# main("discharge")
# main("cost")