ddovidovich
commited on
Commit
·
509404a
1
Parent(s):
9d8b45e
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,9 @@ examples=["teeth_01.png","teeth_02.png","teeth_03.png","teeth_04.png"]
|
|
15 |
|
16 |
def load_image(image_file):
|
17 |
img = Image.open(image_file)
|
18 |
-
|
|
|
|
|
19 |
|
20 |
def convert_one_channel(img):
|
21 |
#some images have 3 channels , although they are grayscale image
|
|
|
15 |
|
16 |
def load_image(image_file):
|
17 |
img = Image.open(image_file)
|
18 |
+
img_gray = img.convert('L')
|
19 |
+
img_np = np.array(img_gray)
|
20 |
+
return img_np
|
21 |
|
22 |
def convert_one_channel(img):
|
23 |
#some images have 3 channels , although they are grayscale image
|