Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,8 @@ import skimage
|
|
10 |
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 |
#out = processed
|
15 |
|
16 |
# black out pixels
|
|
|
10 |
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).astype(int)
|
15 |
#out = processed
|
16 |
|
17 |
# black out pixels
|