NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Controlling Perceptual Factors in Neural Style Transfer

Leon A. Gatys, Alexander S. Ecker, Matthias Bethge, Aaron Hertzmann, Eli Shechtman

Abstract

Neural Style Transfer (NST) has traditionally operated as a "black box" process, blending content and style through global statistics. This paper introduces intuitive control mechanisms that allow users to independently manipulate spatial regions, color palettes, and artistic scales. By decomposing style into these distinct perceptual factors, the authors transform NST into a precise tool for high-resolution, multi-style image synthesis.

Introduction

The original NST algorithm, while groundbreaking, often suffers from three primary limitations: spatial mismatches (e.g., applying grass textures to the sky), unwanted color bleed from the style image, and poor performance at high resolutions due to fixed receptive fields in the underlying Convolutional Neural Network (CNN). This research addresses these issues by providing "knobs and dials" for artists and designers to steer the stylization process.

Methods for Perceptual Control

The proposed framework builds upon the VGG-19 architecture, introducing three primary dimensions of control:

Spatial Control via Guided Gram Matrices

To prevent semantic contamination, the authors replace the global Gram matrix with spatial guidance masks. By computing separate "Guided Gram Matrices" for distinct regions (such as "sky" vs. "ground"), the algorithm ensures that textures are only transferred between semantically similar areas. To further refine boundaries, the masks are "eroded" to account for the large receptive fields of deep neurons, preventing style bleeding at the edges.

Color Control

Two methods are provided to preserve the original image's color integrity:

  1. Luminance-only Transfer: Style is applied exclusively to the luminance channel, leaving the content's original color information untouched.
  2. Color Histogram Matching: The style image's color distribution is mathematically aligned with the content image's palette before the transfer process begins.

Scale Control

Standard NST often fails at high resolutions because the network loses sight of global artistic structures. The authors introduce a coarse-to-fine optimization strategy. A low-resolution stylization is generated first to capture large-scale structures; this result then serves as the initialization for the high-resolution pass, ensuring that fine-grained details are added without losing the overall composition.

Comparison of different control mechanisms: (a) original content, (b) spatial control, (c) color control, and (d) scale control.

Key Insights

The core contribution of this work is the realization that style is factorizable. It can be perceptually decomposed into spatial location, color palette, and stroke scale. Furthermore, the authors demonstrate that these controls can be integrated into feed-forward "Fast Style Transfer" networks, enabling real-time, controlled stylization.

Results and Discussion

The implementation of these controls leads to significant improvements in both semantic accuracy and efficiency. Spatial control successfully eliminates "texture contamination," while the coarse-to-fine approach reduces optimization time by approximately 2.5x for high-resolution images (up to 3000x3000px).

A high-resolution stylization demonstrating the effectiveness of the proposed control mechanisms on a complex architectural scene.

These methods also enable "Style Mixing," where users can combine the brushstrokes of one artist with the geometric composition of another. While the current approach requires manual mask creation, it represents a major step toward moving NST from a stochastic effect to a controllable artistic medium. Future work will focus on automated segmentation and finding CNN architectures that naturally factorize these components during learning.

Summary updated

BibTeX
@inproceedings{gatys2017controlling,
  author = {Leon A. Gatys and Alexander S. Ecker and Matthias Bethge and Aaron Hertzmann and Eli Shechtman},
  title = {{Controlling Perceptual Factors in Neural Style Transfer}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  doi = {10.1109/cvpr.2017.397},
}
Figure