I have a model which was trained on images of (512,512) size.
Now I have an image which is of dimension (x,y) where x,y are not equal to 512,512. Which means I’ll either need to pad them or crop them for making them (512,512).
Now what I want to do is, I need to generate image of the size (x,y) at the end.
Any Ideas on how to do that?
PS- I’m talking about taking crops from the main image and passing them from the model and finally stitching them back together.
I guess what you’re asking for is generative adversarial models (GAN’s) for image reconstruction. You can find a tutorial of face generation here. https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html
As for crops, you can use torchvision.transfroms to do that