From 149782af98144a8243b43cc16af64b96e514e544 Mon Sep 17 00:00:00 2001 From: wangjingyeye <1025993141@qq.com> Date: Thu, 14 Jul 2022 05:03:43 +0000 Subject: [PATCH 1/6] debug --- .../configs/det_r50_db_plusplus/train_infer_python.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_tipc/configs/det_r50_db_plusplus/train_infer_python.txt b/test_tipc/configs/det_r50_db_plusplus/train_infer_python.txt index 04a3e84585..bcfdef6394 100644 --- a/test_tipc/configs/det_r50_db_plusplus/train_infer_python.txt +++ b/test_tipc/configs/det_r50_db_plusplus/train_infer_python.txt @@ -13,7 +13,7 @@ train_infer_img_dir:./train_data/icdar2015/text_localization/ch4_test_images/ null:null ## trainer:norm_train -norm_train:tools/train.py -c configs/det/det_r50_db++_ic15.yml -o Global.pretrained_model=./pretrain_models/ResNet50_dcn_asf_synthtext_pretrained +norm_train:tools/train.py -c configs/det/det_r50_db++_icdar15.yml -o Global.pretrained_model=./pretrain_models/ResNet50_dcn_asf_synthtext_pretrained pact_train:null fpgm_train:null distill_train:null @@ -27,7 +27,7 @@ null:null ===========================infer_params=========================== Global.save_inference_dir:./output/ Global.checkpoints: -norm_export:tools/export_model.py -c configs/det/det_r50_db++_ic15.yml -o +norm_export:tools/export_model.py -c configs/det/det_r50_db++_icdar15.yml -o quant_export:null fpgm_export:null distill_export:null @@ -35,7 +35,7 @@ export1:null export2:null inference_dir:null train_model:./inference/det_r50_db++_train/best_accuracy -infer_export:tools/export_model.py -c configs/det/det_r50_db++_ic15.yml -o +infer_export:tools/export_model.py -c configs/det/det_r50_db++_icdar15.yml -o infer_quant:False inference:tools/infer/predict_det.py --det_algorithm="DB++" --use_gpu:True|False From 74b249096bfdf9e0df00f73658f4d584c69885fe Mon Sep 17 00:00:00 2001 From: Evezerest <50011306+Evezerest@users.noreply.github.com> Date: Thu, 14 Jul 2022 16:28:14 +0800 Subject: [PATCH 2/6] Update PPOCRLabel.py --- PPOCRLabel/PPOCRLabel.py | 1 - 1 file changed, 1 deletion(-) diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index 8538e8ed3f..440c2d8c3e 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -21,7 +21,6 @@ import os.path import platform import subprocess import sys -from tkinter.tix import Tree import xlrd from functools import partial From 02814f0d4648a23e89d134beb24870fa10151193 Mon Sep 17 00:00:00 2001 From: Evezerest <50011306+Evezerest@users.noreply.github.com> Date: Thu, 14 Jul 2022 16:29:23 +0800 Subject: [PATCH 3/6] Update shape.py --- PPOCRLabel/libs/shape.py | 1 - 1 file changed, 1 deletion(-) diff --git a/PPOCRLabel/libs/shape.py b/PPOCRLabel/libs/shape.py index af12a5eb53..180456a10c 100644 --- a/PPOCRLabel/libs/shape.py +++ b/PPOCRLabel/libs/shape.py @@ -12,7 +12,6 @@ # THE SOFTWARE. # !/usr/bin/python # -*- coding: utf-8 -*- -from email.policy import default import math import sys From 2a9f27887c8959f365424a3d95b846b8e5985df5 Mon Sep 17 00:00:00 2001 From: an1018 <614803115@qq.com> Date: Thu, 14 Jul 2022 18:09:43 +0800 Subject: [PATCH 4/6] update --- ppstructure/predict_system.py | 2 +- ppstructure/recovery/README_ch.md | 6 ++++++ ppstructure/recovery/{docx.py => recovery_to_doc.py} | 0 3 files changed, 7 insertions(+), 1 deletion(-) rename ppstructure/recovery/{docx.py => recovery_to_doc.py} (100%) diff --git a/ppstructure/predict_system.py b/ppstructure/predict_system.py index b0ede5f3a1..d6f2e24240 100644 --- a/ppstructure/predict_system.py +++ b/ppstructure/predict_system.py @@ -34,7 +34,7 @@ from ppocr.utils.logging import get_logger from tools.infer.predict_system import TextSystem from ppstructure.table.predict_table import TableSystem, to_excel from ppstructure.utility import parse_args, draw_structure_result -from ppstructure.recovery.docx import convert_info_docx +from ppstructure.recovery.recovery_to_doc import convert_info_docx logger = get_logger() diff --git a/ppstructure/recovery/README_ch.md b/ppstructure/recovery/README_ch.md index 1f72f8de8a..5a05abffd0 100644 --- a/ppstructure/recovery/README_ch.md +++ b/ppstructure/recovery/README_ch.md @@ -44,6 +44,12 @@ python3 -m pip install "paddlepaddle>=2.2" -i https://mirror.baidu.com/pypi/simp 更多需求,请参照[安装文档](https://www.paddlepaddle.org.cn/install/quick)中的说明进行操作。 +* **(2)安装依赖** + +```bash +python3 -m pip install -r ppstructure/recovery/requirements.txt +``` + ### 2.2 安装PaddleOCR diff --git a/ppstructure/recovery/docx.py b/ppstructure/recovery/recovery_to_doc.py similarity index 100% rename from ppstructure/recovery/docx.py rename to ppstructure/recovery/recovery_to_doc.py From e8e8a8eaeb6593001dbc731ea34fbc58ad3b0013 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Thu, 14 Jul 2022 19:58:24 +0800 Subject: [PATCH 5/6] delete benchmark params of db++ --- .../configs/det_r50_db_plusplus/train_infer_python.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test_tipc/configs/det_r50_db_plusplus/train_infer_python.txt b/test_tipc/configs/det_r50_db_plusplus/train_infer_python.txt index 04a3e84585..4987754269 100644 --- a/test_tipc/configs/det_r50_db_plusplus/train_infer_python.txt +++ b/test_tipc/configs/det_r50_db_plusplus/train_infer_python.txt @@ -51,9 +51,3 @@ null:null null:null ===========================infer_benchmark_params========================== random_infer_input:[{float32,[3,640,640]}];[{float32,[3,960,960]}] -===========================train_benchmark_params========================== -batch_size:8|16 -fp_items:fp32|fp16 -epoch:2 ---profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile -flags:FLAGS_eager_delete_tensor_gb=0.0;FLAGS_fraction_of_gpu_memory_to_use=0.98;FLAGS_conv_workspace_size_limit=4096 From 2c064e97bae049b77f341bfdd0587b3ea03dcf5b Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Mon, 18 Jul 2022 20:55:22 +0800 Subject: [PATCH 6/6] fix --- test_tipc/docs/benchmark_train.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_tipc/docs/benchmark_train.md b/test_tipc/docs/benchmark_train.md index 3f846574ff..ad2524c165 100644 --- a/test_tipc/docs/benchmark_train.md +++ b/test_tipc/docs/benchmark_train.md @@ -9,7 +9,7 @@ ```shell # 运行格式:bash test_tipc/prepare.sh train_benchmark.txt mode -bash test_tipc/prepare.sh test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt benchmark_train +bash test_tipc/prepare.sh test_tipc/configs/det_mv3_db_v2_0/train_infer_python.txt benchmark_train ``` ## 1.2 功能测试 @@ -33,7 +33,7 @@ dynamic_bs8_fp32_DP_N1C1为test_tipc/benchmark_train.sh传入的参数,格式 ## 2. 日志输出 -运行后将保存模型的训练日志和解析日志,使用 `test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt` 参数文件的训练日志解析结果是: +运行后将保存模型的训练日志和解析日志,使用 `test_tipc/configs/det_mv3_db_v2_0/train_infer_python.txt` 参数文件的训练日志解析结果是: ``` {"model_branch": "dygaph", "model_commit": "7c39a1996b19087737c05d883fd346d2f39dbcc0", "model_name": "det_mv3_db_v2_0_bs8_fp32_SingleP_DP", "batch_size": 8, "fp_item": "fp32", "run_process_type": "SingleP", "run_mode": "DP", "convergence_value": "5.413110", "convergence_key": "loss:", "ips": 19.333, "speed_unit": "samples/s", "device_num": "N1C1", "model_run_time": "0", "frame_commit": "8cc09552473b842c651ead3b9848d41827a3dbab", "frame_version": "0.0.0"}