Skip to main content
QUICK REVIEW

[Paper Review] Automatic Semantic Style Transfer using Deep Convolutional Neural Networks and Soft Masks

Huihuang Zhao, Paul L. Rosin|arXiv (Cornell University)|Aug 31, 2017
Generative Adversarial Networks and Image SynthesisComputer Science13 references18 citations
TL;DR

This paper proposes an automatic semantic style transfer method using deep convolutional neural networks and soft semantic masks to preserve content structure while transferring style. By generating probabilistic soft masks for semantic regions—especially facial parts—and integrating them into an augmented CNN with a generative MRF model, the approach reduces texture and color contamination from irrelevant regions, outperforming prior methods in visual quality and semantic consistency.

ABSTRACT

This paper presents an automatic image synthesis method to transfer the style of an example image to a content image. When standard neural style transfer approaches are used, the textures and colours in different semantic regions of the style image are often applied inappropriately to the content image, ignoring its semantic layout, and ruining the transfer result. In order to reduce or avoid such effects, we propose a novel method based on automatically segmenting the objects and extracting their soft semantic masks from the style and content images, in order to preserve the structure of the content image while having the style transferred. Each soft mask of the style image represents a specific part of the style image, corresponding to the soft mask of the content image with the same semantics. Both the soft masks and source images are provided as multichannel input to an augmented deep CNN framework for style transfer which incorporates a generative Markov random field (MRF) model. Results on various images show that our method outperforms the most recent techniques.

Motivation & Objective

  • To address the issue of texture and color contamination in neural style transfer, where background or irrelevant regions from the style image corrupt the content image.
  • To improve style transfer results by incorporating high-level semantic information through automatically generated soft masks instead of relying on manual annotations.
  • To enable fine-grained control over style transfer, particularly for facial regions, by segmenting key facial components like eyes, nose, and mouth.
  • To demonstrate that soft masks—representing probability distributions over semantic classes—yield better results than binary masks due to preserved uncertainty and robustness.
  • To validate the effectiveness of the method across diverse content and style images, including complex scenes and portraits.

Proposed method

  • Adapts a state-of-the-art semantic segmentation model (Zhou et al. 2015) to generate soft semantic masks, where each pixel’s value represents the probability of belonging to a specific semantic class.
  • Uses soft masks as additional input channels to an augmented deep convolutional neural network, with K soft mask channels concatenated to N standard feature maps.
  • Integrates a generative Markov random field (MRF) model to preserve local style patterns by matching activation patches from the style image to corresponding regions in the content image.
  • Treats each soft mask from the content image as a guide for matching corresponding patches in the style image, ensuring that only semantically aligned regions contribute to style transfer.
  • Employs a multi-loss optimization framework combining content loss, style loss (via Gram matrices), and a novel semantic mask loss with adjustable weight β to balance semantic compliance.
  • Applies the model end-to-end to transfer style from a single or multiple style images to a content image, with automatic segmentation of faces into sub-components for enhanced control.

Experimental results

Research questions

  • RQ1Can automatic soft semantic masks improve the quality and semantic consistency of neural style transfer compared to standard methods that ignore image semantics?
  • RQ2How does using soft masks instead of binary masks affect the visual quality and robustness of style transfer, especially in ambiguous or overlapping regions?
  • RQ3To what extent does fine-grained facial part segmentation (e.g., eyes, nose, mouth) enhance style transfer results in portrait images?
  • RQ4What is the optimal weight for the semantic mask loss term (β) to balance semantic accuracy and style-content consistency in the output?
  • RQ5Can the method effectively transfer styles from multiple style images to a single content image while avoiding cross-contamination between semantic regions?

Key findings

  • The proposed method significantly reduces texture and color contamination from irrelevant regions (e.g., background textures bleeding into the foreground), as demonstrated in comparisons with CNNMRF and other baselines.
  • Soft masks outperform binary masks in visual quality and robustness, especially in uncertain or ambiguous regions, due to the preservation of probabilistic information.
  • The method achieves superior results on portraits by enabling fine-grained style transfer on facial components such as eyes, nose, and mouth, avoiding artifacts like misplaced jewelry or skin texture on hair.
  • Experiments show that increasing the number of labeled semantic components (e.g., from 2 to 6 masks for facial regions) improves transfer quality and reduces semantic errors.
  • The optimal soft mask loss weight β lies in the range [15, 35], with β = 20 providing the best balance between semantic compliance and style-content consistency.
  • The method successfully transfers styles from multiple style images to a single content image, with soft masks enabling selective and accurate patch matching per semantic region.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.