# How to ImageRestyle high-res images?

I’m running v12 now and ImageRestyle[] crashes for me on an image of size 1600 x 1200 pixels.

All the examples in the documentation use images around 500 x 500 or smaller. So, how can I get this to work on high resolution images?

We can't simply map it over sub-windows of the image:

p = ImagePartition[i, 100];
ImageAssemble[Map[ImageRestyle[#, s, PreserveColor -> True,
PerformanceGoal -> "Quality", RandomSeeding -> 1] &, p, {2}]];


I need to ImageRestyle images of 4 or more megapixels in size. Is there someway to get this to use a GPU?

• If we could somehow enforce edge constraints on the sub windows the partitioning idea might work. – M.R. Oct 2 '17 at 16:22
• In my 32G memory machine,I think it is possible.. :) – yode Oct 5 '17 at 15:22
• I tried using Inpaint on the partition edges to smooth them. It's reasonably effective. – b3m2a1 Oct 23 '17 at 4:31
• @M.R. No way for larger images. However, I have tried to downscale the image, then restyle, and, again, to upscale it. The idea can work as the restyling seems to blur the resulting image a bit. So, upscaling should not show a clear detail reduction. Using ImageResize in downscaling as well as in upscaling, with a proper resampling, could help to minimize the effect of reducing details. – José Antonio Díaz Navas Oct 24 '17 at 8:00
• Install the free Wolfram Engine on a big cloud instance. On AWS you can go up to 2 Tera of RAM. Check github.com/Ludwiggle/JWLS to connect to a remote kernel – Fortsaint Jun 28 at 8:26