Jump to content

Recommended Posts

Style Transfer Effect

 

Example.png

 

Download the Installer from Github (warning - 53 MB download 😟)

 

Requirements:

  • Paint.NET v4.2.* (tested with 4.2.8)
  • Windows 7 or later, 64 bit version (sorry about that😟)
  • a lot of RAM (should work fine with 8 GB, but 16 GB or more are recommended, especially for bigger images)
  • a fast CPU (no GPU hardware acceleration at this point) - it can take a long time to render the effect

 

Supported UI languages:

  • English (including British English to put the "U" back in colour☺️)
  • German
  • French
  • Portuguese
  • Spanish
  • Russian

 

Let me know, if you can help me with adding languages or improve the existing localisation.

 

You can find the effect under "Effects->Artistic->Style Transfer".

 

But what does it do?

 

This effect can be used to transfer the style of one image to another.

The effect uses neural networks trained on a bunch of images to achieve this.

You can either select a style from list of presets (including a fancy before-and-after-slider for viewing an example):

plugin_preset_example.png

 

The "Stylize Amount"-slider lets you adjust the ratio between the selected style and the content image style.

Note that this is not a simple alpha-blend, though.
Even selecting zero ("0") will change the content image significantly, as the model tries to apply the style extracted

from the content to the content itself. This process isn't perfect by any means, so keep that in mind.
 

"Style Extraction" and "Style Transfer" models can be selected as well.

The "High Quality" setting uses a larger model for extracting and transferring styles.

The "Fast"-option selects a smaller, "distilled" version of the higher quality one that requires less memory and less CPU power.

The results will be very different between the models and depending on the selected style and amount,you might even prefer one over the other.
 

 

Or you can create your own style by using an image of your choice:

plugin_custom_style.png

 

Clicking the "Select Style Image"-button or clicking the style image preview directly, will open a file dialog for image selection.

The "Style Image Size"-slider determines the relative scaling factor of the style image that is used before the style is analysed.

Think of it as how much of the style image the model is allowed to "see" before the style is extracted.
The coloured bar below the slider indicates a size range that will probably yield the best-looking results, with the green arrow pointing at the recommended value.
You can select values outside this range (though RAM and minimum size restrictions still apply), but the results may not be as good.

The plugin will display a warning, if you choose a combination of a big style image and large style size:
plugin_custom_style_warning.png

 

This happens, because the processing requires a large amount of RAM and once you use more RAM than is physically installed in your computer,

your system will crawl to a halt, become unresponsive, and eventually even crash Paint.NET.
The plugin will not use your settings, if they would result in too much RAM being used to protect the system from running out of memory.

 

I hope you find this effect useful and have as much fun playing around with it as I had creating it ☺️!

 

PS: the source code is available on Github - if you can, please use Github to report any issues, bugs, and feature requests.

Edited by Pat L
added another example image
  • Like 5
  • Upvote 1
Link to post
Share on other sites

Hello & welcome Pat.

 

Wow. That's quite an introduction B) I'm  impressed. The list of presets is fabulous. I'm off to play with this new toy. Thank you!

Link to post
Share on other sites
2 hours ago, homebrew said:

fine results,  but takes too much time to be applied, between 1 and 2 mn (24Go RAM), without real time preview.  don't know if  i'm mistaken.

Yeah, quite time consuming - even if you cancel. Seems to go thru all the segments even though you click cancel.

 

but, but, THANK YOU!

Link to post
Share on other sites
37 minutes ago, Panchdara said:

Yeah, quite time consuming - even if you cancel. Seems to go thru all the segments even though you click cancel.

 

but, but, THANK YOU!

 

Yes, unfortunately proper support for "Cancel" is currently on the todo-list. Well that and support for GPU-accelerated processing.

I am currently looking at a few options on how to achieve this, so stay tuned for updates👍

Link to post
Share on other sites

Wow! Really impressed with this @Pat L.

 

Got a lot of things racing in my head now.  Thanks for this!  :star: :)

 

styletransfer_orig.pngstyletransfer.png  

Magical!

 

Edited by lynxster4
  • Like 2
Link to post
Share on other sites

Can anyone elaborate on the installation?  I installed NSIS, the Installer.nsi file didn't compile, so I compiled the zip and that worked (I think) but it just gave me a very similar looking folder and another Installer.nsi file that didn't compile

Link to post
Share on other sites

The information at the github link seems to be for ByteHeads. I am pleased that an installer was provided.
( Even providing the .dll would have been just as good for me.)

Edited by HyReZ


 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...