Spaces:
Sleeping
Sleeping
ddovidovich
commited on
Commit
·
e375ead
1
Parent(s):
e0950a4
Update app.py
Browse files
app.py
CHANGED
@@ -164,7 +164,8 @@ if image_file is not None:
|
|
164 |
plt.imsave("predict.png",predicted_rgb)
|
165 |
|
166 |
predict1 = cv2.resize(predicted, (img.shape[1], img.shape[0]), interpolation=cv2.INTER_LANCZOS4)
|
167 |
-
|
|
|
168 |
|
169 |
mask = np.uint8(predict1 * 255)
|
170 |
_, mask = cv2.threshold(mask, thresh=255/2, maxval=255, type=cv2.THRESH_BINARY)
|
|
|
164 |
plt.imsave("predict.png",predicted_rgb)
|
165 |
|
166 |
predict1 = cv2.resize(predicted, (img.shape[1], img.shape[0]), interpolation=cv2.INTER_LANCZOS4)
|
167 |
+
img_dc=convert_one_channel(img)
|
168 |
+
decay_mask = detect_decays_static_th(img_dc, predict1)
|
169 |
|
170 |
mask = np.uint8(predict1 * 255)
|
171 |
_, mask = cv2.threshold(mask, thresh=255/2, maxval=255, type=cv2.THRESH_BINARY)
|