From 978e0d998d1837cbcc1ea501a4ba57b978fff08e Mon Sep 17 00:00:00 2001 From: zhh Date: Thu, 18 Sep 2025 15:05:31 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=88=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=89:=20fix=EF=BC=88=E4=BF=AE=E5=A4=8Dbug=EF=BC=89:=20=20p?= =?UTF-8?q?attern=5Fimage=20(=E4=B8=8A=E8=89=B2=E6=97=A0=E5=8D=B0=E8=8A=B1?= =?UTF-8?q?sketch=E5=9B=BE)=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=BA=E4=B8=8D?= =?UTF-8?q?=E6=8B=89=E4=BC=B8=20docs=EF=BC=88=E6=96=87=E6=A1=A3=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=EF=BC=89:=20refactor=EF=BC=88=E9=87=8D=E6=9E=84?= =?UTF-8?q?=EF=BC=89:=20test(=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/design_fast/pipeline/color.py | 2 ++ app/service/design_fast/pipeline/split.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/service/design_fast/pipeline/color.py b/app/service/design_fast/pipeline/color.py index d6c84e4..792cec2 100644 --- a/app/service/design_fast/pipeline/color.py +++ b/app/service/design_fast/pipeline/color.py @@ -59,6 +59,8 @@ class Color: tmp2 = (result['final_image'] * (temp_fg / 255)).astype(np.uint8) result['single_image'] = cv2.add(tmp1, tmp2) result['alpha'] = 100 / 255.0 + + result['no_seg_sketch'] = result['final_image'].copy() return result def get_gradient(self, bucket_name, object_name): diff --git a/app/service/design_fast/pipeline/split.py b/app/service/design_fast/pipeline/split.py index ff73883..9b530fc 100644 --- a/app/service/design_fast/pipeline/split.py +++ b/app/service/design_fast/pipeline/split.py @@ -124,7 +124,7 @@ class Split(object): result['mask_url'] = req.bucket_name + "/" + req.object_name # 创建中间图层 - result_pattern_image_rgba = rgb_to_rgba(result['pattern_image'], result['mask']) + result_pattern_image_rgba = rgb_to_rgba(result['no_seg_sketch'], result['mask']) result_pattern_image_pil = Image.fromarray(cvtColor(result_pattern_image_rgba, COLOR_BGR2RGBA)) result['pattern_image'], result['pattern_image_url'], _ = upload_png_mask(self.minio_client, result_pattern_image_pil, f'{generate_uuid()}') return result