feat(新功能): brand dna 文件路径修改
fix(修复bug): docs(文档变更): refactor(重构): test(增加测试):
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user