Structural Analogy from a Single Image Pair

Saguy Benaim, Ron Mokady, Amit Bermano, Lior Wolf · DOI

TL;DR

This paper introduces a novel method for unsupervised image-to-image translation using only a single pair of images. It achieves "structural analogies" by learning to map the spatial arrangement of features from one image to another, allowing for transformations that go beyond simple style transfer to alter object structure and geometry. This opens up new possibilities for image manipulation with minimal supervision.

What Problem Does This Paper Address?

Traditional image-to-image translation methods typically require large, paired datasets (e.g., exact same scene captured in two different styles) or large collections of unpaired images from two distinct domains. While recent advancements have enabled translation with unpaired data, they still rely on vast datasets and primarily focus on altering appearance (style, texture, color) while preserving the underlying structure. The challenge this paper addresses is how to perform image-to-image translation and achieve structural alignment using only a single pair of images, where the goal is to generate an image that retains the style of one image but adopts the structural arrangement of the other, even if the objects themselves are different.

Methods

The core of the proposed method lies in learning "structural analogies" by mapping between image patches at different scales. This is achieved through a multi-scale generative adversarial network (GAN) architecture.

  • Multi-Scale Patch Distribution Matching: The method learns to match the internal patch distributions of two images (A and B) across multiple scales. This means that for each scale, the spatial arrangement of patches in image A is mapped to the corresponding arrangement in image B.
  • Hierarchical Generation: The process starts at the coarsest scale and progressively moves to finer scales. At each scale, a generator network produces an image, and a discriminator network ensures it belongs to the target domain's distribution.
  • Residual Training: For initial scales (controlled by a hyperparameter K), residual training is used. This encourages the generator to add only the necessary details to preserve alignment and structure, rather than generating entirely new content.
  • Cycle Consistency: A cycle consistency loss is employed to ensure that translating from A to B and then back to A (or vice versa) results in the original image, enforcing alignment.
  • Inference and Refinement: At inference time, a specific "injection scale" (S) is chosen to introduce the source image into the generation pipeline. An optional refinement step can further enhance the quality of the generated image.

Datasets

The paper does not introduce new datasets. It evaluates its method on image pairs collected from:

  • Berkeley Segmentation Database (BSDS)
  • Places dataset
  • The web

Key Insights and Ideas

  • Structural Analogy is Possible with a Single Pair: The most significant insight is demonstrating that meaningful structural analogies can be learned from just one pair of images, challenging the assumption that large datasets are always necessary for complex image manipulation.
  • Multi-Scale Patch Statistics Capture Structure: The paper highlights that by analyzing and mapping patch distributions across multiple scales, the method can capture and transfer not just style but also the underlying geometric structure and object arrangements.
  • Controlled Granularity of Analogy: The multi-scale approach allows for control over the granularity of the analogy. Smaller scales focus on texture and fine details (similar to style transfer), while larger scales influence object placement and overall scene structure.
  • Bridging Content and Style: The method effectively bridges the gap between content and style transfer by enabling changes in object geometry and structure, a limitation of many previous content-style disentanglement approaches.

Key Results

  • Structural Alignment: The method achieves strong structural alignment, outperforming baselines like Deep Image Analogy (DIA), SinGAN, and CycleGAN in qualitative evaluations on various image pairs, including objects with different shapes and natural scenes.
  • Realism: User studies show that the generated images are perceived as realistic, with the proposed method achieving higher mean opinion scores for realism compared to several baselines.
  • Guided Image Synthesis: The method successfully translates sketches into realistic images, preserving structure without requiring explicit semantic labels.
  • Style and Texture Transfer: It demonstrates comparable or superior performance to existing methods in style and texture transfer tasks.
  • Text Translation: The approach shows promise in text translation, where style is embedded in geometry, outperforming several baselines.
  • Quantitative Metrics: The paper reports quantitative results using SIFID (for realism) and user studies for alignment, showing competitive performance. For structural alignment, the method achieved an alignment score of 83.4% in user studies, compared to DIA's 85.0% but with significantly higher realism.

Limitations and Future Work

  • Lack of Semantic Understanding: The paper acknowledges that since it only uses a single pair of images without additional semantic guidance, it lacks a deep understanding of the world. This can lead to failures when the target domain requires complex semantic manipulation (e.g., mapping a cat to a tiger where eye count is crucial but not explicitly learned).
  • Failure Cases: Specific failure cases are illustrated, such as when the target domain has different semantic properties (e.g., mapping a cat to a tiger where eye count is not preserved).
  • Future Work: The authors suggest exploring the method for other conditional generation tasks that traditionally require costly supervision, such as one-shot semantic segmentation. They also mention the potential for improving results by using more iterations during training and exploring different inference strategies.

Summary updated

BibTeX
@article{benaim2021structural,
  author = {Saguy Benaim and Ron Mokady and Amit Bermano and Lior Wolf},
  title = {{Structural Analogy from a Single Image Pair}},
  journal = {Computer Graphics Forum},
  year = {2021},
  doi = {10.1111/cgf.14186},
}
Figure