basso4 commited on
Commit
9df9110
Β·
verified Β·
1 Parent(s): ed52554

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -188,11 +188,11 @@ if __name__ == "__main__":
188
 
189
  #mask
190
  mask_cv = mask_cv.convert("L").resize((384,512))
191
- mask_cv = np.array(mask_cv)
192
  mask_cv = 255-mask_cv
193
 
194
 
195
- img_C = cv2.seamlessClone(dict, img_cv, mask_cv, (192, 256), cv2.NORMAL_CLONE)
196
  img_C = cv2.cvtColor(img_C, cv2.COLOR_BGR2RGB)
197
  img_C = Image.fromarray(img_C, mode="RGB")
198
 
 
188
 
189
  #mask
190
  mask_cv = mask_cv.convert("L").resize((384,512))
191
+ mask_cv = np.array(mask_cv).astype(np.uint8)
192
  mask_cv = 255-mask_cv
193
 
194
 
195
+ img_C = cv2.seamlessClone(dict, img_cv, mask_cv, (192, 256), cv2.NORMAL_CLONE).astype(np.uint8)
196
  img_C = cv2.cvtColor(img_C, cv2.COLOR_BGR2RGB)
197
  img_C = Image.fromarray(img_C, mode="RGB")
198