Skip to content

Content Image and Style Image Preparation

ProGamerGov edited this page Sep 26, 2016 · 30 revisions

By modifying the style image or content image, you can change the output image produced by Neural-Style.

Content Image:

  • Waifu2x can be used to increase the quality of your style image, resulting in a better output image.

  • Manipulating the image colors.

  • Darkening or brightening the image.

  • Decreasing the image resolution can change the output.

Style Image:

  • Waifu2x can be used to increase the quality of your style image, resulting in a better output image.

  • Manipulating the image colors.

  • Darkening or brightening the image.

  • The quality/resolution should be kept as high as possible so that the output image is not blurry.


Content Image And Style Image Resolution:


As you can see in the above comparison, changing the resolution of the content image creates interesting results. The neural net is able to predict what the image would look like if it were a higher resolution. As the resolution of the content image is lowered, it becomes more difficult for the neural net to predict what the content image would look like if it were a higher quality. Keep in mind that the model used in the above example image, was trained on 224x224 images. The comparison image is of the output's at iteration 50. The comparisons at iteration 250 and iteration 500, can be viewed here: https://imgur.com/a/vA95Y


As you can see in the above comparison, changing the resolution of the style image degrades the output quality.


Output Image Processing:


Making your output image look better with GIMP:

GIMP is a foss alternative to software like Photoshop. This means that GIMP is %100 open source and free as in beer.


Multi-Style Combination:

This was a test of an experimental idea using the exact same method as the tiling method in Adobe InDesign described on this page: https://github.com/jcjohnson/neural-style/wiki/Techniques-For-Increasing-Image-Quality-Without-Buying-a-Better-GPU

Instead of creating tiles, I made rectangles across specific parts if the image. I then placed multiple content images that had been run in Neural-Style with different style, in their own layer. I then copied them individually into specific rectangles and used the basic feather (2p1) and choke 8% to blend them into the image. The image_size value stayed the same for every style image used with the content image.

Some of the added parts from other style images used on the content image, blend in extremely well while others really stand stand out. I think this concept could be used to subtly enhance various images.

The full output images from which the rectangles are from, can be found here. The style and content images can be found here.