titu1994 / Neural-Style-Transfer

Keras Implementation of Neural Style Transfer from the paper "A Neural Algorithm of Artistic Style" (http://arxiv.org/abs/1508.06576) in Keras 2.0+
Apache License 2.0
2.26k stars 481 forks source link

How to create mask for Masked style transfer? #16

Closed faizankshaikh closed 7 years ago

faizankshaikh commented 7 years ago

What did you use to create mask? Any alternatives?

titu1994 commented 7 years ago

@faizankshaikh I generally use Photoshop.

Load the entire content image into a new layer. Use quick select to choose all the regions you want to preserve, alternating with SHIFT + CLICK to add a region or ALT + CLICK to remove a region.

Then just fill the entire region with white to preserve style, or black to preserve the content instead. Then select inverse of the current selection and paint it with the other color to complete the mask.

The same steps can be applied with any software which allows selection of regions of images. I believe GIMP does this as well if you are on Linux.

On Windows, if you don't have Photoshop, you can do the same with Paint. I prefer photoshop since it allows a good deal of control and feather selection for intricate details like hair. Another (paid) software I have used in the past is Remask from Topaz Labs. It gets the job done very quickly.

faizankshaikh commented 7 years ago

Great. Thanks!