From 5a643af5a6b6966d721798a1b66f6496258ff262 Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Mon, 24 Mar 2025 15:24:15 +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:=20=20brand=20dna=20=E6=96=87=E4=BB=B6=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E4=BF=AE=E6=94=B9=20fix=EF=BC=88=E4=BF=AE=E5=A4=8Dbug?= =?UTF-8?q?=EF=BC=89:=20docs=EF=BC=88=E6=96=87=E6=A1=A3=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=EF=BC=89:=20refactor=EF=BC=88=E9=87=8D=E6=9E=84=EF=BC=89:=20te?= =?UTF-8?q?st(=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/brand_dna/service.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/service/brand_dna/service.py b/app/service/brand_dna/service.py index 5a525c2..fd35c19 100644 --- a/app/service/brand_dna/service.py +++ b/app/service/brand_dna/service.py @@ -35,8 +35,8 @@ class BrandDna: # 获取结果 def get_result(self): mask, image = self.get_seg_mask() - cv2.imshow("", image) - cv2.waitKey(0) + # cv2.imshow("", image) + # cv2.waitKey(0) height, width, channels = image.shape result_dict = [] @@ -50,8 +50,8 @@ class BrandDna: outwear_img[mask == value] = image[mask == value] outwear_mask_img[mask == value] = [0, 0, 255] - cv2.imshow("", outwear_img) - cv2.waitKey(0) + # cv2.imshow("", outwear_img) + # cv2.waitKey(0) # 预处理之后的input img preprocess_img = self.category_preprocess(outwear_img) @@ -89,8 +89,8 @@ class BrandDna: tops_img[mask == value] = image[mask == value] tops_mask_img[mask == value] = [0, 0, 255] - cv2.imshow("", tops_img) - cv2.waitKey(0) + # cv2.imshow("", tops_img) + # cv2.waitKey(0) # 预处理之后的input img preprocess_img = self.category_preprocess(tops_img) @@ -129,8 +129,8 @@ class BrandDna: bottoms_img[mask == value] = image[mask == value] bottoms_mask_img[mask == value] = [0, 0, 255] - cv2.imshow("", bottoms_img) - cv2.waitKey(0) + # cv2.imshow("", bottoms_img) + # cv2.waitKey(0) # 预处理之后的input img preprocess_img = self.category_preprocess(bottoms_img) @@ -327,7 +327,7 @@ if __name__ == '__main__': # result_url = service.get_result() # print(result_url) request_item = BrandDnaModel( - image_url="aida-users/60/product_image/07cb5d5d-5022-44cc-b0d3-cc986cfebad1-2-60.png", + image_url="aida-results/result_00006a48-e315-11ee-b7c8-b48351119060.png", is_brand_dna=True ) service = BrandDna(request_item)