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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-14 09:31:17 +0000
Seen: 8 times
Last updated: May 14 '23