From fc73576b34bd2b9002aeb459177b53b3ccde8e05 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Fri, 21 Jun 2024 15:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=B2=E7=AA=81=E6=8E=92=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 9 +++++++-- photo_review/photo_review.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 15ffc4e..28a5685 100644 --- a/main.py +++ b/main.py @@ -27,7 +27,12 @@ # send_an_error_email(program_name='照片审核关键信息抽取脚本', error_name=repr(e), error_detail=traceback.format_exc()) # # 释放显存 # paddle.device.cuda.empty_cache() -from photo_review.photo_review import main +import logging.config + +from config.log import LOGGING_CONFIG +from photo_review import photo_review if __name__ == '__main__': - main() + logging.config.dictConfig(LOGGING_CONFIG) + log = logging.getLogger() + photo_review.main() diff --git a/photo_review/photo_review.py b/photo_review/photo_review.py index 3bdce29..b709e79 100644 --- a/photo_review/photo_review.py +++ b/photo_review/photo_review.py @@ -53,9 +53,9 @@ def open_image(img_path): # 分割大图片 def split_image(img_path, max_ratio=2.82, best_ration=1.41, overlap=0.05): split_result = [] - pdb.set_trace() # 打开图片 img = open_image(img_path) + pdb.set_trace() # 获取图片的宽度和高度 height, width = img.shape[:2] # 计算宽高比