# Is ImageNet worth 1 video? Learning strong image encoders from 1 long unlabelled video

Shashanka Venkataramanan, Mamshad Nayeem Rizve, João Carreira, Yuki Asano, Yannis Avrithis

► To cite this version:

Shashanka Venkataramanan, Mamshad Nayeem Rizve, João Carreira, Yuki Asano, Yannis Avrithis. Is ImageNet worth 1 video? Learning strong image encoders from 1 long unlabelled video. ICLR 2024 - Twelfth International Conference on Learning Representations, May 2024, Vienna, Austria. pp.1-21. hal-04407117v2

HAL Id: hal-04407117

https://inria.hal.science/hal-04407117v2

Submitted on 22 Jan 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# IS IMAGENET WORTH 1 VIDEO? LEARNING STRONG IMAGE ENCODERS FROM 1 LONG UNLABELLED VIDEO

**Shashanka Venkataramanan**
Inria, Univ Rennes, CNRS, IRISA

**Mamshad Nayeem Rizve**
University of Central Florida

**João Carreira**
Google DeepMind

**Yuki M. Asano***
University of Amsterdam

**Yannis Avrithis***
Institute of Advanced Research
on Artificial Intelligence (IARAI)

## ABSTRACT

Self-supervised learning has unlocked the potential of scaling up pretraining to billions of images, since annotation is unnecessary. But are we making the best use of data? How more economical can we be? In this work, we attempt to answer this question by making two contributions. First, we investigate first-person videos and introduce a “Walking Tours” dataset. These videos are high-resolution, hours-long, captured in a single uninterrupted take, depicting a large number of objects and actions with natural scene transitions. They are unlabeled and uncurated, thus realistic for self-supervision and comparable with human learning.

Second, we introduce a novel self-supervised image pretraining method tailored for learning from continuous videos. Existing methods typically adapt image-based pretraining approaches to incorporate more frames. Instead, we advocate a “tracking to learn to recognize” approach. Our method called DORA, leads to attention maps that Discover and tRAck objects over time in an end-to-end manner, using transformer cross-attention. We derive multiple views from the tracks and use them in a classical self-supervised distillation loss. Using our novel approach, a single Walking Tours video remarkably becomes a strong competitor to ImageNet for several image and video downstream tasks. Dataset and code can be found at https://shashankvkt.github.io/dora

## 1 INTRODUCTION

*(To the question “Have you read all the books in here?”)*
No, only four of them. But I read those very, very carefully.

Jacques Derrida

Learning from large scale datasets has been at the core of great progress. In particular, the field of self-supervised learning has allowed pretraining of neural networks to scale beyond the size of labelled datasets. By avoiding costly annotation, strong performance has been demonstrated by increasing the training dataset sizes into billions of images.

But how well are those images really used? At a rate of one image per second, a dataset of 1B images would take 317 years to watch. Yet, humans develop functioning visual systems *much faster i.e.* face recognition (de Haan et al., 2001) and color sensitivity (Adams, 1987) is developed in three months, depth perception in five months (Campos et al., 1978) and visual acuity in six months (Sokol, 1978). Besides potential genetic visual priors in humans, one stark difference is the *type* of data. Humans observe their visual surroundings in one continuous stream, only interrupted by sleep. Indeed, learning visual representations of images from videos is not new. However, previous works have found significant gaps in performance to image-pretrained models. They have mostly used object-centric videos scraped from the internet, and adapted image-based pretraining methods to use different frames as an extra form of data augmentation (Gordon et al., 2020; Parthasarathy et al., 2023).

<footnote>*Equal last authors. Order determined randomly</footnote>
<figure><img src="image_2.png" /><figcaption>Figure 1: *Examples of frames from the Walking Tours dataset*, containing hours-long, continuous egocentric 4K videos from urban scenes in different cities, under CC-BY license. There are a large number of objects and actions in a variety and natural transition of places, *e.g.* residential area, park, market, waterfront, *etc.*, with natural transition of lighting conditions and object augmentations.</figcaption></figure>

In this work, we investigate two directions. First, in the direction of *data*, we introduce a new dataset of open-source first-person videos, recorded for the purpose of virtual “walking tours”, inspired by (Wiles et al., 2022). These videos have several advantages. Not only are the individual frames dense in semantic categories – much more so than movies, as we analyze – but these videos also directly represent the viewpoint of a human, contain few or no shot cuts nor special effects and are long (1-3h). Another benefit is their transparency: indeed, one can watch the whole dataset in one setting. The dataset we create contains 10 Walking Tours (WT) videos with CC-BY license.

Second, in the direction of the *method*, we develop a new self-supervised image-pretraining method that is uniquely suited for learning from natural, non-object-centric videos. Our approach is inspired by observing toddlers first learn to track objects and animals, then to recognize and differentiate them (Bomba & Siqueland, 1983; Quinn et al., 1993; Spelke & Kinzler, 2007). Our method, called DORA, is an end-to-end training approach that “tracks to learn to recognize”: given a video clip, objects in an initial frame are implicitly *Discovered* and *tRAcked* across time. The tracked objects are incentivized to be diverse by introducing a Sinkhorn-Knopp clustering of patch embeddings; the tracked instances are used as a learning signal for a classical multi-view SSL loss.

Surprisingly, contrary to previous works, we find that our novel method obtains ImageNet-level performances by training on a single WT video, as evidenced by performances on segmentation and object detection downstream tasks. While humorously intentioned, Derrida's quote rings true to this finding and our results give some hope for alternative directions in SSL that depart from blind dataset scaling towards more efficient and smarter use of existing video data.

To summarize, our key contributions in this work are as follows:

1. We introduce a new dataset of 10 WT videos, with single-video and mixed-video splits. The latter is conveniently equal in size to ImageNet. We analyze their usefulness compared to existing video and image datasets.

2. We propose a new end-to-end self-supervised visual pretraining method called DORA. It builds upon DINO but is tailored to promote tracking of multiple objects across frames. We use it to learn strong image encoders and trace the source of its improvements through extensive ablations.

3. We obtain strong performance on ADE20k segmentation and MS COCO detection, outperforming ImageNet-pretrained DINO, while instead pretraining on a single long video.

## 2 RELATED WORK

Self-supervised learning of image encoders from video data is a very active area of research. Video, and more generally temporal streams, have long been theorized to be ideal signals for unsupervised learning (Wiskott & Sejnowski, 2002). In computer vision, early methods have been very diverse and included pretext tasks such as egomotion prediction (Agrawal et al., 2015; Jayaraman & Grauman, 2015), active recognition (Jayaraman & Grauman, 2016), pose estimation (Chakraborty & Namboodiri, 2017), unsupervised object discovery (Croitoru et al., 2017), dense prediction (Pathak et al., 2017; Li et al., 2019), optical flow (Mahendran et al., 2018; Xiong et al., 2021), frame order prediction (Misra et al., 2016), view-point matching (Sermanet et al., 2018; Pirk et al., 2020) or learning visual correspondences (Wang et al., 2019).

More recently, there have been considerable advances in self-supervised learning using ImageNet, with the main theme being extracting multiple augmentations of an image (Chen et al., 2020; Caron
<table><caption>Table 1: *Walking Tours* vs. *existing video datasets*. EGO: egocentric; PRE: used for pretraining; BAL: class balance control; ANNOT: annotation type; Weak: associated data per clip (text or other modality); Class: class label per frame or clip; Loc: localization per frame (e.g. bounding box, segmentation, mask 3D pose). AVG. DUR: average duration per video; DUR: total duration.</caption><thead><tr><th>DATASET</th><th>DOMAIN</th><th>EGO</th><th>PRE</th><th>BAL</th><th>ANNOT</th><th>AVG. DUR (SEC)</th><th>DUR (HR)</th><th>#VIDEOS</th><th>FRAME RESOLUTION</th></tr></thead><tbody><tr><td colspan="10" style="text-align: center; font-weight: bold;">Diverse Pretraining</td></tr><tr><td>Kinetics-400 (Kay et al., 2017)</td><td>Actions</td><td>✗</td><td>✓</td><td>✓</td><td style="color: red;">Class</td><td>10.2</td><td>851</td><td>400</td><td>340 × 255</td></tr><tr><td>AVA (Gu et al., 2018)</td><td>Actions</td><td>✗</td><td>✓</td><td>✓</td><td style="color: red;">Class</td><td>900</td><td>107.5</td><td>80</td><td>320 × 400</td></tr><tr><td>WebVid-2M (Bain et al., 2021)</td><td>Open</td><td>✗</td><td>✓</td><td>✗</td><td style="color: red;">Weak</td><td>18</td><td>13k</td><td>–</td><td>320 × 240</td></tr><tr><td>HowTo100M (Miech et al., 2019)</td><td>Instructions</td><td>✗</td><td>✓</td><td>✗</td><td style="color: red;">Weak</td><td>4</td><td>135k</td><td>–</td><td>–</td></tr><tr><td colspan="10" style="text-align: center; font-weight: bold;">Egocentric</td></tr><tr><td>Epic-Kitchens (Damen et al., 2022)</td><td>Cooking</td><td>✓</td><td>✗</td><td>✗</td><td style="color: red;">Loc.</td><td>510</td><td>100</td><td>37</td><td>1920 × 1080</td></tr><tr><td>Ego-4D (Grauman et al., 2022)</td><td>Daily</td><td>✓</td><td>✗</td><td>✗</td><td style="color: red;">Loc.</td><td>1446</td><td>120</td><td>931</td><td>1920 × 1080</td></tr><tr><td>Meccano (Ragusa et al., 2023)</td><td>Industry</td><td>✓</td><td>✗</td><td>✗</td><td style="color: red;">Loc.</td><td>1247</td><td>849</td><td>20</td><td>1920 × 1080</td></tr><tr><td>Assembly-101 (Sener et al., 2022)</td><td>Assembly</td><td>✓</td><td>✗</td><td>✗</td><td style="color: red;">Loc.</td><td>426</td><td>167</td><td>362</td><td>1920 × 1080</td></tr><tr><td colspan="10" style="text-align: center; font-weight: bold;">ImageNet-aligned</td></tr><tr><td>R2V2 (Gordon et al., 2020)</td><td>ImageNet</td><td>✗</td><td>✓</td><td>✓</td><td style="color: red;">Class</td><td>–</td><td>–</td><td>–</td><td>467 × 280</td></tr><tr><td>VideoNet (Parthasarathy et al., 2023)</td><td>ImageNet</td><td>✗</td><td>✓</td><td>✓</td><td style="color: red;">Class</td><td>10</td><td>3055</td><td>–</td><td>–</td></tr><tr><td>Walking Tours (ours)</td><td>Urban</td><td>✓</td><td>✓</td><td>✗</td><td style="color: green;">None</td><td>4968</td><td>23</td><td>10</td><td>3840 × 2160</td></tr></tbody></table>

et al., 2021) and training models to pull them together/apart. These methods have since percolated to learning from video frames (Gordon et al., 2020; Parthasarathy et al., 2023; Tschannen et al., 2020; Wang & Gupta, 2015; Orhan et al., 2020). Similar to this work, TimeTuning (Salehi et al., 2023) leverages the passage of time in videos by not treating it as simple augmentations. However, in contrast to our work, it requires an already image-pretrained backbone. VITO (Parthasarathy et al., 2023) improves performance relative to ImageNet, by using VideoNet, a large YouTube dataset of 10s videos from a similar class distribution and the same number of examples as ImageNet. In this paper, we show that it is possible to obtain strong results from a *single* long video, with a very different visual distribution compared to ImageNet / VideoNet.

