The most efficient method to generate patches from an image while also including the coordinates of each patch would be to use sliding windows with a fixed size. The sliding window would move across the image, extracting patches of the same size. The coordinates of each patch would be the starting and ending position of the sliding window. This method is efficient because each patch can be extracted in a single iteration through the image, and the size of the patches can be easily adjusted to fit the specific needs of the application. Additionally, deep learning frameworks such as TensorFlow and PyTorch have built-in functions for creating sliding windows and extracting patches from images, further streamlining the process.
Asked: 2023-05-14 09:31:17 +0000
Seen: 8 times
Last updated: May 14 '23