kritiksoman / GIMP-ML

AI for GNU Image Manipulation Program
https://github.com/kritiksoman/tmp/blob/master/GIMP-ML%20Presentation.pdf
MIT License
1.41k stars 133 forks source link

Make inpainting available in resolutions other than 256x256 #39

Open raphaelgoulart opened 3 years ago

raphaelgoulart commented 3 years ago

(currently using GIMP3-ML)

Is your feature request related to a problem? Please describe. When I use inpainting, it seems the image is downscaled to 256x256, and then upscaled back to the original resolution. If the image has a higher resolution that's kind of a problem. And using super-resolution to upscale the image from 256x256 back to the original resolution makes the image lose a lot of details.

Describe the solution you'd like For the image inpainting to happen on the image's original resolution. I know it might not be possible sometimes; when trying the same function on GIMP-ML, I had to halve the size of the image for it to work, but I'm fine with this.

Describe alternatives you've considered If not possible for some reason, then perhaps chopping the image into 256x256 blocks and applying the inpainting to each? (maybe checking if the image isn't fully black before doing so, to avoid spending computation time on parts that are not going to be inpainted at all)

If this is not feasible for some reason, or if something I've mentioned is inaccurate, please let me know. Thanks in advance!

kritiksoman commented 3 years ago

the model available https://github.com/junyanz/interactive-deep-colorization is for 256X256 and creating a new model for larger resolution would require retraining. We dont have many contributors to do this. applying existing model on patches of 256X256 would result in mismatch of coloring between adjacent patches.

raphaelgoulart commented 3 years ago

Ahh I understand. Thanks for the explanation!