class_docstr: Basic predictor for nnunet.
class_docstr_tok: ["Basic","predictor","for","nnunet","."]
code: def _compute_steps_for_sliding_window(
      patch_size: Tuple[int, ...],
      image_size: Tuple[int, ...],
      step_size: float,
  ) -> List[List[int]]:
      assert [
          i >= j for i, j in zip(image_size, patch_size)
      ], "image size must be as large or larger than patch_size"
      assert (
          0 < step_size <= 1
      ), "step_size must be larger than 0 and smaller or equal to 1"
  
      target_step_sizes_in_voxels = [i * step_size for i in patch_size]
      num_steps = [
          int(np.ceil((i - k) / j)) + 1
          for i, j, k in zip(
              image_size, target_step_sizes_in_voxels, patch_size
          )
      ]
  
      steps = []
      for dim in range(len(patch_size)):
          max_step_value = image_size[dim] - patch_size[dim]
          if num_steps[dim] > 1:
              actual_step_size = max_step_value / (num_steps[dim] - 1)
          else:
              actual_step_size = 99999999999
  
          steps_here = [
              int(np.round(actual_step_size * i))
              for i in range(num_steps[dim])
          ]
          steps.append(steps_here)
      return steps
  
imports: import numpy
  from functools import partial
  from typing import Tuple, List, Union
  from scipy.ndimage.filters import gaussian_filter
  from .utils import no_op, pad_nd_image
  import paddle
  from paddle.amp import auto_cast
  from tools.preprocess_utils import GenericPreprocessor, PreprocessorFor2D
  from nnunet.transforms import default_2D_augmentation_params, default_3D_augmentation_params
label_desc: Use image node_id 5 for calling the BasePredictor obj's underlying member method code with example usage: obj._compute_steps_for_sliding_window(patch_size, image_size, step_size) and returns: steps