Fixed variable name ...
Browse files
app.py
CHANGED
@@ -98,7 +98,7 @@ def segment_images(model_name,url_input,image_input,threshold):
|
|
98 |
return_string += f"ID: {r['id']}\t Contour Count: {len(contour_list)}\t Score: {r['score']}\t Label Name: {label_name},\n"
|
99 |
|
100 |
r_shape = results["segmentation"].shape
|
101 |
-
new_image = np.zeros((
|
102 |
new_image[:, :, 0] = results["segmentation"].numpy()[:, :]
|
103 |
new_image[:, :, 1] = (new_image[:, :, 0] * 2) %256
|
104 |
new_image[:, :, 2] = (new_image[:, :, 0] * 3) %256
|
|
|
98 |
return_string += f"ID: {r['id']}\t Contour Count: {len(contour_list)}\t Score: {r['score']}\t Label Name: {label_name},\n"
|
99 |
|
100 |
r_shape = results["segmentation"].shape
|
101 |
+
new_image = np.zeros((r_shape[0], r_shape[1], 3), dtype=np.uint8)
|
102 |
new_image[:, :, 0] = results["segmentation"].numpy()[:, :]
|
103 |
new_image[:, :, 1] = (new_image[:, :, 0] * 2) %256
|
104 |
new_image[:, :, 2] = (new_image[:, :, 0] * 3) %256
|