Introduction
Image-to-image translation aims to convert inputs like semantic masks, sketches, or edge maps into photo-realistic images. While significant progress has been made using Generative Adversarial Networks (GANs), "exemplar-based" translation—where the output must match the style and texture of a specific reference image—remains a significant challenge. Existing methods often rely on global style vectors, which fail to capture spatial details, leading to the "local style wash away" problem. For instance, a specific texture in an exemplar might be averaged out across the entire generated image rather than applied to the correct semantic region.
To address this, we present CoCosNet (Cross-domain COrreSpondence Network), a framework designed to establish dense, semantically meaningful links between an input domain (e.g., a mask) and an exemplar domain (e.g., a photo). By learning to align these disparate domains, the model can precisely "borrow" local textures and colors from the reference image.
Methodology
The CoCosNet architecture consists of two primary sub-networks trained jointly to optimize both alignment and synthesis.
Cross-domain Correspondence Network
The core innovation is the establishment of dense correspondence between different domains. The network maps both the input (Domain A) and the exemplar (Domain B) into a shared intermediate feature space. Within this latent space, the model computes a dense correlation matrix. This matrix is used to warp the exemplar image, ensuring its features are spatially aligned with the structure of the input mask. To ensure robust matching without direct ground truth, the authors utilize weak supervision through "pseudo-exemplar pairs" created via random geometric warping.
Translation Network
The translation network synthesizes the final output using the warped exemplar and the original input. It employs spatially-adaptive de-normalization (SPADE) blocks enhanced with Positional Normalization (PN). Unlike standard normalization techniques, PN preserves structural information across spatial locations, which is critical for high-fidelity texture transfer from the warped reference.
Key Insights
- Shared Latent Domain: By forcing both domains into a common space, the network extracts "semantic signatures" that bridge the gap between abstract masks and natural photos.
- Cycle Consistency: A regularization loss ensures that the correspondence is bidirectional, preventing nonsensical matches.
- Joint Optimization: The correspondence and translation tasks are mutually beneficial; better alignment leads to more realistic synthesis, while the GAN loss drives the correspondence network toward more accurate semantic matching.
Experiments and Results
CoCosNet was evaluated across several diverse datasets, including ADE20k (scene parsing), CelebA-HQ (face synthesis), and DeepFashion (pose-to-body translation).
Quantitative Performance
The model demonstrated state-of-the-art performance across multiple metrics. On the ADE20k dataset, CoCosNet achieved a Fréchet Inception Distance (FID) of 26.4, significantly outperforming SPADE (33.9). This indicates a substantial improvement in both image quality and diversity.
Qualitative Analysis and User Study
Qualitatively, CoCosNet excels at maintaining semantic consistency while faithfully reproducing the exemplar's local textures. As shown in the comparisons, previous methods like Pix2pixHD or MUNIT often produce blurry or semantically mismatched textures. In subjective user studies, CoCosNet was preferred in 84.2% of cases for its superior image quality and style relevance.
Discussion
While CoCosNet sets a new benchmark for exemplar-based translation, certain challenges remain. The computation of a dense correlation matrix is memory-intensive, posing a hurdle for scaling to very high resolutions (e.g., 1024p). Additionally, extreme disparities in viewpoint or semantic content between the input and exemplar can still result in artifacts during the warping process. Future work will focus on optimizing the computational efficiency of the correspondence layer and improving robustness to significant geometric misalignments.
Despite these limitations, the learned correspondence enables several downstream applications, such as high-fidelity makeup transfer and interactive image editing, proving the versatility of the cross-domain alignment approach.
Summary updated