Skip to content

Sequential Patching

Source

Sequential patching functions.

extract_patches_sequential(arr, patch_size, target=None)

Generate patches from an array in a sequential manner.

Array dimensions should be SC(Z)YX, where S and C can be singleton dimensions. The patches are generated sequentially and cover the whole array.

Parameters:

  • arr (ndarray) –

    Input image array.

  • patch_size (tuple[int]) –

    Patch sizes in each dimension.

  • target (Optional[ndarray], default: None ) –

    Target array, by default None.

Returns:

  • tuple[ndarray, Optional[ndarray]]

    Patches.