OneDiff: A Generalist Model for Image Difference Captioning

Erdong Hu, Longteng Guo, Tongtian Yue, Zijia Zhao, Shuning Xue, Jing Liu

Abstract

Image Difference Captioning (IDC) is the challenging task of describing semantic discrepancies between two similar images. Traditional approaches have relied on task-specific "specialist" models that lack flexibility and fail to generalize to real-world scenarios. We present OneDiff, a generalist vision-language model that leverages a novel Visual Delta Module (VDM) and a massive hybrid dataset, DiffCap, to achieve state-of-the-art performance. OneDiff demonstrates a staggering 97-point CIDEr improvement over previous models, proving that a single generalist architecture can outperform narrow specialists in fine-grained visual reasoning.

The Challenge of Image Difference Captioning

Identifying and describing differences between two images—such as a car changing color or a person appearing in a background—is surprisingly difficult for AI. It requires a model to ignore the vast majority of shared visual information and focus exclusively on granular discrepancies. Until now, high-quality IDC data has been scarce because human-annotated "before and after" descriptions are expensive to produce, leading to models that are over-fitted to specific synthetic or surveillance datasets.

The OneDiff Architecture

OneDiff is built upon Large Vision-Language Models (LVLMs) with several core innovations designed to capture subtle visual shifts:

  • Siamese Image Encoder: A shared CLIP-ViT-L/14 backbone processes both images independently before fusing their representations.
  • Visual Delta Module (VDM): This module uses learnable "delta tokens" that probe multiple intermediate layers of the vision encoder (specifically layers 8, 16, and 24). This allows the model to capture differences at various levels of abstraction, from low-level texture changes to high-level semantic shifts.
  • Coupled Sample Training (CST): To mitigate the lack of paired data during pre-training, the authors used standard single-image-caption pairs concatenated to create "pseudo" dual-image samples. This teaches the model the basic logic of handling two inputs before it encounters real difference tasks.

The DiffCap Dataset

To provide the necessary scale and variety for a generalist model, the researchers introduced the DiffCap Dataset, a collection of 363k entries:

  1. Task-Specific Collection: Aggregated existing benchmarks like Spot-the-Diff and CLEVR-Change.
  2. Real-World Retrieval: 53k pairs of similar images from the LAION-5B database, with differences articulated by ChatGPT.
  3. Synthetic Data: 139k pairs generated using image-editing tools (InstructPix2Pix), providing perfectly defined ground-truth differences.
Examples of the diverse data types included in the DiffCap dataset, ranging from synthetic blocks to real-world photography.

Key Results and Performance

OneDiff set new state-of-the-art (SOTA) records across all major IDC benchmarks. Most notably, on the Image-Editing-Request benchmark, it achieved a CIDEr score of 109.6, more than triple the previous SOTA of 35.7. It also saw significant gains on Spot-the-Diff (improving from 47.4 to 56.6) and Birds-to-Words.

Qualitatively, the model produces much more descriptive and accurate captions than previous methods, which often hallucinated details or provided overly generic descriptions.

Qualitative comparison showing OneDiff correctly identifying specific changes where other models provide generic or incorrect descriptions.

Conclusion and Future Work

OneDiff's success suggests that visual differences are multi-level and that IDC is better solved through broad visual-linguistic reasoning than through narrow engineering. While the model can still be confused in highly complex or cluttered scenes, future work involving explicit "grounding" mechanisms could help the model point to exactly where a change occurred. This generalist approach holds promise for specialized fields such as medical anomaly detection and satellite change monitoring.

Summary updated

BibTeX
@inproceedings{hu2024onediff,
  author = {Erdong Hu and Longteng Guo and Tongtian Yue and Zijia Zhao and Shuning Xue and Jing Liu},
  title = {{OneDiff: A Generalist Model for Image Difference Captioning}},
  booktitle = {ACCV},
  year = {2024},
  doi = {10.1007/978-981-96-0908-6\_7},
}
Figure