同步ocr配置
This commit is contained in:
@@ -63,7 +63,8 @@ def visual_model_test(model_type, test_img, task_path, schema):
|
|||||||
img["y_offset"] -= offset_y
|
img["y_offset"] -= offset_y
|
||||||
|
|
||||||
temp_files_paths.append(temp_file.name)
|
temp_files_paths.append(temp_file.name)
|
||||||
parsed_doc = util.get_ocr_layout(PaddleOCR(det_db_box_thresh=0.3), temp_file.name)
|
parsed_doc = util.get_ocr_layout(PaddleOCR(det_db_box_thresh=0.3, det_limit_side_len=2048),
|
||||||
|
temp_file.name)
|
||||||
# parsed_doc = doc_parser.parse({"doc": temp_file.name})["layout"]
|
# parsed_doc = doc_parser.parse({"doc": temp_file.name})["layout"]
|
||||||
if img["x_offset"] or img["y_offset"]:
|
if img["x_offset"] or img["y_offset"]:
|
||||||
for p in parsed_doc:
|
for p in parsed_doc:
|
||||||
@@ -118,7 +119,7 @@ def main(model_type, pic_name=None):
|
|||||||
|
|
||||||
if model_type == "ocr":
|
if model_type == "ocr":
|
||||||
task_path = None
|
task_path = None
|
||||||
test_img_path = ufile.get_private_url(pic_name) if pic_name else "img/PH20240428000832_1_093844_2.jpg"
|
test_img_path = ufile.get_private_url(pic_name) if pic_name else "../test_img/IMG_20240723_131247.jpg"
|
||||||
schema = None
|
schema = None
|
||||||
elif model_type == "settlement":
|
elif model_type == "settlement":
|
||||||
task_path = "../model/settlement_list_model"
|
task_path = "../model/settlement_list_model"
|
||||||
@@ -148,8 +149,8 @@ def main(model_type, pic_name=None):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# main("ocr")
|
main("ocr")
|
||||||
main("settlement")
|
# main("settlement")
|
||||||
# main("discharge")
|
# main("discharge")
|
||||||
# main("cost")
|
# main("cost")
|
||||||
# main("cost_detail")
|
# main("cost_detail")
|
||||||
|
|||||||
Reference in New Issue
Block a user