ZeroCap: Zero-Shot Image-to-Text Generation for Visual-Semantic Arithmetic

Yoad Tewel, Yoav Shalev, Idan Schwartz, Lior Wolf
11/29/2021
cs.CVcs.AIcs.CL

Official code: YoadTew/zero-shot-image-to-text (278 stars, Python, last commit 2022-09-17).

Abstract

Recent text-to-image matching models apply contrastive learning to large corpora of uncurated pairs of images and sentences. While such models can provide a powerful score for matching and subsequent zero-shot tasks, they are not capable of generating caption given an image.

Show full abstract

In this work, we repurpose such models to generate a descriptive text given an image at inference time, without any further training or tuning steps. This is done by combining the visual-semantic model with a large language model, benefiting from the knowledge in both web-scale models. The resulting captions are much less restrictive than those obtained by supervised captioning methods. Moreover, as a zero-shot learning method, it is extremely flexible and we demonstrate its ability to perform image arithmetic in which the inputs can be either images or text, and the output is a sentence. This enables novel high-level vision capabilities such as comparing two images or solving visual analogy tests. Our code is available at: https://github.com/YoadTew/zero-shot-image-to-text.

View on arXivView PDF

Code Implementations(1)

Implementation of Zero-Shot Image-to-Text Generation for Visual-Semantic Arithmetic

27843PythonNov 26, 20214 years ago

Similar Papers

Cite this paper

@article{tewel2021zerocap,
  title  = {ZeroCap: Zero-Shot Image-to-Text Generation for Visual-Semantic Arithmetic},
  author = {Yoad Tewel and Yoav Shalev and Idan Schwartz and Lior Wolf},
  year   = {2021},
  eprint = {2111.14447},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.14447}
}

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.14447.svg)](https://codeofpaper.com/paper/2111.14447)

Discussion