sengourav012 commited on
Commit
f0d2fe7
·
verified ·
1 Parent(s): f933b8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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, 5, 6, 7, 8, 16]
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)