Question about reshape_patch function
Prevalenter opened this issue · 4 comments
what the role of reshape_patch in core/utils/preprocess?
I found that adding the patch_size parameter can significantly speed up the training process and reduce the cuda memory.
And I test function reshape_patch using the code following:
img = cv2.imread('cat.jpeg', 0)
img = img[np.newaxis, np.newaxis, :, :, np.newaxis]
img_patched = reshape_patch(img, 3)
and I show the img(a gray image) and img_patched:
So is this function used to reduce the spatial resolution of the image?
And thanks for your good work!
Yes, this operation is to reduce the spatial resolution, but it still keeps the complete information by adding the number of channels.
Thansk for your answer!
And I did not find the description of this operation in the paper. Does this operation refer to other codes? or proposed by your team?
I think this is a widely-used idea in computer vision, such as super-resolution. We implemented this operation ourselves in this paper.
ok, thanks for your answer.