Patch the image
nooralahzadeh opened this issue · 2 comments
nooralahzadeh commented
How do you patch the image? any clues for the preprocessing and training step?
gupta-abhay commented
Working on this now. Should have some code over the next few days.
nooralahzadeh commented
from einops import rearrange
p = self.patch_size
x = rearrange(img, 'b c (h p1) (w p2) -> b (h w) (p1 p2 c)', p1 = p, p2 = p)