From ce0e0f3bbd05fa78b8c2b266e509bb1363b3e11b Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Wed, 10 Jul 2024 09:22:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E4=B8=80=E4=BB=BD=E6=B6=82?= =?UTF-8?q?=E6=8A=B9=E7=BB=93=E6=9E=9C=E5=9C=A8=E6=9C=AC=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_mask.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/photo_mask.py b/photo_mask.py index c1a0664..a66e8b9 100644 --- a/photo_mask.py +++ b/photo_mask.py @@ -19,7 +19,7 @@ from config.ucloud import BUCKET from models import ZxPhrec, ZxPhhd from ucloud import ucloud -OCR = PaddleOCR(use_angle_cls=False, lang="ch", show_log=False, gpu_id=1) +OCR = PaddleOCR(use_angle_cls=False, lang="ch", show_log=False) def open_image(img_path): @@ -253,6 +253,7 @@ def photo_mask(pk_phhd, content): (255, 255, 255), -1, 0) with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as temp_file: cv2.imwrite(temp_file.name, image) + cv2.imwrite(f"./mask_test2/{phrec.cfjaddress}.jpg", image) for i in range(3): is_upload_success = ucloud.upload_file(phrec.cfjaddress, temp_file.name) if is_upload_success: