Spaces:
Build error
Build error
Sophie98
commited on
Commit
•
e47598c
1
Parent(s):
8d43198
change path model file
Browse files- segmentation.py +2 -2
segmentation.py
CHANGED
@@ -8,7 +8,7 @@ from PIL import Image
|
|
8 |
import segmentation_models as sm
|
9 |
|
10 |
def get_mask(image):
|
11 |
-
model_path = "
|
12 |
CLASSES = ['sofa']
|
13 |
BACKBONE = 'resnet50'
|
14 |
|
@@ -44,7 +44,7 @@ def get_mask(image):
|
|
44 |
|
45 |
prediction = model.predict(test_img).round()
|
46 |
mask = Image.fromarray(prediction[...,0].squeeze()*255).convert("L")
|
47 |
-
mask.save("masks/sofa.jpg")
|
48 |
return np.array(mask)
|
49 |
|
50 |
def replace_sofa(image,mask,styled_sofa):
|
|
|
8 |
import segmentation_models as sm
|
9 |
|
10 |
def get_mask(image):
|
11 |
+
model_path = "model_checkpoint.h5"
|
12 |
CLASSES = ['sofa']
|
13 |
BACKBONE = 'resnet50'
|
14 |
|
|
|
44 |
|
45 |
prediction = model.predict(test_img).round()
|
46 |
mask = Image.fromarray(prediction[...,0].squeeze()*255).convert("L")
|
47 |
+
#mask.save("masks/sofa.jpg")
|
48 |
return np.array(mask)
|
49 |
|
50 |
def replace_sofa(image,mask,styled_sofa):
|