emilios commited on
Commit
698bdd0
·
verified ·
1 Parent(s): 4092cc0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,12 +11,12 @@ def inference(img):
11
  grayscale = skimage.color.rgb2gray(img)
12
  #binarized = np.where(grayscale>0.1, 1, 0)
13
  #processed = morphology.remove_small_objects(grayscale.astype(bool), min_size=33, connectivity=4).astype(int)
14
- processed = morphology.remove_small_objects(grayscale.astype(bool), min_size=2, connectivity=4)
15
  #out = processed
16
 
17
  # black out pixels
18
- mask_x, mask_y = np.where(processed == 0)
19
- img[mask_x, mask_y, :3] = 0
20
  #mask_x, mask_y = np.where(processed == 0)
21
  #im[mask_x, mask_y, :3] = 0
22
 
 
11
  grayscale = skimage.color.rgb2gray(img)
12
  #binarized = np.where(grayscale>0.1, 1, 0)
13
  #processed = morphology.remove_small_objects(grayscale.astype(bool), min_size=33, connectivity=4).astype(int)
14
+ processed = morphology.remove_small_objects(grayscale , min_size=2, connectivity=4)
15
  #out = processed
16
 
17
  # black out pixels
18
+ #mask_x, mask_y = np.where(processed == 0)
19
+ #img[mask_x, mask_y, :3] = 0
20
  #mask_x, mask_y = np.where(processed == 0)
21
  #im[mask_x, mask_y, :3] = 0
22