File size: 9,530 Bytes
6dff8f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a56f151
6dff8f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a56f151
 
 
 
 
 
 
 
 
 
 
6dff8f9
 
a56f151
6dff8f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
---
license: apache-2.0
task_categories:
- object-detection
language:
- en
tags:
- Multi-Object-Tracking
pretty_name: HardTracksDataset
size_categories:
- 100K<n<1M
---


# HardTracksDataset: A Benchmark for Robust Object Tracking under Heavy Occlusion and Challenging Conditions

[Computer Vision Lab, ETH Zurich](https://vision.ee.ethz.ch/)

![image/png](https://cdn-uploads.huggingface.co/production/uploads/682088962c40f64d03c4bff7/P8z4Qtrw1-8R2IYQdnskJ.png)

## Introduction 
We introduce the HardTracksDataset (HTD), a novel multi-object tracking (MOT) benchmark specifically designed to address two critical 
limitations prevalent in existing tracking datasets. First, most current MOT benchmarks narrowly focus on restricted scenarios, such as 
pedestrian movements, dance sequences, or autonomous driving environments, thus lacking the object diversity and scenario complexity 
representative of real-world conditions. Second, datasets featuring broader vocabularies, such as, OVT-B and TAO, typically do not sufficiently emphasize challenging scenarios involving long-term occlusions, abrupt appearance changes, and significant position variations. As a consequence, the majority of tracking instances evaluated are relatively easy, obscuring trackers’ limitations on truly challenging cases. HTD addresses these gaps by curating a challenging subset of scenarios from existing datasets, explicitly combining large vocabulary diversity with severe visual challenges. By emphasizing difficult tracking scenarios, particularly long-term occlusions and substantial appearance shifts, HTD provides a focused benchmark aimed at fostering the development of more robust and reliable tracking algorithms for complex real-world situations.

## Results of state of the art trackers on HTD
<table>
  <thead>
    <tr>
      <th rowspan="2">Method</th>
      <th colspan="4">Validation</th>
      <th colspan="4">Test</th>
    </tr>
    <tr>
      <th>TETA</th>
      <th>LocA</th>
      <th>AssocA</th>
      <th>ClsA</th>
      <th>TETA</th>
      <th>LocA</th>
      <th>AssocA</th>
      <th>ClsA</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td colspan="9"><em>Motion-based</em></td>
    </tr>
    <tr>
      <td>ByteTrack</td>
      <td>34.877</td>
      <td>54.624</td>
      <td>19.085</td>
      <td>30.922</td>
      <td>37.875</td>
      <td>56.135</td>
      <td>19.464</td>
      <td>38.025</td>
    </tr>
    <tr>
      <td>DeepSORT</td>
      <td>33.782</td>
      <td>57.350</td>
      <td>15.009</td>
      <td>28.987</td>
      <td>37.099</td>
      <td>58.766</td>
      <td>15.729</td>
      <td>36.803</td>
    </tr>
    <tr>
      <td>OCSORT</td>
      <td>33.012</td>
      <td>57.599</td>
      <td>12.558</td>
      <td>28.880</td>
      <td>35.164</td>
      <td>59.117</td>
      <td>11.549</td>
      <td>34.825</td>
    </tr>
    <tr>
      <td colspan="9"><em>Appearance-based</em></td>
    </tr>
    <tr>
      <td>MASA</td>
      <td>42.246</td>
      <td>60.260</td>
      <td>34.241</td>
      <td>32.237</td>
      <td>43.656</td>
      <td>60.125</td>
      <td>31.454</td>
      <td><strong>39.390</strong></td>
    </tr>
    <tr>
      <td>OV-Track</td>
      <td>29.179</td>
      <td>47.393</td>
      <td>25.758</td>
      <td>14.385</td>
      <td>33.586</td>
      <td>51.310</td>
      <td>26.507</td>
      <td>22.941</td>
    </tr>
    <tr>
      <td colspan="9"><em>Transformer-based</em></td>
    </tr>
    <tr>
      <td>OVTR</td>
      <td>26.585</td>
      <td>44.031</td>
      <td>23.724</td>
      <td>14.138</td>
      <td>29.771</td>
      <td>46.338</td>
      <td>24.974</td>
      <td>21.643</td>
    </tr>
    <tr>
      <td colspan="9"></td>
    </tr>
    <tr>
      <td><strong>MASA+</strong></td>
      <td><strong>42.716</strong></td>
      <td><strong>60.364</strong></td>
      <td><strong>35.252</strong></td>
      <td><strong>32.532</strong></td>
      <td><strong>44.063</strong></td>
      <td><strong>60.319</strong></td>
      <td><strong>32.735</strong></td>
      <td>39.135</td>
    </tr>
  </tbody>
</table>


## Download Instructions

To download the dataset you can use the HuggingFace CLI. 
First install the HuggingFace CLI according to the official [HuggingFace documentation](https://huggingface.co/docs/huggingface_hub/main/guides/cli)
and login with your HuggingFace account. Then, you can download the dataset using the following command:

```bash
huggingface-cli download mscheidl/htd --repo-type dataset --local-dir htd
```

The video folders are provided as zip files. Before usage please unzip the files. You can use the following command to unzip all files in the `data` folder.
Please note that the unzipping process can take a while (especially for _TAO.zip_)

```bash
cd htd
for z in data/*.zip; do (unzip -o -q "$z" -d data && echo "Unzipped: $z") & done; wait; echo "βœ… Done"
mkdir -p data/zips        # create a folder for the zip files
mv data/*.zip data/zips/  # move the zip files to the zips folder
```


The dataset is organized in the following structure:

``` 
β”œβ”€β”€ htd
    β”œβ”€β”€ data
        β”œβ”€β”€ AnimalTrack
        β”œβ”€β”€ BDD
        β”œβ”€β”€ ...
    β”œβ”€β”€ annotations
        β”œβ”€β”€ classes.txt
        β”œβ”€β”€ hard_tracks_dataset_coco_test.json
        β”œβ”€β”€ hard_tracks_dataset_coco_val.json
        β”œβ”€β”€ ...
    β”œβ”€β”€ metadata
        β”œβ”€β”€ lvis_v1_clip_a+cname.npy
        β”œβ”€β”€ lvis_v1_train_cat_info.json
```

The `data` folder contains the videos, the `annotations` folder contains the annotations in COCO (TAO) format, and the `metadata` folder contains the metadata files for running MASA+. 
If you use HTD independently, you can ignore the `metadata` folder. 


## Annotation format for HTD dataset


The annotations folder is structured as follows:

```
β”œβ”€β”€ annotations
    β”œβ”€β”€ classes.txt
    β”œβ”€β”€ hard_tracks_dataset_coco_test.json
    β”œβ”€β”€ hard_tracks_dataset_coco_val.json
    β”œβ”€β”€ hard_tracks_dataset_coco.json
    β”œβ”€β”€ hard_tracks_dataset_coco_class_agnostic.json
```

Details about the annotations:
- `classes.txt`: Contains the list of classes in the dataset. Useful for Open-Vocabulary tracking.
- `hard_tracks_dataset_coco_test.json`: Contains the annotations for the test set.
- `hard_tracks_dataset_coco_val.json`: Contains the annotations for the validation set.
- `hard_tracks_dataset_coco.json`: Contains the annotations for the entire dataset.
- `hard_tracks_dataset_coco_class_agnostic.json`: Contains the annotations for the entire dataset in a class-agnostic format. This means that there is only one category namely "object" and all the objects in the dataset are assigned to this category.


The HTD dataset is annotated in COCO format. The annotations are stored in JSON files, which contain information about the images, annotations, categories, and other metadata.
The format of the annotations is as follows:

````python
{
    "images": [image],
    "videos": [video],
    "tracks": [track],
    "annotations": [annotation],
    "categories": [category]
}

image: {
    "id": int,                            # Unique ID of the image
    "video_id": int,                      # Reference to the parent video
    "file_name": str,                     # Path to the image file
    "width": int,                         # Image width in pixels
    "height": int,                        # Image height in pixels
    "frame_index": int,                   # Index of the frame within the video (starting from 0)
    "frame_id": int                       # Redundant or external frame ID (optional alignment)
    "video": str,                         # Name of the video 
    "neg_category_ids": [int],            # List of category IDs explicitly not present (optional)
    "not_exhaustive_category_ids": [int]  # Categories not exhaustively labeled in this image (optional)
        
video: {
    "id": int,                            # Unique video ID
    "name": str,                          # Human-readable or path-based name
    "width": int,                         # Frame width
    "height": int,                        # Frame height
    "neg_category_ids": [int],            # List of category IDs explicitly not present (optional)
    "not_exhaustive_category_ids": [int]  # Categories not exhaustively labeled in this video (optional)
    "frame_range": int,                   # Number of frames between annotated frames
    "metadata": dict,                     # Metadata for the video    
}
        
track: {
    "id": int,             # Unique track ID
    "category_id": int,    # Object category
    "video_id": int        # Associated video
}
        
category: {
    "id": int,            # Unique category ID
    "name": str,          # Human-readable name of the category
}
        
annotation: {
    "id": int,                    # Unique annotation ID
    "image_id": int,              # Image/frame ID
    "video_id": int,              # Video ID
    "track_id": int,              # Associated track ID
    "bbox": [x, y, w, h],         # Bounding box in absolute pixel coordinates
    "area": float,                # Area of the bounding box
    "category_id": int            # Category of the object
    "iscrowd": int,               # Crowd flag (from COCO)
    "segmentation": [],           # Polygon-based segmentation (if available)
    "instance_id": int,           # Instance index with a video
    "scale_category": str         # Scale type (e.g., 'moving-object')
}
````