xinntao / Real-ESRGAN-ncnn-vulkan

NCNN implementation of Real-ESRGAN. Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration.
https://github.com/xinntao/Real-ESRGAN
Other
1.46k stars 182 forks source link

Add resize output option #56

Open TheGameratorT opened 10 months ago

TheGameratorT commented 10 months ago

Many times I had the case where I just wanted to remove noise on an image without actually resizing it.

Saving images to the disk in very large sizes is not very efficient and it wasted write cycles on my SSD.

I needed to run the model at x2 scale but still save it at x1.

This pull request adds a -r resize option that before writing the output file to the disk, resizes the output in memory if the dimensions of the output don't match what the user specified, thus saving faster and saving disk space.

Ohrwerk commented 5 months ago

I would also find this function very useful, but couldn't it also be realized via an "-S 1"?

TheGameratorT commented 5 months ago

I would also find this function very useful, but couldn't it also be realized via an "-S 1"?

The -s argument does not allow 1 to be specified.