# 3 WALKING TOURS DATASET

## 3.1 DATASET COLLECTION AND PROPERTIES

We collect from YouTube a new dataset of urban scenes called “Walking Tours” (WTours, or WT) comprising 10 egocentric videos of a person walking in different cities in Europe and Asia. The cities include Amsterdam, Bangkok, Chiang Mai, Istanbul, Kuala Lampur, Singapore, Stockholm, Venice, and Zurich. We also include a video from a Wildlife safari. Examples are shown in Figure 1. These videos are captured in 4K resolution (3840 × 2160 pixels) at 60 frames-per-second and are under Creative Commons License (CC-BY). The minimum video duration is 59 minutes (Wildlife safari), the maximum is 2 hours 55 minutes (Bangkok) and the average is 1 hour 38 minutes. Such videos are particularly interesting for visual learning because of the following properties:

1. *Large number of objects and actions.* Each frame or clip taken from a video depicts several objects and actions, e.g. walking, riding a bike, sitting, drinking *etc*.

2. *Natural transition in lighting conditions.* In some videos, the lighting gradually transitions from bright (late afternoon) to dim (dusk) then to dark (post sunset).

3. *Natural transition in scenes.* The videos depict transitions between places, e.g. from city center to market place to residential areas to parks to water fronts *etc*.

4. *Natural object augmentations.* Continuous variation e.g. of pose, deformation, viewpoint, perspective distortion, relative object position, occlusion, background clutter.

The abundance of information within these videos, encompassing a multitude of objects and complex scenes, presents a formidable challenge for manual annotation or curation, making it appropriate for unsupervised pretraining. To the best of our knowledge, we are the first to propose an egocentric video dataset for pretraining and evaluate it on a wealth of downstream tasks.
<figure><img src="image_3.png" /><figcaption>Figure 2: *Dataset analysis* of a WTours video compared with videos from Epic-Kitchens (Damen et al., 2022), AVA (Gu et al., 2018) and two entire movies, concatenated or cropped to match the duration of the WTours video. (a) Lightness vs. time. (b) Number of objects per frame vs. time. (c) Frequency of classes in entire video. (d) Number of shots. Objects detected by Detic (Zhou et al., 2022b), trained on ImageNet-21k.</figcaption></figure>

## 3.2 COMPARISON WITH OTHER VIDEO DATASETS

In Table 1, we compare WTours with existing video datasets. In summary, self-supervised pre-training on videos has been mostly limited to short, low-resolution datasets that rely on weak annotation in the form of video-text pairs (Bain et al., 2021; Miech et al., 2019) or are curated, e.g. their class balance is controlled, even if their annotation is unused (Kay et al., 2017). ImageNet-aligned datasets (Gordon et al., 2020; Parthasarathy et al., 2023) contain short videos that are (semi-automatically) curated and annotated with the same distribution and classes as ImageNet. Egocentric video datasets (Damen et al., 2022; Grauman et al., 2022; Sener et al., 2022) have long, high-quality videos, but are the result of significant manual work. In this paper we aim to learn from videos publicly available online.

WTours videos are continuous, longer and higher-resolution than even other egocentric datasets. Using object detectors, we find that the average number of object classes is close to that of ImageNet and there is a high number of objects per frame, making WTours appropriate for representation learning. WTours is not curated and does not rely on search terms. It is *data-first* and more open-ended, thus well suited for the self-supervised setting. It is scalable since it requires no human labeling effort and more videos can be easily downloaded or even made. We are inspired by a 10k walking tours videos created by Wiles et al. (2022), which however is not publicly released and not studied for self-supervised learning. A more detailed discussion is given in subsection A.1.

## 3.3 DATASET ANALYSIS

In Figure 2, we analyse the properties of a single WTours video compared with videos of the same length from two other datasets, as well as two movie videos. In summary, our findings are as follows. From Figure 2(a), WT may exhibit gradual shifts in lightness, transitioning from bright to dim to dark, while Epic-Kitchens and AVA videos exhibit random brightness fluctuations. Lightness variations are not well explored in self-supervised pretraining. From Figure 2(b,c), unique classes appear more frequently and there are more unique objects per frame in WTours than in the other datasets. This makes WTours semantically richer. From Figure 2(d), WTours and Epic-Kitchens videos contain only one or two shots per entire video on average, while the other datasets contain hundreds. In subsection 5.2 and in Appendix C, we show that WTours significantly outperforms movies in downstream tasks, which is partially attributed to the absence of cuts. More detailed discussion of dataset analysis is given in subsection A.2.

# 4 ATTENTION-BASED MULTI-OBJECT TRACKING

Our goal is to build robust representations by leveraging the rich information in video frames. Standard SSL frameworks (Chen et al., 2020; Caron et al., 2020) often assume correspondences between different views. This is true whether using dense (Zhou et al., 2022a) or global representations by pooling (Caron et al., 2021). While it is relatively straightforward to establish correspondences in images, it becomes more challenging when dealing with temporal deformations, requiring some form of object tracking (Salehi et al., 2023). In videos with a large field of view or ego-motion, obtaining correspondences becomes even more difficult.
<figure><img src="image_4.png" /><figcaption>Figure 3: DORA, our self-supervised image pretraining method from video. (Left) From an input frame $\mathbf{X}_{t_0}$, the output of the second-last layer of the teacher model is used by a multi-object tracker to generate cross-attention maps $T'_t$ with frame $\mathbf{X}_t$. We use those to mask $\mathbf{X}_t$ (7), feed it to the student model and apply a distillation loss $L_t^o$ between [CLS] token embeddings (8). (Right) In the tracker, we obtain the query $Q$, key $K$ and output $Z$ embeddings. From the multi-head attention maps $A^i$ (1), we draw a subset $\mathcal{I}$ of $k$ heads and form object prototypes $P$ by pooling over patch queries $\tilde{Q}$ (2). We refine them into $P'$ to discover distinct objects, using Sinkhorn-Knopp (SK) to establish correspondences $M^*$ between $P$ and patch embeddings $\tilde{Z}$ (4) and pooling over $\tilde{Z}$ (5). We then track the objects over frames $\mathbf{X}_t$ by cross-attention $T'_t$ with patch key embeddings $\tilde{K}_t$ (6).</figcaption></figure>

**High-level idea** We introduce DORA, based on multi-object Discovery and tracking. As shown in Figure 3, it leverages the attention from the [CLS] token of distinct heads in a vision transformer to identify and consistently track multiple objects within a given frame across temporal sequences. On these, a teacher-student distillation loss is then applied. Importantly, we do not use any off-the-shelf object tracker or optical flow network. This keeps our pipeline simple and does not require any additional data or training. It also ensures that the learned representation is robust.

**Preliminaries** We are given a video clip consisting of $T$ frames $\mathbf{X}_t \in \mathbb{R}^{h \times w \times c}$ for $t \in \{1, \dots, T\}$, where $h \times w$ is the spatial resolution and $c$ is the number of channels. Each frame is split into $n = hw/p^2$ non-overlapping patches of resolution $p \times p$. The patches are linearly projected into embeddings of dimension $d$ and a [CLS] token embedding is prepended. This representation is input to a transformer encoder (Dosovitskiy et al., 2020). The output embeddings are $Z_t = g_\theta(\mathbf{X}_t) \in \mathbb{R}^{(n+1) \times d}$, where mapping $g_\theta$ includes the tokenizer and encoder, while $\theta$ denotes its learnable parameters. Given an embedding $Z \in \mathbb{R}^{(n+1) \times d}$, we write $Z = [Z^{[CLS]}; \tilde{Z}]$, where $Z^{[CLS]} \in \mathbb{R}^{1 \times d}$ is the [CLS] token embedding and $\tilde{Z} \in \mathbb{R}^{n \times d}$ are the patch embeddings.

Following DINO (Caron et al., 2021), there is a student network with parameters $\theta$ and a teacher network with identical architecture and parameters $\theta'$ obtained as the exponential moving average (EMA) of $\theta$ according to $\theta' \leftarrow \alpha\theta' + (1-\alpha)\theta$. The encoder is followed by a head that includes an MLP and a scaled softmax, such that the output token embeddings can be interpreted as probabilities. We denote by $f_\theta$ the mapping that includes the tokenizer, encoder and head.

**Discovering objects with multi-head attention** Starting at a first frame $\mathbf{X}_{t_0}$, we obtain the query and key embeddings $Q, K \in \mathbb{R}^{(n+1) \times d}$ from the last transformer layer of the teacher network*. According to multi-head attention, these embeddings are partitioned as $Q = [Q^1, \dots, Q^h]$, $K = [K^1, \dots, K^h]$, where $Q^i, K^i \in \mathbb{R}^{(n+1) \times d/h}$ for $i = 1, \dots, h$ and $h$ is the number of heads. For each head $i$, the self-attention matrix $A^i \in \mathbb{R}^{(n+1) \times (n+1)}$ is based on the dot-product similarity between the query and key embeddings:

