Large Language Models for Captioning and Retrieving Remote Sensing Images

João Daniel Silva, João Magalhães, Devis Tuia, Bruno MartinsarXiv 2024 · DOI

Abstract

Remote sensing (RS) image interpretation faces unique challenges due to nadir perspectives and limited annotated data. We present RS-CapRet, a framework that integrates Large Language Models (LLMs) with RS imagery for advanced captioning and cross-modal retrieval. By leveraging a frozen LLaMA-2 model and a specialized CLIP vision encoder connected via simple linear projections, RS-CapRet achieves state-of-the-art performance on major benchmarks and demonstrates emergent reasoning capabilities.

Introduction

Vision-Language (V&L) tasks in the Remote Sensing domain, such as generating descriptive captions for satellite imagery or retrieving images based on natural language queries, are critical for earth observation. However, the domain suffers from a significant gap between general-purpose AI models and the specific requirements of overhead imagery. RS-CapRet addresses this by bridging powerful pre-trained LLMs with domain-specific visual encoders.

Problem Statement

The authors identify three primary obstacles in RS V&L tasks:

  1. Perspective & Scale: The nadir (overhead) view in RS images differs fundamentally from the ground-level perspective of standard computer vision datasets.
  2. Data Scarcity: RS image-caption datasets are significantly smaller than general-domain counterparts like COCO, hindering the training of large-scale models from scratch.
  3. Architectural Lag: Current RS models often rely on outdated CNN-LSTM architectures, failing to exploit the reasoning and zero-shot potential of modern LLMs.

Methodology

RS-CapRet employs a parameter-efficient design to integrate visual information into a pre-trained LLM.

Overview of the RS-CapRet framework including CLIP finetuning, image captioning, and text-image retrieval components.

Architecture Components

  • Vision Backbone: A CLIP (ViT-L/14) encoder is first fine-tuned on an aggregate of RS datasets to capture satellite-specific features.
  • Language Model: LLaMA-2-7B serves as the core decoder. To maintain efficiency, its weights remain frozen during training.
  • The Bridge: A trainable linear layer projects visual embeddings from the CLIP encoder into the LLM’s input space, treating the image as a sequence of visual tokens.
  • Retrieval Mechanism: A special [RET] token is introduced. Contrastive learning (InfoNCE loss) aligns the LLM’s representation of this token with image embeddings in a shared space.

Joint Training

The model is trained simultaneously on two objectives: captioning (next-token prediction) and retrieval (matching the [RET] token to the corresponding image).

Datasets and Evaluation

The study utilizes several key RS benchmarks, including NWPU-Captions (31,500 images) and RSICD (10,921 images). To provide a more robust training signal, the authors created Cap-4, an aggregate dataset of approximately 45,000 images and 225,000 captions by combining NWPU, RSICD, UCM-Captions, and Sydney-Captions.

Key Results and Insights

RS-CapRet demonstrates that simplicity in architecture—specifically a single linear projection—is sufficient when paired with a powerful LLM.

  • State-of-the-Art Captioning: On NWPU-Captions, the model achieved a CIDEr score of 1.919, significantly outperforming the previous baseline of 1.164.
  • Competitive Retrieval: The model reached an R@1 of 15.52 on the UCM dataset, surpassing several specialized retrieval models.
  • Emergent Capabilities: The model exhibits in-context learning, allowing it to correct its logic based on few-shot examples. It also integrates world knowledge, successfully handling abstract queries like "perfect spot for camping" by associating them with relevant visual features like lakes and forests.

Conclusion and Future Work

RS-CapRet successfully bridges the gap between LLMs and remote sensing. While the model shows promise in multi-modal dialogue, future work will focus on improving robustness in conversational settings and extending capabilities to Visual Question Answering (VQA) and Visual Grounding. These advancements aim to create a comprehensive AI assistant for Earth Observation tasks.

Summary updated

BibTeX
@misc{silva2024large,
  author = {João Daniel Silva and João Magalhães and Devis Tuia and Bruno Martins},
  title = {{Large Language Models for Captioning and Retrieving Remote Sensing Images}},
  year = {2024},
  eprint = {2402.06475},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.06475},
}
Figure