Contrastive Feature Loss for Image Prediction

Alex Andonian, Taesung Park, Bryan Russell, Phillip Isola, Jun-Yan Zhu +1 more
11/12/2021
cs.CVcs.LG

Official code: alexandonian/contrastive-feature-loss (55 stars, Python, last commit 2021-11-19).

Abstract

Training supervised image synthesis models requires a critic to compare two images: the ground truth to the result. Yet, this basic functionality remains an open problem.

Show full abstract

A popular line of approaches uses the L1 (mean absolute error) loss, either in the pixel or the feature space of pretrained deep networks. However, we observe that these losses tend to produce overly blurry and grey images, and other techniques such as GANs need to be employed to fight these artifacts. In this work, we introduce an information theory based approach to measuring similarity between two images. We argue that a good reconstruction should have high mutual information with the ground truth. This view enables learning a lightweight critic to "calibrate" a feature space in a contrastive manner, such that reconstructions of corresponding spatial patches are brought together, while other patches are repulsed. We show that our formulation immediately boosts the perceptual realism of output images when used as a drop-in replacement for the L1 loss, with or without an additional GAN loss.

View on arXivView PDF

Code Implementations(1)

PyTorch implementation of Contrastive Feature Loss for Image Prediction (AIM Workshop at ICCV 2021)

552PythonOct 19, 20215 years agoNOASSERTION

Similar Papers

Cite this paper

@article{andonian2021contrastive,
  title  = {Contrastive Feature Loss for Image Prediction},
  author = {Alex Andonian and Taesung Park and Bryan Russell and Phillip Isola and Jun-Yan Zhu and Richard Zhang},
  year   = {2021},
  eprint = {2111.06934},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.06934}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2111.06934.svg)](https://codeofpaper.com/paper/2111.06934)

Discussion