feat(新功能):
fix(修复bug): clothing seg 服务图片缺少3通道逻辑增加 docs(文档变更): refactor(重构): test(增加测试):
This commit is contained in:
@@ -63,7 +63,7 @@ class ClothingSeg:
|
||||
clothing_result = []
|
||||
if image_type == "sketch":
|
||||
if len(image.shape) == 2:
|
||||
image = np.stack([image] * 3, axis=-1)
|
||||
image = cv2.cvtColor(image, cv2.COLOR_GRAY2RGB)
|
||||
seg_mask = get_seg_result(1, image[:, :, :3])
|
||||
else:
|
||||
seg_mask = get_seg_result(1, image[:, :, :3])
|
||||
@@ -150,8 +150,8 @@ if __name__ == "__main__":
|
||||
# "image_type": "sketch"
|
||||
# },
|
||||
{
|
||||
"image_url": "test/clothing_seg/10144613.jpg",
|
||||
"image_type": "product"
|
||||
"image_url": "aida-collection-element/87/Sketchboard/ab40e035-547a-48c5-9f97-1db7bf56ad77.jpg",
|
||||
"image_type": "sketch"
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user