Image-Super-Resolution-via-Iterative-Refinement icon indicating copy to clipboard operation
Image-Super-Resolution-via-Iterative-Refinement copied to clipboard

How to perform inference on images of non-square shape?

Open vedant-gupta-ai opened this issue 1 year ago • 4 comments

Hello. Thanks for the code. I have trained the model with my own dataset using the directions mentioned in the ReadMe. I wanted to perform inference on images of non-square nature which are different from the training dataset. How can I go about performing that? Should I create a new lmdb file for the new dataset...or is there a way to pass these new test images directly to the model? Thanks in advance!

vedant-gupta-ai avatar Apr 05 '23 10:04 vedant-gupta-ai

hello,I am a new scholar in diffusion models. I want to ask you how to train the model using my own dataset? I follow the ReadMe to conduct dataset, but in the training phase, it has been stuck and there is no model output.

ouyangjiacs avatar Apr 07 '23 03:04 ouyangjiacs

Thank you very much for your reply and answer

ouyangjiacs avatar Apr 07 '23 03:04 ouyangjiacs

  1. Add your data to any folder in the repository.
  2. Run the command: python data/prepare_data.py --path input_data_dir --out your_output_dir_name--size custom_lowres_size,custom_highres_size

This will create the required directories in png format images If you add a -l at the end it will create lmdb version of the files

  1. Change names of directories at relevant places in the config file, specifically for the sr3 version of the code. Also change the low res and high res as per your requirement. Change datatype to img if using png version or lmdb if using that. Do these changes for both train and val sections of the config.
  2. Run using below command. Change number of uterations, batch size, model parameters, etc if required by changing the same config file. python sr.py -p train -c config/sr_sr3.json

vedant-gupta-ai avatar Apr 08 '23 07:04 vedant-gupta-ai

If I need to convert a 128 * 256 image into a 192 * 384 image, how should I modify the interface

dignity-cmd avatar Oct 13 '23 05:10 dignity-cmd