Impression Space from Deep Template Network

Gongfan Fang, Xinchao Wang, Haofei Zhang, Jie Song, Mingli SongarXiv 2020

Abstract

It is an innate ability for humans to imagine something only according to their impression, without having to memorize all the details of what they have seen. In this work, we would like to demonstrate that a trained convolutional network also has the capability to "remember" its input images. To achieve this, we propose a simple but powerful framework to establish an Impression Space upon an off-the-shelf pretrained network. This network is referred to as the Template Network because its filters will be used as templates to reconstruct images from the impression. In our framework, the impression space and image space are bridged by a layer-wise encoding and iterative decoding process. It turns out that the impression space indeed captures the salient features from images, and it can be directly applied to tasks such as unpaired image translation and image synthesis through impression matching without further network training. Furthermore, the impression naturally constructs a high-level common space for different data. Based on this, we propose a mechanism to model the data relations inside the impression space, which is able to reveal the feature similarity between images.

Introduction

Traditional generative models, such as Generative Adversarial Networks (GANs), are typically domain-specific and require massive datasets and extensive training for every new task. If a model is trained to generate zebras, it cannot generate cars without a complete retraining cycle. This research addresses a provocative question: Can we build a universal image synthesizer that requires zero retraining for new tasks?

By looking toward human intuition—where we retain an "impression" rather than a pixel-perfect memory—the authors demonstrate that standard, off-the-shelf image classifiers (like those trained on ImageNet) already function as dictionaries of visual patterns. These patterns can be run in reverse to synthesize images, effectively turning a classifier into a universal generator.

The Impression Space Framework

The researchers introduce a framework consisting of a Template Network and an Impression Space.

  1. Template Network: A standard pretrained classifier (e.g., ResNet-50) is utilized. The convolutional filters within this network are treated as "templates" for visual features.
  2. Encoding (The Impression): To "remember" an image, it is passed through the network to calculate the channel-wise mean and variance of intermediate feature maps. This condensed vector, the "Impression Code," captures the essence of the image without storing every pixel.
  3. Decoding (Synthesis): To reconstruct an image from an impression, the process begins with random noise. An optimization process (using the Adam optimizer) iteratively tweaks the noise until its own Impression Code matches the target code.
The Impression Space framework: from input images to encoding in the Template Network, and subsequent applications like 1-shot synthesis and translation.

Applications and Key Results

Because the Template Network is pretrained on a massive variety of objects (ImageNet), it can synthesize or translate images it has never seen before without additional training.

  • One-Shot Synthesis: The model can generate diverse variations of specific objects from just a single input image.
  • Unpaired Image Translation: By averaging the impression codes of a target dataset (e.g., many photos of oranges), the model filters out backgrounds to keep only the "salient" features. This allows for translations like Apple-to-Orange by shifting the input's impression toward the target domain's average.
  • Universal Synthesis: The framework generalizes to datasets outside the original training domain, such as street scenes (CamVid) and indoor environments (NYUv2).
Qualitative comparison between real images and synthesized results on the NYUv2 and CamVid datasets, demonstrating the framework's universal synthesis capability.

Quantitatively, the "Ours-OneShot" method achieved a Fréchet Inception Distance (FID) of 28.0 on ImageNet, which is competitive with some fully trained generative models. Furthermore, using "Impression Distance" to select unlabeled data for model compression achieved 93.71% accuracy on CIFAR-10, significantly outperforming random selection (87.02%).

Conclusion and Limitations

This work proves that classifiers are secretly powerful generators. The Impression Space offers a zero-training advantage, working instantly via optimization rather than days of GPU training. However, the method currently requires at least one real-world reference image to create an impression, and the iterative optimization process is slower at inference time than a standard forward-pass GAN. Future work may further explore the relationship between classifier architectures and generative efficiency to refine these universal synthesizers.

Summary updated

BibTeX
@misc{fang2020impression,
  author = {Gongfan Fang and Xinchao Wang and Haofei Zhang and Jie Song and Mingli Song},
  title = {{Impression Space from Deep Template Network}},
  year = {2020},
  eprint = {2007.05441},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.05441},
}
Figure