ianpan commited on
Commit
d45106e
·
1 Parent(s): b0fbed3

Fix np.argmax arg

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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, dim=0) + 1
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")