Abstract
Style transfer has traditionally been bifurcated into artistic and photo-realistic domains, each requiring distinct architectural constraints. Artistic transfer demands flexibility for texture synthesis, while photo-realistic transfer requires structural preservation to avoid spatial distortion. We present Domain-aware Style Transfer Networks (DSTN), a unified framework that bridges this gap. By incorporating a novel domainness indicator and adjustable skip connections, DSTN dynamically adapts its structural preservation based on the reference style. Experimental results demonstrate that DSTN achieves state-of-the-art performance across both domains within a single model, offering high-quality results with significant computational efficiency.
Introduction
The field of style transfer is generally divided into two primary tasks: artistic style transfer, which aims to replicate the expressive textures and brushstrokes of paintings, and photo-realistic style transfer, which focuses on altering the environmental characteristics of a photograph (e.g., time of day or weather) while maintaining structural integrity. These tasks present conflicting requirements. Artistic models often cause "spatial distortion" when applied to photos because they lack rigid structural constraints. Conversely, photo-realistic models utilize fixed skip connections to preserve edges, which often prevents them from capturing the rich, non-linear textures inherent in artistic styles.
Historically, users have had to manually select specialized models for each domain. This paper introduces Domain-aware Style Transfer Networks (DSTN), a unified architecture capable of automatically adapting to the specific requirements of both artistic and photo-realistic reference styles.
Methodology
The DSTN architecture consists of a unified encoder-decoder framework enhanced by three key components designed to handle domain-specific nuances.
1. Domainness Indicator
The domainness indicator is a module that analyzes the reference image to predict a continuous "domainness" value ($\alpha$) ranging from 0 (photo-realistic) to 1 (artistic). Unlike simple color-based classifiers, this indicator extracts both texture features (via Gram matrices) and structural features (via channel-wise pooling) from multiple layers of a VGG-19 encoder. This allows the model to distinguish between complex textures in photos and expressive strokes in art.
2. Domain-aware Skip Connection
The core innovation of DSTN is the domain-aware skip connection. Traditional skip connections pass raw structural information directly from the encoder to the decoder to preserve detail. In DSTN, the model extracts high-frequency components and applies a Gaussian blur, the intensity of which is modulated by the predicted $\alpha$ value. For photo-realistic references (low $\alpha$), the blur is minimal, ensuring sharp edges. For artistic references (high $\alpha$), the blur is increased, "softening" structural constraints and allowing the decoder to prioritize painterly textures.
3. Feature Transformation
At the bottleneck, the model employs a combination of Whitening and Coloring Transforms (WCT) for global style alignment and a "Style Decorator" for local pattern synthesis. This dual approach ensures that both the overall color scheme and fine-grained stylistic details are accurately transferred.
Experiments and Results
The model was trained using the MS-COCO dataset for photo-realistic samples and WikiArt for artistic samples. To improve the model's robustness in the transition between domains, the authors utilized "Mixup" training, creating synthetic intermediate samples.
Qualitative Evaluation
As shown in Figure 1, DSTN produces results that are competitive with or superior to specialized state-of-the-art models. It maintains the sharp, distortion-free edges required for photo-realistic transfer while simultaneously capturing the expressive textures of artistic styles—all within a single framework.
Quantitative and User Study Results
In a user preference study involving 65 subjects, DSTN achieved a 92.4% preference rate for content preservation in photos and an 80.6% preference rate for style expression in art compared to previous methods. Furthermore, the model is highly efficient, processing a 256x256 image in approximately 0.19 seconds on a standard GPU.
Conclusion
Domain-aware Style Transfer Networks (DSTN) successfully unify artistic and photo-realistic style transfer into a single, efficient architecture. By treating structural preservation as a tunable parameter via domain-aware skip connections, the model avoids the common pitfalls of spatial distortion in photos and texture suppression in art. Future work may involve exploring more modern backbones, such as Vision Transformers, and extending the domain-aware logic to ensure temporal consistency in video style transfer.
Summary updated