itsyogesh commited on
Commit
162b5c5
·
verified ·
1 Parent(s): 7e6cd1e

Remove smoothning

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -125,7 +125,7 @@ def crop_signature(original_image_path, mask, padding=32):
125
 
126
  # Create an RGBA image with a black background and the denoised mask as the alpha channel
127
  mask_image = Image.new('RGBA', (w_padded, h_padded), (0, 0, 0))
128
- pil_mask = Image.fromarray(smooth_denoised_mask).convert('L')
129
  mask_image.putalpha(pil_mask)
130
 
131
  return mask_image
@@ -308,7 +308,7 @@ def inference(image):
308
  # Apply processed mask to images
309
  im_rgba = im_rgb.copy()
310
  im_rgba.putalpha(pil_original_mask)
311
- im_dark.putalpha(pil_processed_mask)
312
 
313
  return [cropped_signature_image, im_rgba, im_dark]
314
 
 
125
 
126
  # Create an RGBA image with a black background and the denoised mask as the alpha channel
127
  mask_image = Image.new('RGBA', (w_padded, h_padded), (0, 0, 0))
128
+ pil_mask = Image.fromarray(cropped_mask).convert('L')
129
  mask_image.putalpha(pil_mask)
130
 
131
  return mask_image
 
308
  # Apply processed mask to images
309
  im_rgba = im_rgb.copy()
310
  im_rgba.putalpha(pil_original_mask)
311
+ im_dark.putalpha(pil_original_mask)
312
 
313
  return [cropped_signature_image, im_rgba, im_dark]
314