martinbenson / deep-photo-styletransfer

Implementation of "Deep Photo Style Transfer": https://arxiv.org/abs/1703.07511
MIT License
205 stars 27 forks source link

Masked Linear Color Transfer For Histogram Matching Style Transfer Improvements #34

Closed ProGamerGov closed 6 years ago

ProGamerGov commented 7 years ago

Using the linear-color-transfer.py Python script from my Neural-Tools project for Histogram Matching style transfer, greatly improves Neural-Style outputs as per the examples here, and countless experiments conducted by others.

Using a modified version of my code and GIMP, I took the masked regions of each style image and then applied them to the target content image regions. Essentially this was a partially manual version of Histogram Matching style transfer. The result from one of my experiments with masked linear color transfer can be seen below, along with the control test:


Regular Masked Style Transfer:

Masked Histogram Matching:


I think that an improved version of the linear-color-transfer.py Python script with support for masked regions (using input masks) would create better outputs with deep-photo-styletransfer, by eliminating the issues caused by extremely dark and light colors, and non-matching histograms. Though I am not sure how to go about adding support for masked regions in the script.