basso4 commited on
Commit
26167ec
Β·
verified Β·
1 Parent(s): e5381aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -178,13 +178,13 @@ if __name__ == "__main__":
178
  #apply seamlessClone technique here
179
  #img_base
180
  dict = dict['background'].convert("RGB").resize((384, 512))
181
- dict = np.array(dict)
182
- dict = cv2.cvtColor(dict, cv2.COLOR_RGB2BGR).astype(np.uint8)
183
 
184
  #img_output
185
  img_cv = rearrange(x_checked_image_torch[0], 'c h w -> h w c').cpu().numpy()
186
- img_cv = (img_cv * 255)
187
- img_cv = cv2.cvtColor(img_cv, cv2.COLOR_RGB2BGR).astype(np.uint8)
188
 
189
  #mask
190
  mask_cv = mask_cv.convert("L").resize((384,512))
 
178
  #apply seamlessClone technique here
179
  #img_base
180
  dict = dict['background'].convert("RGB").resize((384, 512))
181
+ dict = np.array(dict).astype(np.uint8)
182
+ dict = cv2.cvtColor(dict, cv2.COLOR_RGB2BGR)
183
 
184
  #img_output
185
  img_cv = rearrange(x_checked_image_torch[0], 'c h w -> h w c').cpu().numpy()
186
+ img_cv = (img_cv * 255).astype(np.uint8)
187
+ img_cv = cv2.cvtColor(img_cv, cv2.COLOR_RGB2BGR)
188
 
189
  #mask
190
  mask_cv = mask_cv.convert("L").resize((384,512))