Diff-Tracker: Text-to-Image Diffusion Models are Unsupervised Trackers

Zhengbo Zhang, Li Xu, Duo Peng, Hossein Rahmani, Jun Liu

Abstract

Visual object tracking typically relies on extensive human-annotated datasets, which are costly to produce. This paper introduces Diff-Tracker, a novel unsupervised tracking framework that leverages the rich semantic priors embedded within pre-trained text-to-image diffusion models. By treating a tracking target as a visual prompt and optimizing its embedding to activate specific cross-attention maps, Diff-Tracker achieves robust tracking without manual labels. We introduce an attention harmonization module to refine target boundaries and an online prompt updater to handle appearance changes and motion. Experimental results across multiple benchmarks, including VOT2018 and TrackingNet, demonstrate that Diff-Tracker achieves state-of-the-art performance for unsupervised trackers and remains competitive with supervised alternatives.

Introduction

Visual object tracking (VOT) is a fundamental task in computer vision, requiring the continuous localization of a target object throughout a video sequence. While supervised learning has significantly advanced the state-of-the-art, the dependency on large-scale annotated datasets like GOT-10k and LaSOT presents a bottleneck. Unsupervised tracking offers a promising alternative by learning from raw video data, yet it struggles with distinguishing targets from complex backgrounds and handling significant appearance variations.

Recent advances in generative AI, specifically diffusion models like Stable Diffusion, have shown that these models internalize deep semantic and structural knowledge during their massive-scale pre-training. Diff-Tracker proposes to "mine" this knowledge for tracking. Instead of training a tracker from scratch, we repurpose the cross-attention mechanism of a frozen diffusion model to identify and follow objects based on learned "visual prompts."

Methods

The Diff-Tracker framework operates by finding a latent representation (a prompt embedding) that corresponds to the target object in the diffusion model's feature space. The system is composed of three primary modules: the Initial Prompt Learner, Attention Harmonization, and the Online Prompt Updater.

Overview of the Diff-Tracker framework, showing the prompt optimization and dynamic update process.

Initial Prompt Learner

Given a target bounding box in the first frame ($f_1$), the Initial Prompt Learner optimizes a prompt embedding $p_1$. The goal is to minimize the loss between the diffusion model's cross-attention map and a ground-truth (GT) mask derived from the bounding box. This process "teaches" the model which semantic features correspond to the target.

Attention Harmonization

To improve localization accuracy, Diff-Tracker employs Attention Harmonization. While cross-attention maps ($M_c$) link the prompt to specific image regions, they can be coarse. By integrating self-attention maps ($M_s$), which capture pixel-to-pixel relationships, the model generates an enhanced cross-attention map ($M'_c$). This harmonization helps the tracker better distinguish the target's boundaries from its immediate background, reducing drift.

Online Prompt Updater

As the target moves and its appearance changes (due to rotation, lighting, or occlusion), the initial prompt $p_1$ may become obsolete. The Online Prompt Updater dynamically adjusts the prompt embedding. It utilizes a motion information extractor that processes both short-term (consecutive frames) and long-term (historical frames) temporal data. A "Blend Head" ($\mathcal{H}_b$) then combines the previous prompt $p_{k-1}$ with new motion features to produce the updated prompt $p_k$ for the current frame.

Experiments and Results

Diff-Tracker was trained using pseudo-labels generated via optical flow on datasets including GOT-10k, ImageNet VID, LaSOT, and YouTube-VOS. The pre-trained diffusion model (UNet) remains frozen throughout, ensuring that the tracking capability is derived from its existing generative priors.

Performance Benchmarks

The model was evaluated on five major tracking benchmarks:

  • VOT2018: Diff-Tracker achieved an Expected Average Overlap (EAO) of 0.365, surpassing the previous unsupervised leader, ULAST (0.355).
  • TrackingNet: It reached a success score of 0.675, a significant improvement over USOT (0.616).
  • OTB2015 & LaSOT: The model showed robust performance in both short-term and long-term tracking scenarios, demonstrating its ability to handle diverse challenges like occlusion and scale variation.

Comparison with Supervised Trackers

Notably, Diff-Tracker's performance is competitive with established supervised trackers. For instance, its results on TrackingNet and VOT2018 approach the performance levels of models like SiamFC and ATOM, which were trained on millions of labeled frames. This highlights the effectiveness of using generative models as semantic priors for discriminative tasks.

Key Insights

  1. Generative Models as Semantic Priors: The internal representations of diffusion models are highly effective for zero-shot or unsupervised localization tasks.
  2. Prompt-based Tracking: Treating a target as a "visual prompt" allows for a flexible and efficient way to define tracking targets without architectural changes to the backbone.
  3. Temporal Continuity: The integration of short-term and long-term motion information is crucial for maintaining tracking stability in unsupervised settings.

Conclusion and Future Work

Diff-Tracker demonstrates that pre-trained text-to-image diffusion models can be successfully repurposed as high-performance unsupervised trackers. By optimizing and dynamically updating visual prompts, the framework achieves state-of-the-art unsupervised results. Future work will focus on reducing the computational overhead associated with diffusion models to enable real-time tracking and exploring video-specific diffusion models to further enhance temporal consistency.

Summary updated

BibTeX
@inproceedings{zhang2024diff,
  author = {Zhengbo Zhang and Li Xu and Duo Peng and Hossein Rahmani and Jun Liu},
  title = {{Diff-Tracker: Text-to-Image Diffusion Models are Unsupervised Trackers}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73390-1\_19},
}
Figure