Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -223,9 +223,11 @@ def do_prediction(model_name, img):
|
|
223 |
|
224 |
img_border = np.zeros((prediction_true.shape[0],prediction_true.shape[1]))
|
225 |
img_border[y:y+h, x:x+w] = 1
|
|
|
226 |
else:
|
227 |
img_border = np.zeros((prediction_true.shape[0],prediction_true.shape[1]))
|
228 |
img_border[:, :] = 1
|
|
|
229 |
|
230 |
return "No numerical output", visualize_model_output(img_border,img, model_name)
|
231 |
|
|
|
223 |
|
224 |
img_border = np.zeros((prediction_true.shape[0],prediction_true.shape[1]))
|
225 |
img_border[y:y+h, x:x+w] = 1
|
226 |
+
img_border = np.repeat(img_border[:, :, np.newaxis], 3, axis=2)
|
227 |
else:
|
228 |
img_border = np.zeros((prediction_true.shape[0],prediction_true.shape[1]))
|
229 |
img_border[:, :] = 1
|
230 |
+
img_border = np.repeat(img_border[:, :, np.newaxis], 3, axis=2)
|
231 |
|
232 |
return "No numerical output", visualize_model_output(img_border,img, model_name)
|
233 |
|