Abstract
Exemplar-based image translation involves generating images that adhere to a specific content condition while adopting the style of a provided exemplar. Current methodologies often focus on learning the correspondence between input domains but frequently neglect the rich information available within the domains themselves. This paper introduces the Cross-domain Feature Fusion Transformer (CFFT), a novel framework designed to learn both inter-domain correspondence and intra-domain potential information interactions. By treating features from both domains as a unified whole, CFFT-GAN achieves superior feature decoupling and fusion. Our results across multiple high-resolution datasets demonstrate that CFFT-GAN outperforms state-of-the-art methods in both quantitative metrics and qualitative visual fidelity.
Introduction
Exemplar-based image translation is a challenging task where a model must synthesize a realistic image based on a "content" input—such as a human pose, a rough sketch, or a semantic mask—while strictly following the stylistic cues of an "exemplar" image. This task presents two primary hurdles: establishing accurate spatial correspondence (e.g., mapping a point on a sketch to the correct texture on a photo) and effectively mining information within each domain.
Most existing approaches focus heavily on inter-domain relationships (how domain A relates to domain B) but ignore intra-domain interactions—the internal logic and correlations within the content or style features. While Convolutional Neural Networks (CNNs) are efficient for local feature extraction, they often struggle with long-range spatial alignment. Conversely, Transformers excel at capturing global dependencies but are computationally intensive and data-hungry. CFFT-GAN bridges this gap with a hybrid CNN-Transformer architecture that optimizes both inter- and intra-domain feature fusion.
Methodology
The CFFT-GAN Pipeline
The architecture follows a structured three-stage process to ensure high-quality synthesis:
- CNN Encoders: Two distinct CNN encoders are utilized to extract multi-scale features from the content input and the style exemplar. These encoders provide the initial local feature representations necessary for the transformer stage.
- Cross-domain Feature Fusion Transformer (CFFT): This core module is responsible for the sophisticated alignment of features. It consists of two sub-modules:
- Feature Fusion Network (FFN): This network concatenates the extracted features and employs Transformer Encoders to perform coarse matching and initial fusion, treating the combined features as a single entity.
- Hierarchical Transformer (Hiformer): The Hiformer progressively splits features in the spatial dimension. By performing self-learning optimization from coarse to fine scales, it ensures precise spatial alignment of textures and fine-grained details.
- SPADE-based Generator: The aligned and fused features are passed into a spatially-adaptive (SPADE) generator, which synthesizes the final high-resolution image by modulating the normalized features with the learned style information.
Pluggable and Cascadable Design
A significant innovation of CFFT-GAN is its modularity. The CFFT module is designed to be pluggable, allowing researchers to "cascade" multiple modules to handle multi-domain tasks. For instance, a model could simultaneously process an edge map, a style exemplar, and a specific head pose by stacking CFFT modules to fuse these disparate conditions sequentially.
Experimental Results
Datasets and Implementation
The model was evaluated across five diverse high-resolution datasets to test its versatility:
- Deepfashion: Pose-to-image translation.
- CelebA-HQ: Edge-to-face translation.
- MetFaces: Sketch-to-portrait translation involving artistic styles.
- ADE20K: Semantic mask-to-scene translation.
- AFHQ: Animal face sketch-to-image translation.
Quantitative Performance
CFFT-GAN consistently outperformed state-of-the-art (SOTA) baselines, including CoCosNet v2 and UNITE. On the Deepfashion dataset, CFFT-GAN achieved a Fréchet Inception Distance (FID) of 8.8, a marked improvement over CoCosNet v2’s score of 12.2. A lower FID score indicates that the generated images are both higher in quality and more diverse, closely matching the distribution of real images.
Qualitative Analysis and Ablation
Visual assessments confirm that CFFT-GAN is exceptionally proficient at preserving identity and fine details, such as hair texture and makeup, even when there is a significant semantic gap between the input and the exemplar. Ablation studies highlighted the necessity of the Hiformer module; removing it caused the FID on Deepfashion to jump from 8.8 to 11.3, proving that hierarchical spatial alignment is critical for achieving high-fidelity results.
Discussion and Conclusion
CFFT-GAN introduces a powerful paradigm for image translation by emphasizing the synergy between inter-domain and intra-domain information. By treating features as a unified whole during the transformer phase, the model learns a richer representation of how textures should flow across spatial dimensions.
While the model excels in most tasks, it shows a slight performance deficit in mask-to-image tasks (such as those in the ADE20K dataset) compared to specialized SOTA methods. This suggests that semantic masks may require a different categorical understanding than sketches or poses. Future work will focus on optimizing the architecture for semantic-heavy tasks and reducing the computational overhead of the transformer components to improve efficiency.
Summary updated