$$A^i := \mathrm{softmax} \left( Q^i (K^i)^\top / \sqrt{d} \right) \in \mathbb{R}^{(n+1) \times (n+1)}. \quad (1)$$

Given an attention matrix $A \in \mathbb{R}^{(n+1) \times (n+1)}$, let $A^{[CLS]} := [a_{1,2}, \dots, a_{1,n}] \in \mathbb{R}^{1 \times n}$ be the [CLS]-attention vector between the [CLS] and patch embeddings, where $a_{i,j}$ is the element $(i, j)$ of $A$. We draw at random a subset $\mathcal{I} := \{i_1, \dots, i_k\}$ of $k < h$ heads and collect their [CLS]-attention vectors into $A^\mathcal{I} := [(A^{i_1})^{[CLS]}; \dots; (A^{i_k})^{[CLS]}] \in \mathbb{R}^{k \times n}$. Intuitively, as expressed in rows of matrix $A^\mathcal{I}$, the different heads attend to different objects in the frame (Caron et al., 2021).

<footnote>*For simplicity, we drop $t_0$ from the notation.</footnote>
<figure><img src="image_5.png" /><figcaption>Figure 4: For each input frame t of a video clip (top), cross-attention map $T_t \in \mathbb{R}^{k \times n}$ (3) (middle) and refined cross-attention map $T'_t \in \mathbb{R}^{k \times n}$ (6) (bottom), using Sinkhorn-Knopp algorithm. For each object, one row of $T_t$ or $T'_t$ is reshaped as $h/p \times w/p$ and upsampled to an $h \times w$ attention map overlaid on the input frame for $k=3$ objects encoded in blue, red and green channel. Mixed colors yellow and cyan for $T_t$ (middle, in red circle) indicate spatial overlap of two objects, while $T'_t$ (bottom) yields three well separated objects shown in primary colors blue, red and green.</figcaption></figure>

To represent the $k$ objects in the embedding space, we use matrix $A^I \in \mathbb{R}^{k \times n}$ to form linear combinations of patch embeddings $\tilde{Q} \in \mathbb{R}^{n \times d}$, obtaining *object prototypes*

$$P := A^I \tilde{Q} \in \mathbb{R}^{k \times d}. \qquad (2)$$

This can be seen as the representation of $k$ different [CLS] tokens in the full embedding space, capturing $k$ objects at frame $t_0$. Then, given the key embeddings $K_t \in \mathbb{R}^{(n+1) \times d}$ at another frame $t$, we could track the objects by *cross-attention*

$$T_t := \mathrm{softmax} \left( P \tilde{K}_t^\top / \sqrt{d} \right) \in \mathbb{R}^{k \times n}, \qquad (3)$$

where $\tilde{K}_t \in \mathbb{R}^{n \times d}$. Unfortunately, we observe in Figure 4 that the $k$ attention maps obtained this way are spatially overlapping, meaning that each attention map is not delineating a single object.

**Establishing object-patch correspondences** To discover spatially distinct objects, we propose to establish correspondences between prototypes and patch tokens. Let $Z = g_{\theta'}(X_{t_0}) \in \mathbb{R}^{(n+1) \times d}$ be the output embeddings of the teacher network, still at frame $t_0$. We seek a correspondence between the rows of $P \in \mathbb{R}^{k \times d}$ and $\tilde{Z} \in \mathbb{R}^{n \times d}$, where $\tilde{Z}$ are the patch token embeddings.

The goal is to find a *transport plan* $M \in \mathbb{R}^{k \times n}$ that minimizes the expected pairwise cost $C := -P\tilde{Z}^\top \in \mathbb{R}^{k \times n}$ between prototypes and patches, while incorporating an entropic regularizer with coefficient $\epsilon$. Matrix $M$ is non-negative with row-wise sum $1/k$ and column-wise sum $1/n$, representing a joint probability over $P$ and $\tilde{Z}$ with uniform marginals. The minimal solution $M^*$ is unique and can be found by forming the matrix $e^{-C/\epsilon}$ and then applying the Sinkhorn-Knopp (SK) algorithm (Cuturi, 2013), i.e., iteratively normalizing its rows and columns:

$$M^* = \mathrm{SK} \left( \exp \left( P \tilde{Z}^\top / \epsilon \right) \right) \in \mathbb{R}^{k \times n}, \qquad (4)$$

Observe the similarity with (1) and (3), where scaling is by $\sqrt{d}$ rather than $\epsilon$, exp is included in softmax and normalization is on rows only rather than iterative. Then, similarly with (2), we use the optimal transport plan $M^* \in \mathbb{R}^{k \times n}$ to form linear combinations of patch embeddings $\tilde{Z} \in \mathbb{R}^{n \times d}$, obtaining the *refined object prototypes*

$$P' = M^* \tilde{Z} \in \mathbb{R}^{k \times d}. \qquad (5)$$
Now, given the key embeddings $K_t \in \mathbb{R}^{(n+1) \times d}$ at another frame $t$, we track the objects by the refined cross-attention, similarly with (3):

$$T'_{t} := \mathrm{softmax} \left( P' \tilde{K}_{t}^{\top} / \sqrt{d} \right) \in \mathbb{R}^{k \times n}, \qquad (6)$$

where $\tilde{K}_t \in \mathbb{R}^{n \times d}$. Indeed, Figure 4 confirms that each of the $k$ resulting attention maps is associated with a spatially distinct object, thanks to the established correspondences.

In contrast to previous works that use SK in the context of self-supervised learning to force an equi-partitioning of images to cluster labels (Asano et al., 2020; Caron et al., 2020; Oquab et al., 2023), we rather use optimal transport to re-balance spatial correspondences to different objects.

**Multi-object masking** We use the cross-attention (6) to mask the input video clip for the student network, such that each masked clip can be considered as a *multi-object crop*. This crop plays a similar role with local crops in DINO (Caron et al., 2021), but it has arbitrary shape and tracks an object over video frames. In particular, given an input frame $\mathbf{X} \in \mathbb{R}^{h \times w \times c}$ with cross-attention matrix $T' \in \mathbb{R}^{k \times n}$ (6) and an object $i \in \{1, \dots, k\}$, we reshape the $i$-th row of $T'$ as $h/p \times w/p$ and upsample to a $h \times w$ attention map to match the spatial resolution of $\mathbf{X}$, as shown in Figure 4. We repeat along the channel dimension to form tensor $\mathbf{T}^i \in \mathbb{R}^{h \times w \times c}$ and we mask $\mathbf{X}$ as

$$\mathbf{X}^{o_i} := \mathbf{X} \odot \mathbf{T}^i, \qquad (7)$$

