Spaces:
Runtime error
Runtime error
Fix np.argmax arg
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def generate_segmentation_video(study):
|
|
78 |
# shape = (8, Z, H, W)
|
79 |
p_spine = seg_output[:7].sum(0)
|
80 |
# shape = (Z, H, W)
|
81 |
-
seg_output = np.argmax(seg_output,
|
82 |
# shape = (Z, H, W)
|
83 |
seg_output[p_spine < 0.5] = 0
|
84 |
seg_output = (seg_output * 255 / 7).astype("uint8")
|
|
|
78 |
# shape = (8, Z, H, W)
|
79 |
p_spine = seg_output[:7].sum(0)
|
80 |
# shape = (Z, H, W)
|
81 |
+
seg_output = np.argmax(seg_output, axis=0) + 1
|
82 |
# shape = (Z, H, W)
|
83 |
seg_output[p_spine < 0.5] = 0
|
84 |
seg_output = (seg_output * 255 / 7).astype("uint8")
|