RoNet: Rotation-oriented Continuous Image Translation

Yi Li, Xin Xie, Lina Lei, Haiyan Fu, Yanqing GuoarXiv 2024

TL;DR

This paper introduces RoNet, a novel approach for continuous image-to-image translation that moves beyond linear interpolation. By modeling style transitions as rotations within a learned plane, RoNet achieves smoother and more realistic transformations across diverse domains, particularly excelling in challenging scenarios like complex textures.

What Problem Does This Paper Address?

Image-to-image (I2I) translation aims to transform an image from a source domain to a target domain, often with the goal of generating a smooth sequence of intermediate images. Existing methods frequently rely on linear interpolation of features, models, or labels to achieve this continuity. However, this linear assumption breaks down when dealing with high-dimensional data, complex relationships between domains (like cyclic transitions), or when only limited domain examples are available. This can lead to artifacts, content leakage, and a lack of smooth transitions, especially in visually complex scenes. The paper addresses the limitations of linear interpolation by proposing a more flexible, rotation-based approach for continuous I2I translation.

Methods

RoNet introduces a novel rotation-oriented mechanism for continuous I2I translation. Instead of linear interpolation, it models the transition between styles as an in-plane rotation of the style representation.

Key components include:

  • Content and Style Disentanglement: A generator network explicitly separates image content (which remains invariant) from style (which changes during translation) using encoders $E_c$ and $E_s$.
  • Rotation Module: This module learns an optimal 2D plane to perform the rotation of the style vector. This plane is not predefined but learned end-to-end with the rest of the network. The rotation is mathematically described by projecting the style vector onto the learned plane, rotating it by a learned angle, and then reconstructing the rotated vector.
  • Patch-based Semantic Style Loss ($L_{sty}$): To handle challenging textures (like those in forests), this loss encourages realistic texture generation by matching patches from the target image with sampled patches from the generated image. It uses DINO-ViT to extract semantic style information from these patches.
  • VSA-Based Semantic Consistency ($L_{VSA}$): This loss uses Vector Symbolic Architectures (VSA) to preserve semantic consistency between the source and generated images, preventing semantic flipping.
  • Style Alignment Loss ($L_{mse}$): This loss ensures that the rotated style representation ($S_{rot}$) aligns well with the target domain's style representation ($S_{tgt}$), facilitating smooth transitions.
  • Reconstruction Loss ($L_{rec}$): A standard loss to ensure the generator can reconstruct the original image when given the source content and style.
  • Adversarial Loss ($L_{adv}$) and Content Loss ($L_{con}$): These are standard components for GAN-based image translation, ensuring visual realism and content preservation.

The training is weakly supervised, using images from distinct key domains rather than requiring a dense sequence of intermediate domain data.

Datasets

The paper evaluates RoNet on several datasets:

  • Season Album: A custom dataset collected from flickr.com for seasonal image translation (Spring, Summer, Autumn, Winter).
  • Comic Face: A dataset from kaggle.com for real face to comic portrait translation.
  • Waymo Open Dataset: Used for time-shifting tasks (Day, Dusk, Night, Dawn).
  • iPhone2dslr Flowers: A dataset for mapping iPhone images to DSLR images.

Key Insights and Ideas

  • Rotation as a Superior Alternative to Linear Interpolation: The core insight is that style transitions are not always linear. Modeling them as rotations in a learned plane offers a more flexible and powerful way to capture complex, cyclic, or non-linear relationships between domains.
  • Learned Rotation Plane: The ability to automatically learn the rotation plane is crucial. This allows the method to adapt to different domain relationships without manual specification, making it generalizable.
  • Patch-based Style Loss for Texture: The patch-based semantic style loss is a key innovation for handling complex textures. By focusing on local patch similarities, it effectively transfers fine-grained textural details, which is a significant challenge for many I2I methods.
  • Disentanglement for Control: The explicit disentanglement of content and style is fundamental, allowing the rotation of style without affecting the content, leading to more coherent transformations.
  • Weak Supervision for Practicality: The method's ability to learn from distinct domain images (rather than requiring dense intermediate data) makes it more practical for real-world scenarios where such data is scarce.

