yuxindu commited on
Commit
9f31950
·
1 Parent(s): 8de8404

add percentage

Browse files
model/utils/monai_inferers_utils.py CHANGED
@@ -220,7 +220,7 @@ def sliding_window_inference(
220
 
221
  for slice_g in tqdm(range(0, total_slices, sw_batch_size)) if progress else range(0, total_slices, sw_batch_size):
222
  # my_bar.progress(float(slice_g/total_slices), text=progress_text)
223
- print(slice_g/total_slices)
224
  slice_range = range(slice_g, min(slice_g + sw_batch_size, total_slices))
225
  unravel_slice = [
226
  [slice(int(idx / num_win), int(idx / num_win) + 1), slice(None)] + list(slices[idx % num_win])
 
220
 
221
  for slice_g in tqdm(range(0, total_slices, sw_batch_size)) if progress else range(0, total_slices, sw_batch_size):
222
  # my_bar.progress(float(slice_g/total_slices), text=progress_text)
223
+ st.write(f'zoom in inference {slice_g/total_slices*100.0:.2f}%')
224
  slice_range = range(slice_g, min(slice_g + sw_batch_size, total_slices))
225
  unravel_slice = [
226
  [slice(int(idx / num_win), int(idx / num_win) + 1), slice(None)] + list(slices[idx % num_win])