diff --git a/app/service/clothing_seg/service.py b/app/service/clothing_seg/service.py index 6d2b4d0..34ea7ee 100644 --- a/app/service/clothing_seg/service.py +++ b/app/service/clothing_seg/service.py @@ -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" } ] )