where $\odot$ is the Hadamard product. Following DINO (Caron et al., 2021), given an input frame $\mathbf{X}_t$, we generate two standard resolution augmented global views $\mathbf{X}_t^a, \mathbf{X}_t^b$. We introduce a *multi-object loss* $L_t^O$ for frame $t$, applied to the [CLS] token between the teacher $f_{\theta'}$ output for one global view $\mathbf{X}_t^u$ and the student $f_{\theta}$ output for the masked version $\mathbf{X}_t^{v,o_i}$ of the other view $\mathbf{X}_t^v$ for $i \in \{1, \dots, k\}$, where $u, v \in V = \{a, b\}$ and $u \neq v$:

$$L_t^O := \sum_{u,v \in V} \mathbb{1}_{u \neq v} \sum_{i=1}^{k} f_{\theta'}(\mathbf{X}_t^u)^{[\mathrm{CLS}]} \log (f_{\theta}(\mathbf{X}_t^{v,o_i})^{[\mathrm{CLS}]}). \qquad (8)$$

In addition, as detailed in subsection B.1, we apply a *local loss*, following *multi-crop* (Caron et al., 2020). The overall loss $L$ is the sum of the two losses, averaged over all $T$ frames.

# 5 EXPERIMENTS

## 5.1 SETUP

**Tasks and methods** We perform self-supervised pretraining on a single WT tour video in Venice (referred to as WT$_{Venice}$) or all 10 WT videos (referred to as WT$_{all}$) and compare with other image and video datasets. To evaluate the quality of the learned representations, we use frozen features for classification, unsupervised object discovery and video object segmentation. We fine-tune for semantic segmentation, object detection and object tracking. We compare DORA with SoTA SSL methods (da Costa et al., 2022) using our settings. We provide more details in individual sections per task. Implementation details and hyperparameters are given in Appendix B.

## 5.2 ABLATIONS

We examine the effect of using different pretraining video dataset and different options and parameters for DORA, measuring performance of classification on ImageNet-1k (Deng et al., 2009) by linear probing (LP) accuracy and unsupervised object discovery on Pascal-VOC 2012 (Everingham et al.) by correct localization (CorLoc) (Siméoni et al., 2021).

**Pretraining video dataset** We study the impact of pretraining on diverse video datasets, encompassing *object-centric* videos such as Kinetics-400 (K-400) (Kay et al., 2017), *egocentric* videos like Epic-Kitchens (EK) (Damen et al., 2022) and a single movie, Movie$_{rom}$ (Central). To maintain uniformity in terms of the number of frames, we curate a subset of videos from K-400 and EK, such that their total duration is the same as a single WT video. In Table 2a, we observe that although K-400 is *object-centric*, pretraining on WTours videos yields superior performance on ImageNet and Pascal-VOC 2012. Pretraining on a single movie yields is inferior to both WTours and K-400 by a large margin. This is possibly due to the presence of cuts, as studied in Appendix C.
<table><caption>(a) Video datasets</caption><thead><tr><th>METHOD</th><th>PRETRAIN</th><th>#FRAMES (M)</th><th>LP</th><th>CORLOC</th></tr></thead><tbody><tr><td>DINO</td><td>Movie<sub>rom</sub></td><td>0.19</td><td>34.9</td><td>51.5</td></tr><tr><td>DORA</td><td>Movie<sub>rom</sub></td><td>0.19</td><td><strong>35.3</strong></td><td><strong>51.6</strong></td></tr><tr><td>DINO</td><td>K-400*</td><td>0.2</td><td>40.7</td><td>52.4</td></tr><tr><td>DORA</td><td>K-400*</td><td>0.2</td><td><strong>43.0</strong></td><td><strong>55.2</strong></td></tr><tr><td>DINO</td><td>EK*</td><td>0.2</td><td>38.6</td><td>53.5</td></tr><tr><td>DORA</td><td>EK*</td><td>0.2</td><td><strong>41.8</strong></td><td><strong>56.0</strong></td></tr><tr><td>DINO</td><td>WT<sub>Venice</sub></td><td>0.2</td><td>33.8</td><td>51.2</td></tr><tr><td>DORA</td><td>WT<sub>Venice</sub></td><td>0.2</td><td><strong>44.5</strong></td><td><strong>56.2</strong></td></tr></tbody></table>

<table><caption>(b) #Objects k on WT<sub>Venice</sub></caption><thead><tr><th>METHOD</th><th>k</th><th>LP</th><th>CORLOC</th></tr></thead><tbody><tr><td>DINO</td><td>33.8</td><td>51.2</td><td></td></tr><tr><td>DORA</td><td>1</td><td>39.9</td><td>53.9</td></tr><tr><td>DORA</td><td>2</td><td>43.1</td><td>55.7</td></tr><tr><td>DORA</td><td>3</td><td><strong>44.5</strong></td><td><strong>56.2</strong></td></tr><tr><td>DORA</td><td>4</td><td>39.2</td><td>53.8</td></tr><tr><td>DORA</td><td>5</td><td>36.7</td><td>50.3</td></tr><tr><td>DORA</td><td>6</td><td>35.8</td><td>48.8</td></tr><tr><td>DORA</td><td>16</td><td>28.3</td><td>48.5</td></tr><tr><td>DORA</td><td>32</td><td>27.1</td><td>46.8</td></tr></tbody></table>

<table><caption>(c) SK and masking on WT<sub>Venice</sub></caption><thead><tr><th>METHOD</th><th>SK</th><th>MASK</th><th>LP</th><th>CORLOC</th></tr></thead><tbody><tr><td>DINO</td><td>33.8</td><td>51.2</td><td></td><td></td></tr><tr><td>DORA</td><td>Random</td><td>33.0</td><td>49.8</td><td></td></tr><tr><td>DORA</td><td>Object</td><td>42.5</td><td>55.3</td><td></td></tr><tr><td>DORA</td><td>Random</td><td>29.9</td><td>46.7</td><td></td></tr><tr><td>DORA</td><td>Object</td><td><strong>44.5</strong></td><td><strong>56.2</strong></td><td></td></tr></tbody></table>

<table><caption>Table 2: *Effect of parameters.* ViT-S/16 pretrained, then frozen. (a) Different pretraining video dataset, (b) Number *k* of tracked objects. (c) Random or multi-object mask, without SK (3) and with SK (6). \*: subset of videos with same total duration as a single WTours video. K-400: Kinetics-400, EK: Epic-Kitchens. LP: top-1 accuracy (%) of linear probing on the validation set of ImageNet-1k. CorLoc: correct localization on validation set of Pascal-VOC 2012.</caption><thead><tr><th rowspan="2">METHOD</th><th rowspan="2">EPOCHS</th><th rowspan="2">PRETRAIN</th><th colspan="3">(a) SEMANTIC SEG.</th><th colspan="2">(b) OBJECT DET.</th><th colspan="2">(c) INSTANCE SEG.</th></tr><tr><th>mIoU</th><th>GAIN</th><th>Acc<sub>m</sub></th><th>GAIN</th><th>mAP</th><th>GAIN</th><th>mIoU</th><th>GAIN</th></tr></thead><tbody><tr><td>ViT-S/16</td><td>100</td><td>None</td><td>25.1</td><td></td><td>33.3</td><td></td><td>28.6</td><td></td><td>24.3</td><td></td></tr><tr><td>iBOT (Zhou et al., 2022a)</td><td>100</td><td>WT<sub>Venice</sub></td><td>33.9</td><td></td><td>43.3</td><td></td><td>37.6</td><td></td><td>33.0</td><td></td></tr><tr><td>AttMask (Kakogeorgiou et al., 2022)</td><td>100</td><td>WT<sub>Venice</sub></td><td>33.6</td><td></td><td>42.7</td><td></td><td>36.5</td><td></td><td>32.5</td><td></td></tr><tr><td>VITO (Parthasarathy et al., 2023)</td><td>300</td><td>VideoNet</td><td>39.4</td><td></td><td>–</td><td></td><td>44.0</td><td></td><td>–</td><td></td></tr><tr><td>DINO (Caron et al., 2021)</td><td>100</td><td>IN-1k</td><td>33.9</td><td></td><td>44.3</td><td></td><td>39.9</td><td></td><td>35.1</td><td></td></tr><tr><td>DORA (ours)</td><td>100</td><td>WT<sub>all</sub></td><td>36.9</td><td></td><td>48.0</td><td></td><td>40.7</td><td></td><td>36.3</td><td></td></tr><tr><td>DINO (Caron et al., 2021)</td><td>100</td><td>WT<sub>Venice</sub></td><td>32.4</td><td></td><td>43.7</td><td></td><td>37.1</td><td></td><td>32.1</td><td></td></tr><tr><td>DORA (ours)</td><td>100</td><td>WT<sub>Venice</sub></td><td><strong>35.4</strong></td><td>+3.0</td><td><strong>45.5</strong></td><td>+1.8</td><td><strong>39.5</strong></td><td>+2.4</td><td><strong>34.7</strong></td><td>+2.6</td></tr></tbody></table>

<caption>Table 3: *Semantic segmentation, object detection and instance segmentation.* ViT-S/16 pretrained, then fine-tuned. WT<sub>Venice</sub>: Walking Tours (ours), single video of Venice; WT<sub>all</sub>: all videos. IN-1k: ImageNet-1k. (a) Semantic segmentation: fine-tuning on ADE20k using UperNet. mIoU: mean IoU; Acc<sub>m</sub>: mean-class accuracy. (b) Object detection and (c) Instance segmentation: fine-tuning on MS-COCO using Cascade RCNN. mAP: mean average precision; mIoU: mean IoU.</caption>

**Number of tracked objects** We study the impact of the number *k* of objects. Objects are discovered using attention heads, where the total number of heads is in ViT-S/16 is *h* = 6. For *k* > *h*, we modify the MSA block as described in subsection B.2. In Table 2b, we observe that *k* = 3 works best. We hypothesize that this is a compromise between the number of objects that can be tracked and the multi-object loss (8) attempting to match small objects with the global crop.

**Choice of masking and Sinkhorn-Knopp** We explore the effect of using a multi-object mask (7) vs. random block-wise (Zhou et al., 2022a) and the effect of improving object-patch correspondence through SK in refined cross-attention (6) vs. (3). In Table 2c, we observe that a multi-object mask leads to a remarkable performance improvement even in the absence of SK. In fact, random block-wise mask undermines object-patch correspondence, making the effect of SK negative. By contrast, SK improves performance in the presence of multi-object mask.

## 5.3 COMPARISON WITH STATE-OF-THE-ART

**Dense scene understanding** Table 3(a) shows semantic segmentation by fine-tuning on ADE20k (Zhou et al., 2017) using UperNet (Xiao et al., 2018). DORA outperforms DINO by 3% mIoU, and 1.8% Acc<sub>m</sub>. It is interesting to note that DORA pretrained on 200k frames of a single WTours video outperforms DINO pretrained on 1.3M images of ImageNet-1k by 1.5% mIoU. A more comparable setting is DORA pretrained on 1.5M frames of WT<sub>all</sub>, which outperforms DINO pretrained on ImageNet by 3% mIoU. Table 3(b) shows object detection and instance segmentation by fine-tuning on MS-COCO (Lin et al., 2014) using Cascade RCNN (Cai & Vasconcelos, 2019). DORA outperforms DINO by 2.4% mAP and 2.6% mIoU. DORA pretrained on WT<sub>all</sub> outperforms DINO pretrained on ImageNet by 0.8% mIoU and 1.2% mAP. This shows that pretraining on WTours videos significantly improves the generality of DORA to dense prediction tasks, requiring only one tenth of the total images.
<table><caption>Table 4: Video object segmentation and object tracking. ViT-S/16 pretrained, then frozen or fine-tuned. WTVenice: Walking Tours (ours), single video from Venice; WTall: all videos. IN-1k: ImageNet-1k. (a) Video object segmentation: frozen features on DAVIS-2017. Jm: mean region similarity; Fm: mean contour-based accuracy. (b) Multi-object tracking: fine-tuning on GOT-10k. mAO: mean average overlap; SR: success rate, threshold 50% and 75%.</caption><thead><tr><th rowspan="2">METHOD</th><th rowspan="2">EPOCHS</th><th rowspan="2">PRETRAIN</th><th colspan="4">(a) VIDEO OBJECT SEGMENTATION</th><th colspan="4">(b) OBJECT TRACKING</th></tr><tr><th>(J & F)m</th><th>GAIN</th><th>Jm</th><th>GAIN</th><th>Fm</th><th>GAIN</th><th>mAO</th><th>GAIN</th><th>SR0.5</th><th>GAIN</th><th>SR0.75</th><th>GAIN</th></tr></thead><tbody><tr><td>ViT (Dosovitskiy et al., 2020)</td><td>100</td><td>None</td><td>26.9</td><td></td><td>25.4</td><td>28.3</td><td></td><td>23.1</td><td></td><td>19.0</td><td></td><td>3.4</td><td></td></tr><tr><td>iBOT (Zhou et al., 2022a)</td><td>100</td><td>WTVenice</td><td>57.4</td><td></td><td>56.7</td><td>58.0</td><td></td><td>41.5</td><td></td><td>47.5</td><td></td><td>16.6</td><td></td></tr><tr><td>DINO (Caron et al., 2021)</td><td>100</td><td>IN-1k</td><td>59.4</td><td></td><td>57.4</td><td>61.4</td><td></td><td>46.4</td><td></td><td>54.3</td><td></td><td>24.1</td><td></td></tr><tr><td>DoRA (ours)</td><td>100</td><td>WTall</td><td>57.6</td><td></td><td>55.1</td><td>60.2</td><td></td><td>45.9</td><td></td><td>53.4</td><td></td><td>23.7</td><td></td></tr><tr><td>DINO (Caron et al., 2021)</td><td>100</td><td>WTVenice</td><td>54.6</td><td></td><td>53.0</td><td>56.2</td><td></td><td>37.4</td><td></td><td>41.4</td><td></td><td>13.4</td><td></td></tr><tr><td>DoRA (ours)</td><td>100</td><td>WTVenice</td><td><strong>58.4</strong></td><td>+3.8</td><td><strong>56.4</strong></td><td>+3.4</td><td><strong>60.4</strong></td><td>+4.2</td><td><strong>41.4</strong></td><td>+4.0</td><td>47.2</td><td>+5.8</td><td>18.2</td><td>+4.8</td></tr></tbody></table>

<table><caption>Table 5: Image classification and object discovery. ViT-S/16 pretrained, then frozen. WTVenice: Walking Tours (ours), single video from Venice; WTall: all videos. (a) Classification top-1 accuracy (%) on validation set of ImageNet-1k. LP: linear probing. (b) Unsupervised object discovery on validation set of Pascal-VOC 2012. Jacc.: Jaccard similarity; CorLoc: Correct Localization.</caption><thead><tr><th rowspan="2">METHOD</th><th rowspan="2">EPOCHS</th><th rowspan="2">PRETRAIN</th><th rowspan="2">#FRAMES<br>(M)</th><th colspan="4">(a) CLASSIFICATION</th><th colspan="4">(b) OBJECT DISCOVERY</th></tr><tr><th>LP</th><th>GAIN</th><th>k-NN</th><th>GAIN</th><th>JACC.</th><th>GAIN</th><th>CORLOC</th><th>GAIN</th></tr></thead><tbody><tr><td>SimCLR (Chen et al., 2020)</td><td>100</td><td>WTVenice</td><td>0.2</td><td>26.3</td><td></td><td>25.9</td><td></td><td>40.4</td><td></td><td>50.2</td><td></td></tr><tr><td>SwAV (Caron et al., 2020)</td><td>100</td><td>WTVenice</td><td>0.2</td><td>28.0</td><td></td><td>26.4</td><td></td><td>40.6</td><td></td><td>51.4</td><td></td></tr><tr><td>iBOT (Zhou et al., 2022a)</td><td>100</td><td>WTVenice</td><td>0.2</td><td>36.8</td><td></td><td>32.8</td><td></td><td>43.0</td><td></td><td>53.1</td><td></td></tr><tr><td>AttMask (Kakogeorgiou et al., 2022)</td><td>100</td><td>WTVenice</td><td>0.2</td><td>35.8</td><td></td><td>31.9</td><td></td><td>43.5</td><td></td><td>54.5</td><td></td></tr><tr><td>VicReg (Bardes et al., 2021)</td><td>100</td><td>WTVenice</td><td>0.2</td><td>36.5</td><td></td><td>30.1</td><td></td><td>42.7</td><td></td><td>52.1</td><td></td></tr><tr><td>DINO (Caron et al., 2021)</td><td>100</td><td>WTVenice</td><td>0.2</td><td>33.8</td><td></td><td>29.9</td><td></td><td>43.8</td><td></td><td>51.2</td><td></td></tr><tr><td>DoRA (ours)</td><td>100</td><td>WTVenice</td><td>0.2</td><td><strong>45.4</strong></td><td>+11.6</td><td><strong>33.8</strong></td><td>+3.9</td><td><strong>44.0</strong></td><td>+0.2</td><td><strong>56.2</strong></td><td>+5.0</td></tr><tr><td>DINO (Caron et al., 2021)</td><td>100</td><td>WTall</td><td>1.5</td><td>36.6</td><td></td><td>31.1</td><td></td><td>42.9</td><td></td><td>55.8</td><td></td></tr><tr><td>DoRA (ours)</td><td>100</td><td>WTall</td><td>1.5</td><td><strong>45.3</strong></td><td>+8.7</td><td><strong>35.7</strong></td><td>+4.6</td><td><strong>44.3</strong></td><td>+1.4</td><td><strong>57.1</strong></td><td>+1.3</td></tr></tbody></table>

**Video understanding** Table 4(a) shows video object segmentation by using frozen features on DAVIS-2017 (Pont-Tuset et al., 2017), which assesses the ability to segment an object over its dynamic temporal changes. DORA captures detailed temporal deformations and outperforms baseline DINO by 3.4% $J_m$ and 4.2% $F_m$. Using only a single video for pretraining, DORA achieves almost the same performance of DINO pretrained on ImageNet (56.4% vs. 57.4% $J_m$). Table 4(b) shows multi-object tracking by fine-tuning on GOT-10k (Huang et al., 2021) using SeqTrack (Chen et al., 2023). GOT-10k assesses the ability to track extremely fast moving objects, objects with illumination variation and low resolution. DORA achieves significant gains between 4-6% over DINO.

**Image classification and unsupervised object discovery** We pretrain DORA on WTours and then we keep it frozen on the downstream task, indicating the quality of the pretrained features. Table 5(a) shows image classification on ImageNet-1k, measuring accuracy for linear probing and k-nearest neighbor. Table 5(b) shows unsupervised object discovery on Pascal-VOC 2012, using attention maps as segmentation masks to measure Jaccard similarity and CorLoc.

On both tasks, non-contrastive methods (DINO, iBOT, VICReg) outperform contrastive methods (SimCLR, SwAV), when pretrained on a single WT video. Importantly, non-contrastive methods are also more efficient to train, since no negative pairs are used. Also on both tasks, DORA outperforms DINO by a large margin, e.g. 11.6% LP and 3.9% k-NN on classification, when trained on a single WT video. Comparing DORA on WTVenice with the WTall dataset, the improvement brought by the full dataset is small when using DORA, although it is 10 times larger.

In Appendix D, we show that DORA outperforms SoTA methods on all tasks on ImageNet-1k.

# 6 CONCLUSIONS

We have introduced a dataset of 10 walking tour videos – first-person videos taken by people touring a city, with no cuts, high resolution and that are hours long. We show that learning from clips taken from these videos is surprisingly powerful: with an appropriately tailored self-supervised learning method for videos, we obtain representations that rival those obtained on ImageNet when
transferring to popular downstream image and video tasks. This differs from previous state-of-the-art approaches to learning image encoders from video, which also obtain such results but require large video datasets, following closely the ImageNet blueprint.

Our proposed learning method DORA is inspired by DINO, generalizing it to video by incorporating implicit multi-object tracking across video clips. We observe that the method leads to interesting emergent attention masks within the transformer model, that seem to latch on to particular objects, even through occlusions. This makes it uniquely suited to our newly introduced dataset.

# 7 ACKNOWLEDGEMENTS

This work was in part supported by the ANR-19-CE23-0028 MEERQAT project and was performed using the HPC resources from GENCI-IDRIS Grant 2021 AD011012528. We also thank Dilara Gokay and Andrew Zisserman for their valuable feedback on this paper.

# REFERENCES

- Russell J Adams. An evaluation of color preference in early infancy. *Infant Behavior and Development*, 1987. 1

- Pulkit Agrawal, Joao Carreira, and Jitendra Malik. Learning to see by moving. In *ICCV*, 2015. 2

- Yuki M. Asano, Christian Rupprecht, and Andrea Vedaldi. Self-labelling via simultaneous clustering and representation learning. In *ICLR*, 2020. 7

- Max Bain, Arsha Nagrani, Gül Varol, and Andrew Zisserman. Frozen in time: A joint video and image encoder for end-to-end retrieval. In *ICCV*, 2021. 3, 4, 1

- Adrien Bardes, Jean Ponce, and Yann LeCun. Vicreg: Variance-invariance-covariance regularization for self-supervised learning. *arXiv preprint arXiv:2105.04906*, 2021. 9

- Paul C Bomba and Einar R Siqueland. The nature and structure of infant form categories. *Journal of Experimental Child Psychology*, 1983. 2

- Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: High quality object detection and instance segmentation. *IEEE TPAMI*, 2019. 8, 4

- Joseph J Campos, Susan Hiatt, Douglas Ramsay, Charlotte Henderson, and Marilyn Svejda. The emergence of fear on the visual cliff. *The development of affect*, 1978. 1

- Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. *NeurIPS*, 2020. 4, 7, 9, 3

- Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In *ICCV*, 2021. 2, 4, 5, 7, 8, 9, 3

- Brandon Castellano. Pyscenedetect. https://github.com/Breakthrough/PySceneDetect. 2, 5

- World Movie Central. The night we met. https://www.youtube.com/watch?v=joIzqAueexA. 7, 2

- Prabuddha Chakraborty and Vinay P. Namboodiri. Learning to estimate pose by watching videos. *arXiv preprint arXiv:1704.04081*, 2017. 2

- Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In *ICML*, 2020. 2, 4, 9

- Xin Chen, Houwen Peng, Dong Wang, Huchuan Lu, and Han Hu. Seqtrack: Sequence to sequence learning for visual object tracking. In *CVPR*, 2023. 9, 4

- Ioana Croitoru, Simion-Vlad Bogolin, and Marius Leordeanu. Unsupervised learning from video to detect foreground objects in single images. In *ICCV*, 2017. 2

- Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. *NeurIPS*, 2013. 6

- Victor Guilherme Turrisi da Costa, Enrico Fini, Moin Nabi, Nicu Sebe, and Elisa Ricci. solo-learn: A library of self-supervised methods for visual representation learning. *JMLR*, 2022. 7
Dima Damen, Hazel Doughty, Giovanni Maria Farinella, Antonino Furnari, Jian Ma, Evangelos Kazakos, Davide Moltisanti, Jonathan Munro, Toby Perrett, Will Price, and Michael Wray. Rescaling egocentric vision: Collection, pipeline and challenges for epic-kitchens-100. *IJCV*, 2022. 3, 4, 7, 2

Michelle de Haan, Mark H Johnson, Daphne Maurer, and David I Perrett. Recognition of individual faces and average face prototypes by 1-and 3-month-old infants. *Cognitive development*, 2001. 1

Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In *CVPR*, 2009. 7

Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In *ICLR*, 2020. 5, 9, 3

M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PAS-CAL Visual Object Classes Challenge 2012 (VOC2012) Results. http://www.pascal-network.org/challenges/VOC/voc2012/workshop/index.html. 7, 3

Daniel Gordon, Kiana Ehsani, Dieter Fox, and Ali Farhadi. *arXiv*, 2020. 1, 3, 4

Kristen Grauman, Andrew Westbury, Eugene Byrne, Zachary Chavis, Antonino Furnari, Rohit Girdhar, Jackson Hamburger, Hao Jiang, Miao Liu, Xingyu Liu, et al. Ego4d: Around the world in 3,000 hours of egocentric video. In *CVPR*, 2022. 3, 4, 2

Chunhui Gu, Chen Sun, David A Ross, Carl Vondrick, Caroline Pantofaru, Yeqing Li, Sudheendra Vijayanarasimhan, George Toderici, Susanna Ricco, Rahul Sukthankar, et al. Ava: A video dataset of spatio-temporally localized atomic visual actions. In *CVPR*, 2018. 3, 4, 2

Lianghua Huang, Xin Zhao, and Kaiqi Huang. Got-10k: A large high-diversity benchmark for generic object tracking in the wild. *IEEE TPAMI*, 2019. 4

Lianghua Huang, Xin Zhao, and Kaiqi Huang. Got-10k: A large high-diversity benchmark for generic object tracking in the wild. *IEEE TPAMI*, 2021. 9

Dinesh Jayaraman and Kristen Grauman. Learning image representations tied to ego-motion. In *ICCV*, 2015. 2

Dinesh Jayaraman and Kristen Grauman. Look-ahead before you leap: end-to-end active recognition by forecasting the effect of motion. In *ECCV*, 2016. 2

Ioannis Kakogeorgiou, Spyros Gidaris, Bill Psomas, Yannis Avrithis, Andrei Bursuc, Konstantinos Karantzalos, and Nikos Komodakis. What to hide from your students: Attention-guided masked image modeling. In *ECCV*, 2022. 8, 9

Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, et al. The kinetics human action video dataset. *arXiv preprint arXiv:1705.06950*, 2017. 3, 4, 7, 1

Abdullah Aman Khan, Jie Shao, Waqar Ali, and Saifullah Tumrani. Content-aware summarization of broadcast sports videos: an audio-visual feature extraction approach. *Neural Processing Letters*, 2020. 2

Xueting Li, Sifei Liu, Shalini De Mello, Xiaolong Wang, Jan Kautz, and Ming-Hsuan Yang. Joint-task self-supervised learning for temporal correspondence. *NeurIPS*, 2019. 2

Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In *ECCV*, 2014. 8

Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In *ICLR*, 2019. 4

Aravindh Mahendran, James Thewlis, and Andrea Vedaldi. Cross pixel optical-flow similarity for self-supervised learning. In *ACCV*, 2018. 2

Antoine Miech, Dimitri Zhukov, Jean-Baptiste Alayrac, Makarand Tapaswi, Ivan Laptev, and Josef Sivic. Howto100m: Learning a text-video embedding by watching hundred million narrated video clips. In *ICCV*, 2019. 3, 4, 1

Ishan Misra, C Lawrence Zitnick, and Martial Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In *ECCV*, 2016. 2
Maxime Oquab, Timothée Darcet, Theo Moutakanni, Huy V. Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernández, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, Russell Howes, Po-Yao Huang, Hu Xu, Vasu Sharma, Shang-Wen Li, Wojciech Galuba, Mike Rabbat, Mido Assran, Nicolas Ballas, Gabriel Synnaeve, Ishan Misra, Herve Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. Dinov2: Learning robust visual features without supervision. arXiv:2304.07193, 2023. 7

Emin Orhan, Vaibhav Gupta, and Brenden M Lake. Self-supervised learning through the eyes of a child. NeurIPS, 2020. 3

Nikhil Parthasarathy, SM Eslami, João Carreira, and Olivier J Hénaff. Self-supervised video pretraining yields strong image representations. In NeurIPS, 2023. 1, 3, 4, 8

Deepak Pathak, Ross Girshick, Piotr Dollár, Trevor Darrell, and Bharath Hariharan. Learning features by watching objects move. In CVPR, 2017. 2

Sören Pirk, Mohi Khansari, Yunfei Bai, Corey Lynch, and Pierre Sermanet. Online learning of object representations by appearance space feature alignment. In ICRA, 2020. 2

Jordi Pont-Tuset, Federico Perazzi, Sergi Caelles, Pablo Arbeláez, Alex Sorkine-Hornung, and Luc Van Gool. The 2017 davis challenge on video object segmentation. arXiv preprint arXiv:1704.00675, 2017. 9, 4

Paul C Quinn, Peter D Eimas, and Stacey L Rosenkrantz. Evidence for representations of perceptually similar natural categories by 3-month-old and 4-month-old infants. Perception, 1993. 2

Francesco Ragusa, Antonino Furnari, and Giovanni Maria Farinella. Meccano: A multimodal egocentric dataset for humans behavior understanding in the industrial-like domain. CVIU, 2023. 3

Mohammadreza Salehi, Efstratios Gavves, Cees G. M. Snoek, and Yuki M. Asano. Time does tell: Self-supervised time-tuning of dense image representations. ICCV, 2023. 3, 4

F. Sener, D. Chatterjee, D. Shelepov, K. He, D. Singhania, R. Wang, and A. Yao. Assembly101: A large-scale multi-view video dataset for understanding procedural activities. CVPR, 2022. 3, 4, 2

Pierre Sermanet, Corey Lynch, Yevgen Chebotar, Jasmine Hsu, Eric Jang, Stefan Schaal, Sergey Levine, and Google Brain. Time-contrastive networks: Self-supervised learning from video. In ICRA, 2018. 2

Oriane Siméoni, Gilles Puy, Huy V Vo, Simon Roburin, Spyros Gidaris, Andrei Bursuc, Patrick Pérez, Renaud Marlet, and Jean Ponce. Localizing objects with self-supervised transformers and no labels. In BMVC, 2021. 7, 3

Skiptrace. Skiptrace. https://www.youtube.com/watch?v=LbRNBQa05a0. 2

Samuel Sokol. Measurement of infant visual acuity from pattern reversal evoked potentials. Vision research, 18(1):33–39, 1978. 1

Elizabeth S Spelke and Katherine D Kinzler. Core knowledge. Developmental science, 2007. 2

Michael Tschannen, Josip Djolonga, Marvin Ritter, Aravindh Mahendran, Neil Houlsby, Sylvain Gelly, and Mario Lucic. Self-supervised learning of video-induced visual invariances. In CVPR, pp. 13806–13815, 2020. 3

Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015. 3

Xiaolong Wang, Allan Jabri, and Alexei A Efros. Learning correspondence from the cycle-consistency of time. In CVPR, 2019. 2

Olivia Wiles, Joao Carreira, Iain Barr, Andrew Zisserman, and Mateusz Malinowski. Compressed vision for efficient video understanding. In ACCV, 2022. 2, 4

Laurenz Wiskott and Terrence J Sejnowski. Slow feature analysis: Unsupervised learning of invariances. Neural computation, 2002. 2

Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In ECCV, 2018. 8, 4

Yuwen Xiong, Mengye Ren, Wenyuan Zeng, and Raquel Urtasun. Self-supervised representation learning from flow equivariance. In ICCV, 2021. 2
Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ade20k dataset. In CVPR, 2017. 8, 4

Jinghao Zhou, Chen Wei, Huiyu Wang, Wei Shen, Cihang Xie, Alan Yuille, and Tao Kong. ibot: Image bert pre-training with online tokenizer. ICLR, 2022a. 4, 8, 9, 3, 5

Xingyi Zhou, Rohit Girdhar, Armand Joulin, Philipp Krähenbühl, and Ishan Misra. Detecting twenty-thousand classes using image-level supervision. In ECCV, 2022b. 4, 2
# Is ImageNet worth 1 video? Learning strong image encoders from 1 long unlabelled video

## Supplementary Material

### Table of Contents

<table><tr><td>A More on Walking Tours</td><td>1</td></tr><tr><td>A.1 Comparison with other video datasets</td><td>1</td></tr><tr><td>A.2 Dataset analysis</td><td>2</td></tr><tr><td>B More on experimental setup</td><td>3</td></tr><tr><td>B.1 Multi-crop</td><td>3</td></tr><tr><td>B.2 Implementation details</td><td>3</td></tr><tr><td>B.3 Hyperparameters</td><td>3</td></tr><tr><td>C More ablations</td><td>4</td></tr><tr><td>D More comparisons with state of the art</td><td>5</td></tr><tr><td>E More visualizations</td><td>8</td></tr></table>

## A MORE ON WALKING TOURS

In Table 6, we provide statistics of individual videos in the WTours dataset. In the following, we first compare WTours with other video datasets and then analyze WTours videos in terms of automatically extracted information, including lightness, shot changes and number of objects and categories depicted.

### A.1 COMPARISON WITH OTHER VIDEO DATASETS

In Table 1, we compare WTours with different types of existing video datasets. Self-supervised pretraining on videos has been mostly limited to video datasets that rely on weak annotation in the form of video-text pairs (Bain et al., 2021; Miech et al., 2019) or even are curated, e.g. their class balance is controlled, even if their annotation is unused (Kay et al., 2017). Their average clip duration is small, e.g. less than 20 sec, and their resolution is also small, limiting the capacity to detect objects at a greater distance. By contrast, WTours videos are continuous, hours-long at high resolution and provide natural transitions of scenes and viewing conditions. They are not curated and thus better suited for the self-supervised setting.

ImageNet-aligned datasets such as R2V2 (Gordon et al., 2020) and VideoNet (Parthasarathy et al., 2023) contain videos that are curated and annotated with the same distribution and classes as ImageNet, meant for pretraining image encoders. These videos are short, i.e. 10 seconds on average. By contrast, WTours consists of a continuous stream of egocentric video, where the average number of classes is close to that of ImageNet, as shown in subsection 3.3. The rich information contained in 4K resolution, together with a high number of objects in a frame, makes it appropriate for representation learning. Importantly, the continuity and absence of curation make it more realistic and more comparable with human learning. Our dataset does not rely on a set of objects, human activities or other search terms but instead is data-first and more open-ended.
<table><caption>Table 6: Individual WTours video statistics. (a) Properties. (b) Analysis: shots detected by (Castellano); objects and classes detected by Detic (Zhou et al., 2022b), trained on ImageNet-21k.</caption><thead><tr><th rowspan="2">VIDEO</th><th colspan="3">(a) PROPERTIES</th><th colspan="3">(b) ANALYSIS</th></tr><tr><th>DOMAIN</th><th>#FRAMES (×1000)</th><th>DURATION (MIN)</th><th>#SHOTS</th><th>#OBJECTS / FRAME (AVG.)</th><th>#CLASSES</th></tr></thead><tbody><tr><td>Amsterdam</td><td>Urban</td><td>147.4</td><td>72.6</td><td>0</td><td>48</td><td>684</td></tr><tr><td>Bangkok</td><td>Urban</td><td>314.7</td><td>153.0</td><td>12</td><td>44</td><td>703</td></tr><tr><td>Chiang Mai</td><td>Urban</td><td>122.2</td><td>87.5</td><td>2</td><td>40</td><td>711</td></tr><tr><td>Istanbul</td><td>Urban</td><td>122.4</td><td>82.8</td><td>0</td><td>42</td><td>604</td></tr><tr><td>Kuala Lampur</td><td>Urban</td><td>131.1</td><td>77.2</td><td>0</td><td>39</td><td>689</td></tr><tr><td>Singapore</td><td>Urban</td><td>174.0</td><td>71.0</td><td>0</td><td>49</td><td>732</td></tr><tr><td>Stockholm</td><td>Urban</td><td>119.7</td><td>70.4</td><td>0</td><td>32</td><td>590</td></tr><tr><td>Venice</td><td>Urban</td><td>197.8</td><td>90.0</td><td>0</td><td>39</td><td>701</td></tr><tr><td>Wildlife</td><td>Wildlife</td><td>85.7</td><td>59.3</td><td>1</td><td>12</td><td>374</td></tr><tr><td>Zurich</td><td>Urban</td><td>117.0</td><td>64.0</td><td>1</td><td>40</td><td>572</td></tr></tbody><tfoot><tr><td>Average</td><td></td><td>153.2</td><td>82.8</td><td>1.6</td><td>38.5</td><td>636</td></tr></tfoot></table>

Despite the large number of high-quality videos, egocentric video datasets (Damen et al., 2022; Grauman et al., 2022; Sener et al., 2022) have been used only for downstream tasks and thus come with extensive annotation. In comparison, WTours has 4-10 times longer average duration and twice the frame resolution. While WTours is smaller in terms of total duration and number of videos, it is scalable under the self-supervised setting since it requires no human labeling effort and more videos can be easily found, downloaded or even made. This makes collecting more data as simple as a walk in the park.

Very long video datasets. A large dataset of 10k WTours videos was created recently by (Wiles et al., 2022) but was not publicly released and not studied for self-supervised learning. Another dataset having hour-long videos is introduced in (Khan et al., 2020), in the context of sports analytics; it has not been explored for self-supervised learning either.

## A.2 DATASET ANALYSIS

Here we present a more detailed discussion on the dataset analysis of subsection 3.3. We refer to Figure 2, where we analyse the properties of a single WTours video compared with videos of the same length from Epic-Kitchens (Damen et al., 2022) and AVA (Gu et al., 2018) datasets, as well as two movie videos, an action movie and a romantic movie.

**Variation in lightness** We measure the change in perceived brightness using the lightness value (L) across consecutive frames. From Figure 2(a), we observe a gradual shift at roughly 150 min into the WTours video, transitioning from bright to dim to dark. By contrast, Epic-Kitchens and AVA videos exhibit random brightness fluctuations, alternating between dim and bright conditions. Typically, self-supervised pretraining happens on datasets with uniform brightness levels. Datasets featuring such brightness variations are less explored.

**Variation in number of objects** Using Detic (Zhou et al., 2022b), a DETR-style object detector trained on ImageNet-21k, we detect objects in each frame. Figure 2(b) shows the number of objects per frame and Figure 2(c) shows their frequency in the entire video. We observe that the WTours video contains 703 unique object categories, while Epic-Kitchens has 373, AVA has 663 and Movie-2 has 259. The unique objects appear more frequently and there are more unique objects per frame in WTours than in the other datasets. This makes WTours semantically richer, despite coming from one continuous stream of video. Using videos with a large number of objects can encourage the model to capture complex relations and variations in the data. Detailed statistics of objects and classes per WTours video are given in Table 6(b). Except for the wildlife video, WTours videos in general contain 40 or more objects per frame and 600 or more unique object categories per video.

**Variation in shots** Egocentric videos are typically captured in a single uninterrupted take, with exceptions being post-processed special effects or cuts. In Figure 2(d), we find that, on average, WTours and Epic-Kitchens videos contain only one or two shots per entire video, while AVA contains 406, an action movie (Movie<sub>act</sub>) (Skiptrace) contains 2000 and a romantic movie (Movie<sub>rom</sub>) (Central) contains 667. The substantial number of shots in movies and AVA poses challenges for representation learning methods that rely on object tracking or optical flow. In subsec-
tion 5.2, we show that WTours significantly outperforms movies in downstream tasks, which may be attributed to the absence of cuts. The number of shots per WTours video is also given in Table 6(b).

# B MORE ON EXPERIMENTAL SETUP

## B.1 MULTI-CROP

Following DINO (Caron et al., 2021) and iBOT (Zhou et al., 2022a), we apply the multi-crop strategy (Caron et al., 2020). In particular, we generate *m* local crops $\mathbf{X}_t^{\ell_i}$ of smaller resolution for $i \in \{1, \dots, m\}$. The local loss $L_t^{\text{LC}}$ for frame $t$ is applied to the [CLS] token between the teacher $f_{\theta'}$ output for a global view $\mathbf{X}_t^u$ and the student $f_{\theta}$ output for the local crop $\mathbf{X}_t^{\ell_i}$ for $i \in \{1, \dots, m\}$:

$$L_t^{\text{LC}} := \sum_{v \in V} \sum_{i=1}^{m} f_{\theta'}(\mathbf{X}_t^v)^{[\text{CLS}]} \log (f_{\theta}(\mathbf{X}_t^{\ell_i})^{[\text{CLS}]}) \quad (9)$$

The overall loss $L$ is the sum of the multi-object loss $L_t^O$ (8) and the local loss $L_t^{\text{LC}}$ (9), averaged over all $T$ frames:

$$L := \frac{1}{T} \sum_{t=1}^{T} (L_t^O + L_t^{\text{LC}}). \quad (10)$$

## B.2 IMPLEMENTATION DETAILS

Code will be published as open-source code. We use ViT-S/16 (Dosovitskiy et al., 2020) as the backbone in all our experiments. For each mini-batch, we randomly sample clips from the video, consisting of $T = 8$ frames temporally separated by 1 second i.e. we sample one frame every 30. Objects discovered in the first frame are tracked over the following 7 frames. Since each frame contains several different objects, applying the standard multi-crop augmentation (Caron et al., 2020) to the entire frame would result in crops with very different visual content or noisy positive pairs. Instead, we apply multi-crop to a 300 × 300 crop that we first take from the frame. Following DINO (Caron et al., 2021), we obtain two global crops and six local crops. Masking (7) is applied to the global crops seen by the student for the multi-object loss (8), while local crops are seen directly by the student for the local loss (9). We train for 100 epochs by default.

Objects are discovered using attention heads, where the total number of heads is in ViT-S/16 is limited to $h = 6$. For the purpose of the ablation of the number $k$ of objects for $k > h$ in Table 2b, we modify the MSA block in the final layer, resulting in configurations of 16 and 32 heads. Consequently, we can identify and track up to 16 and 32 objects within the video clip. To accomplish this, we decompose the query and key embeddings of dimension $d = 768$ into 16 and 32 subvectors, resulting in new feature dimensions of 24 and 12 respectively, as opposed to 64 for 6 heads. In Table 2b, we observe that tracking 16 or 32 objects results in overall poor performance possibly due to the small feature dimension, which encodes poor representations.

## B.3 HYPERPARAMETERS

**ImageNet-1k: Linear probing and k-NN** We pretrain DORA in a self-supervised setting with ViT-S/16 using DINO for 100 and 300 epochs. We use two global and six local crops for each clip and train on 8 A100 GPUs with a global batch size of $16 \times 8 = 128$. We use LARS with a learning rate of $5 \times 10^{-4}$, minimum learning rate of $1 \times 10^{-6}$, global crop scale of [0.4, 1.0] and local crop scale [0.05, 0.4].

For linear probing, we follow (Caron et al., 2021) and use the frozen features of the transformer backbone to train a linear classifier in a supervised setting. We use global batch size of 1024 on the training set and evaluate on the validation set of ImageNet-1k. We use top-1 accuracy (%) as our evaluation metric. For k-NN, we freeze the backbone and extract features of training images, then use a k-nearest neighbour classifier with $k = 20$.

**Pascal-VOC 2012: Object discovery** We use the validation set of Pascal VOC 2012 (Everingham et al.), which comprises a total of 1449 images. Following LOST (Siméoni et al., 2021), we use the
averaged self-attention map, extracted from the final layer of a our pretrained ViT-S/16, to retain 80% of the mass. We use the Jaccard similarity *J* measured as overlap between predicted mask *P* and the ground truth mask *G* as $J(P, G) = \frac{G \cap P}{G \cup P}$. We also use CorLoc, which measures the number of correct predicted boxes, where a predicted box is said to be correct if its IoU $\ge$ 0.5.

**ADE20k: Semantic segmentation** We evaluate DORA on ADE20k (Zhou et al., 2017) for semantic segmentation. The dataset includes 20,000 images in the training set and 2,000 images in the validation set. We use UperNet (Xiao et al., 2018) as the segmentation model and use DORA pretrained on WT to initialize the backbone. Following the experimental settings in iBOT (Zhou et al., 2022a), we use AdamW (Loshchilov & Hutter, 2019) with an initial learning rate of $6 \times 10^{-5}$, weight decay of $1 \times 10^{-2}$, and linear warmup of 1,500 iterations. We fine-tune for 160,000 iterations with a batch size of 4.

**MS-COCO: Object detection** We evaluate DORA for object detection and instance segmentation on MS-COCO. We use Cascade Mask R-CNN (Cai & Vasconcelos, 2019), which produces bounding boxes and instance masks simultaneously on the COCO dataset. We use a multi-scale training strategy, where we resize images to have a shorter side ranging between 480 and 800, ensuring that the longer side does not exceed 1,333 pixels. The learning rate is $1 \times 10^{-4}$ and the weight decay is 0.05. During training, we fine-tune the entire network using a $1 \times$ schedule, which involves 12 epochs with learning rate reductions by a factor of 10 at epochs 9 and 11. We explore different layer decay rates, specifically 0.65, 0.75, 0.8, 0.9, with a rate of 1.0 indicating no decay.

To generate hierarchical feature maps, we utilize the features produced by layers 4, 6, 8, and 12 of our network and apply two deconvolutions for layer 4, one deconvolution for layer 6, identity mapping for layer 8, and max-pooling for layer 12. These post-processing steps enable the creation of hierarchical feature representations. It is important to note that we do not employ multi-scale testing in our experiments.

**DAVIS-2017: Video object segmentation** We assess the performance of DORA for video object segmentation on DAVIS 2017 dataset (Pont-Tuset et al., 2017), which involves segmenting between 2 to 4 objects within the video frames. We follow DINO (Caron et al., 2021) and evaluate on video frames with a resolution of 480p. We apply label propagation on the attention map from our pretrained model and use mean region-based similarity $J_m$ and mean contour-based accuracy $F_m$ as our evaluation metrics.

**GOT-10k: Object tracking** We evaluate the object-tracking performance of DORA on the GOT-10k dataset (Huang et al., 2019). This is a large-scale benchmark for object tracking that contains 563 categories of common moving objects. The training set contains around 10,000 videos and the test set contains 180 videos. Another challenging aspect of this dataset is that the object classes in the training and test set are non-overlapping. We use the SeqTrack (Chen et al., 2023) codebase to evaluate the performance of different methods on this dataset. In particular, we initialize the encoder weights of SeqTrack with the self-supervised weights and keep them frozen during training. While training, we only update the parameters of the lightweight decoder which consists of 2 transformer blocks. We use all the default hyperparameters. We report mean average overlap (MAO) and success rate (SR) at different thresholds. The MAO measures the class-balanced average overlap between the ground truth and predicted bounding boxes whereas SR indicates the percentage of accurately tracked ground truth bounding boxes where the overlap crosses a certain threshold.

## C MORE ABLATIONS

**Pretraining WT video** We study the effect of pretraining on different videos of WTours. In Table 7a, we observe that the effect is minimal on both image classification and unsupervised object discovery. Notably, the fluctuation in illumination conditions within the *Bangkok* video influences the performance on image classification. It is also interesting to note that, while pretraining on *Amsterdam* is best on image classification, pretraining on *Venice* is best on object discovery. This could be due to the large overlap of objects in these videos with respect to the downstream datasets. However, the consistency of our method across diverse videos indicates that DORA is robust to variations in scenes, number of objects and lighting conditions.
<table><caption>(a) WT videos</caption><thead><tr><th>VIDEO</th><th>LP</th><th>CORLOC</th></tr></thead><tbody><tr><td>Amsterdam</td><td><strong>45.4</strong></td><td>54.5</td></tr><tr><td>Bangkok</td><td>42.1</td><td>54.3</td></tr><tr><td>Chiang Mai</td><td>44.9</td><td>55.5</td></tr><tr><td>Istanbul</td><td>44.5</td><td>54.6</td></tr><tr><td>Kuala Lampur</td><td>43.9</td><td>54.1</td></tr><tr><td>Singapore</td><td>42.7</td><td>54.7</td></tr><tr><td>Stockholm</td><td>44.1</td><td>54.7</td></tr><tr><td>Venice</td><td>44.5</td><td><strong>56.2</strong></td></tr><tr><td>Wildlife</td><td>44.0</td><td>54.9</td></tr><tr><td>Zurich</td><td>44.9</td><td>54.4</td></tr><tr><td>Mean</td><td>44.1</td><td>54.8</td></tr></tbody></table>

<table><caption>(b) Cuts</caption><thead><tr><th>METHOD</th><th>PT</th><th>LP</th><th>CORLOC</th></tr></thead><tbody><tr><td>DINO</td><td>WT</td><td>33.8</td><td>51.2</td></tr><tr><td>DORA</td><td>Movie</td><td>35.3</td><td>51.6</td></tr><tr><td>DORA</td><td>Movie†</td><td>39.8</td><td>54.8</td></tr><tr><td>DORA</td><td>WT</td><td><strong>44.5</strong></td><td><strong>56.2</strong></td></tr></tbody></table>

<table><caption>Table 7: *Effect of pretraining video and cuts.* ViT-S/16 pretrained, then frozen. (a) Different WTours video, using DORA. (b) Effect of cuts. \*: subset of videos with same total duration as a single WTours video. †: sampling without cuts. LP: top-1 accuracy (%) of linear probing on the validation set of ImageNet-1k. CorLoc: correct localization on validation set of Pascal-VOC 2012.</caption><thead><tr><th rowspan="2">METHOD</th><th rowspan="2">EPOCHS</th><th colspan="2">CLASSIFICATION</th><th colspan="2">OBJECT DISC.</th><th colspan="2">SEMANTIC SEG.</th><th colspan="2">OBJECT DET.</th></tr><tr><th>LP</th><th>k-NN</th><th>JACC</th><th>CORLOC</th><th>MIOU</th><th>ACC<sub>m</sub></th><th>MAP</th><th>MIOU</th></tr></thead><tbody><tr><td>DINO (Caron et al., 2021)</td><td>100</td><td>71.4</td><td>69.0</td><td>44.5</td><td>59.6</td><td>33.9</td><td>44.3</td><td>37.1</td><td>32.1</td></tr><tr><td>iBOT (Zhou et al., 2022a)</td><td>100</td><td>72.1</td><td>69.4</td><td>44.5</td><td>59.7</td><td>35.2</td><td>45.1</td><td>38.9</td><td>34.4</td></tr><tr><td>DORA* (ours)</td><td>60</td><td>71.9</td><td>69.4</td><td>44.4</td><td>60.0</td><td>35.4</td><td>44.9</td><td>39.3</td><td>34.9</td></tr><tr><td>DORA* (ours)</td><td>100</td><td><strong>72.2</strong></td><td><strong>69.6</strong></td><td><strong>44.8</strong></td><td><strong>60.2</strong></td><td><strong>35.8</strong></td><td><strong>45.1</strong></td><td><strong>39.9</strong></td><td><strong>35.1</strong></td></tr></tbody></table>

<caption>Table 8: *Pretraining on ImageNet-1k.* ViT-S/16 pretrained, then frozen (classification and object discovery, same settings as Table 5) or fine-tuned (semantic segmentation and object detection, same settings as Table 3). DORA*: DORA without tracking; when pretrained for 60 epochs, it has the same training time as DINO and iBOT.</caption>

**Presence of cuts** We now analyse the effect of cuts in representation learning. Cuts are defined as instant transitions from one shot to the next, which is frequent in movies. In action movies, a single shot lasts around 4 seconds, while in romance movies, around 12 seconds on average†. To understand the effect of cuts, we compare pretraining on WTours videos and a romance movie. We use PySceneDetect (Castellano) to extract the cut timestamps in the movie and we pretrain DORA by sampling clips that do not intersect cuts; cuts naturally do not exist in WT videos. In Table 7b, we observe that the performance improves significantly in the absence of cuts, as tracking in DORA will fail across a cut.

## D MORE COMPARISONS WITH STATE OF THE ART

**Pretraining on ImageNet-1k** We pretrain DORA on ImageNet-1k and compare with SoTA methods on multiple tasks. Unlike videos, we discover objects but do not track them. Instead, images in a mini-batch are processed independently. Given an input image X, we obtain refined object prototypes as usual (5), but the refined cross-attention (6) is with $\tilde{K}_t$ replaced by $\tilde{K}$ of the same image X. The same image X is masked for the student (7). The loss is given again by (8) and (9) with $X_t$ replaced by X, averaged over the mini-batch. We refer to this version as DORA *without tracking* or DORA*.

DINO (Caron et al., 2021) and iBOT (Zhou et al., 2022a) use only one global crop for the student, while DORA uses k object crops. To compensate, we perform an experiment where we pretrain DORA* for 60 epochs and the competitors for 100, thus all methods having the same training time.

From Table 8, we observe that DORA outperforms state-of-the-art self-supervised learning (SSL) methods like DINO and iBOT on image downstream tasks. This demonstrates that the multi-object loss not only enhances performance when pretrained on WTours videos but also achieves superior results when pretrained on ImageNet-1k images.

<footnote>†https://stephenfollows.com/many-shots-average-movie/</footnote>
<figure><img src="image_6.png" /><figcaption>Figure 5: For each input frame $X_t$ of a video clip, refined cross-attention map $T_t' \in \mathbb{R}^{k \times n}$ (6), using Sinkhorn-Knopp. For each object, one row of $T_t'$ is reshaped as $h/p \times w/p$ and upsampled to an $h \times w$ attention map overlaid on the input frame for $k=3$ objects encoded in blue, red and green channel. $T_t'$ yields three well separated objects shown in blue, red and green.</figcaption></figure>
<figure><img src="image_7.png" /><figcaption>Figure 6: For each input frame $X_t$ of a video clip, refined cross-attention map $T'_t \in \mathbb{R}^{k \times n}$ (6), using Sinkhorn-Knopp. For each object, one row of $T'_t$ is reshaped as $h/p \times w/p$ and upsampled to an $h \times w$ attention map overlaid on the input frame for $k=3$ objects encoded in blue, red and green channel. $T'_t$ yields three well separated objects shown in blue, red and green.</figcaption></figure>
E MORE VISUALIZATIONS

Figures 5 and 6 show example attention maps obtained using SK on different clips. These figures show that SK (6) leads to attention maps that exhibit spatial locality and are well aligned with objects in the scene. Remarkably, the masks seem to be even robust to occlusions, as shown in the sequence with a bicycle moving behind traffic lights.