Abstract
Exemplar-based image-to-image translation requires establishing dense semantic correspondence between a source and a reference image. Existing methods often fail at high resolutions due to quadratic memory costs. We present CoCosNet v2, which utilizes a hierarchical coarse-to-fine strategy and a differentiable GRU-assisted PatchMatch algorithm to achieve full-resolution correspondence. This approach enables the preservation of fine-grained textures and details, significantly outperforming previous state-of-the-art models in visual fidelity and semantic consistency.
Introduction
Image-to-image translation has advanced significantly, yet "exemplar-based" translation—where a reference image provides specific style or texture—remains a challenge. The core difficulty lies in correspondence: the network must identify which part of a source (e.g., a sketch) corresponds to which part of a reference image to accurately transfer textures.
Previous state-of-the-art methods, such as the original CoCosNet, were limited to low-resolution correspondence (e.g., 64×64). Attempting full-resolution matching (512×512 or 1024×1024) creates a prohibitive memory footprint because calculating similarity between every pixel scales quadratically. Consequently, fine details like logos, fabric patterns, or specific facial features are often lost or incorrectly hallucinated.
Proposed Method
CoCosNet v2 addresses the memory bottleneck through three primary innovations designed to enable efficient, high-resolution correspondence learning.
Hierarchical Coarse-to-Fine Strategy
Instead of matching high-resolution images from scratch, the model employs a hierarchical approach. It begins at a low resolution and uses the matches found at the coarse level to guide and narrow the search space at progressively finer levels. This significantly reduces the search area for each pixel at high resolutions.
GRU-assisted PatchMatch
The authors adapt the classic PatchMatch algorithm into a differentiable deep learning component. They introduce a Convolutional Gated Recurrent Unit (ConvGRU) to refine matches. While standard PatchMatch only considers immediate neighbors, the ConvGRU incorporates a larger spatial context and maintains a memory of previous estimates, leading to faster convergence and more spatially coherent results.
Differentiable Soft Warping
To facilitate unsupervised training, the system uses a "soft warping" function. This allows the network to backpropagate gradients through the matching process, learning semantic correspondence (e.g., matching an eye to an eye) purely by minimizing the final translation loss without requiring explicit ground-truth matching labels.
Experimental Results
The model was evaluated on three diverse datasets: DeepFashion (pose-to-body synthesis at 512×512), MetFaces (edge-to-face translation at 1024×1024), and ADE20K (mask-to-image synthesis at 256×256).
Quantitative Performance
CoCosNet v2 significantly outperforms previous methods. On the DeepFashion dataset, it achieved a Fréchet Inception Distance (FID) of 22.5, compared to 26.9 for the original CoCosNet and 34.4 for SPADE. Lower FID scores indicate higher image quality and diversity.
Qualitative Fidelity
As shown in the visual results, the model successfully transfers intricate details that competitors typically blur, such as the specific text on a t-shirt or the cracked texture of an old oil painting. It is among the first models to demonstrate successful exemplar-based translation at 1024×1024 resolution while maintaining high semantic consistency with the input structure.
Conclusion and Future Work
CoCosNet v2 demonstrates that full-resolution correspondence is computationally feasible through intelligent sampling and hierarchical refinement. While the training process remains computationally intensive (requiring approximately 200 hours on 8 NVIDIA V100 GPUs), the resulting visual fidelity marks a significant step forward for exemplar-based synthesis. Future work may extend this framework to video-to-video translation and 3D-aware image synthesis.
Summary updated