darts_segmentation.patch_coords¶
Yield patch coordinates based on height, width, patch size and margin size.
Parameters:
-
h(int) –Height of the image.
-
w(int) –Width of the image.
-
patch_size(int) –Patch size.
-
overlap(int) –Margin size.
Yields:
-
tuple[int, int, int, int]–tuple[int, int, int, int]: The patch coordinates y, x, patch_idx_y and patch_idx_x.