Key Results

  • Superior Visual Quality and Continuity: RoNet consistently produces more realistic and smoother continuous translations across various tasks, including seasonal shifts, time-shifting, and face stylization, outperforming state-of-the-art baselines.
  • Effective Texture Handling: The patch-based semantic style loss significantly improves the generation of realistic textures, as demonstrated in challenging forest scenes.
  • Quantitative Improvements: RoNet achieves the lowest FID, LPIPS, and KID scores across multiple datasets, indicating superior image quality and distribution matching compared to baselines. For instance, on the season album task, RoNet achieves a mean FID of 52.9, significantly lower than other methods.
  • High-Resolution Output: The model can generate high-resolution images (1024x1600 pixels), preserving intricate details.
  • Ablation Studies: The results show that each proposed component (rotation module, patch-based style loss, VSA loss, etc.) contributes significantly to the overall performance. Removing the rotation module, for example, necessitates reference style images and degrades performance.

Limitations and Future Work

  • Special Circumstances: The authors acknowledge that while RoNet is general, certain "special circumstances" in the world might require further consideration. For example, the natural uneven lengths of seasons (spring/summer longer than autumn/winter) or day/night cycles (day/night longer than dusk/dawn) are mentioned as areas where accounting for these specific temporal distributions could further enhance effectiveness.
  • Complex Manifolds: The paper suggests extending the method to study more complex manifolds in continuous translation for better generality, implying that the current rotation is a step towards handling non-linear relationships but more complex structures might exist.
  • Computational Cost: While not explicitly detailed as a limitation, the use of VGG and DINO-ViT encoders, along with adversarial training, suggests a potentially high computational cost for training.

Summary updated

Abstract

The generation of smooth and continuous images between domains has recently drawn much attention in image-to-image (I2I) translation. Linear relationship acts as the basic assumption in most existing approaches, while applied to different aspects including features, models or labels. However, the linear assumption is hard to conform with the element dimension increases and suffers from the limit that having to obtain both ends of the line. In this paper, we propose a novel rotation-oriented solution and model the continuous generation with an in-plane rotation over the style representation of an image, achieving a network named RoNet. A rotation module is implanted in the generation network to automatically learn the proper plane while disentangling the content and the style of an image. To encourage realistic texture, we also design a patch-based semantic style loss that learns the different styles of the similar object in different domains. We conduct experiments on forest scenes (where the complex texture makes the generation very challenging), faces, streetscapes and the iphone2dslr task. The results validate the superiority of our method in terms of visual quality and continuity.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Season Album (forest season shifting)RoNetFID52.9split: test · subset=forest season shifting · test_size=1,000 images per season · aggregation=mean across Spring, Summer, Autumn, and Winter
Source quote
L297: RoNet │ 55.7 │ 43.3 │ 57.1 │ 55.7 │ 52.9 │ 0.265 │ 0.238 │ 0.256 │ 0.176 │ 0.234 │ 36.8 │ 20.5 │ 27.8 │ 26.2 │ 27.8
Season Album (forest season shifting)RoNetLPIPS0.234split: test · subset=forest season shifting · test_size=1,000 images per season · aggregation=mean across Spring, Summer, Autumn, and Winter
Source quote
L297: RoNet │ 55.7 │ 43.3 │ 57.1 │ 55.7 │ 52.9 │ 0.265 │ 0.238 │ 0.256 │ 0.176 │ 0.234 │ 36.8 │ 20.5 │ 27.8 │ 26.2 │ 27.8
BibTeX
@misc{li2024ronet,
  author = {Yi Li and Xin Xie and Lina Lei and Haiyan Fu and Yanqing Guo},
  title = {{RoNet: Rotation-oriented Continuous Image Translation}},
  year = {2024},
  eprint = {2404.04474},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.04474},
}
Figure