SmallCap: Lightweight Image Captioning Prompted with Retrieval Augmentation

Rita Ramos, Bruno Martins, Desmond Elliott, Yova Kementchedjhieva
9/30/2022
cs.CVcs.CL

Official code: RitaRamo/smallcap (128 stars, Jupyter Notebook, last commit 2024-02-13).

Abstract

Recent advances in image captioning have focused on scaling the data and model size, substantially increasing the cost of pre-training and finetuning. As an alternative to large models, we present SmallCap, which generates a caption conditioned on an input image and related captions retrieved from a datastore.

Show full abstract

Our model is lightweight and fast to train, as the only learned parameters are in newly introduced cross-attention layers between a pre-trained CLIP encoder and GPT-2 decoder. SmallCap can transfer to new domains without additional finetuning and can exploit large-scale data in a training-free fashion since the contents of the datastore can be readily replaced. Our experiments show that SmallCap, trained only on COCO, has competitive performance on this benchmark, and also transfers to other domains without retraining, solely through retrieval from target-domain data. Further improvement is achieved through the training-free exploitation of diverse human-labeled and web data, which proves to be effective for a range of domains, including the nocaps benchmark, designed to test generalization to unseen visual concepts.

View on arXivView PDF

Code Implementations(1)

RitaRamo/smallcapOfficial100%

SmallCap: Lightweight Image Captioning Prompted with Retrieval Augmentation

12825Jupyter Notebook, PythonSep 29, 20222 years ago

Similar Papers

Cite this paper

@article{ramos2022smallcap,
  title  = {SmallCap: Lightweight Image Captioning Prompted with Retrieval Augmentation},
  author = {Rita Ramos and Bruno Martins and Desmond Elliott and Yova Kementchedjhieva},
  year   = {2022},
  eprint = {2209.15323},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2209.15323}
}

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

Discussion