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)