megvii-model / HINet

Other
365 stars 62 forks source link

About Inference #42

Open Gwah987 opened 2 years ago

Gwah987 commented 2 years ago

Hi, how can I Inference multiple images in the folder not just a single image? Thank

mayorx commented 2 years ago

Hi, Gwah987,

You can set the config, i.e. dataroot_gt, dataroot_lq set to your folder and io_backend set to disk. In addition, you should set save_img to true.

Thanks.

Gwah987 commented 2 years ago

Hi, Gwah987,

You can set the config, i.e. dataroot_gt, dataroot_lq set to your folder and io_backend set to disk. In addition, you should set save_img to true.

Thanks.

@mayorx Hi,mayorx I am using my own data set, there is no GT, so I modified the code, and now I am trying to test my dataset, I have a total of hundreds of pictures, my 1080Ti*2 which has 22GB memory, but the "CUDA out of memory" still bothers me. Is there anything wrong with my settings? Thanks.

mayorx commented 2 years ago

Hi, Gwah987, I know there is no GT in this case, setting the 'dataroot_gt' to your folder will only produce a fake PSNR and you can just ignore it. This is a workaround to infer multiple images. For the 'out of memory' issue, it might cause by the large size of the image? A workaround is to crop the image and inference it. These two parameters may be helpful: https://github.com/megvii-model/HINet/blob/main/options/test/REDS/HINet-REDS.yml#L43-L44 . Thanks