delta.utilities.create_windows

delta.utilities.create_windows(img: ndarray[Any, dtype[float32]], target_size: Tuple[int, int] = (512, 512), min_overlap: int = 24) Tuple[ndarray[Any, dtype[float32]], List[Tuple[int, int]], List[Tuple[int, int]]]

Crop input image into windows of set size.

Parameters
img2D array

Input image.

target_sizetuple, optional

Dimensions of the windows to crop out. The default is (512,512).

min_overlapint, optional

Minimum overlap between windows in pixels. Defaul is 24.

Returns
windows: 3D array

Cropped out images to feed into U-Net. Dimensions are (nb_of_windows, target_size[0], target_size[1])

loc_ylist

List of lower and upper bounds for windows over the y axis

loc_xlist

List of lower and upper bounds for windows over the x axis