Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def generate_agnostic(image: Image.Image, segmentation):
|
|
79 |
img_np = np.array(image.resize((192, 256)))
|
80 |
agnostic_np = img_np.copy()
|
81 |
segmentation_resized = cv2.resize(segmentation.astype(np.uint8), (192, 256), interpolation=cv2.INTER_NEAREST)
|
82 |
-
clothing_labels = [4
|
83 |
for label in clothing_labels:
|
84 |
agnostic_np[segmentation_resized == label] = [128, 128, 128]
|
85 |
return Image.fromarray(agnostic_np)
|
|
|
79 |
img_np = np.array(image.resize((192, 256)))
|
80 |
agnostic_np = img_np.copy()
|
81 |
segmentation_resized = cv2.resize(segmentation.astype(np.uint8), (192, 256), interpolation=cv2.INTER_NEAREST)
|
82 |
+
clothing_labels = [4]
|
83 |
for label in clothing_labels:
|
84 |
agnostic_np[segmentation_resized == label] = [128, 128, 128]
|
85 |
return Image.fromarray(agnostic_np)
|