|
--- |
|
license: gpl-3.0 |
|
tags: |
|
- tracking |
|
- VOT |
|
pretty_name: >- |
|
TrackingNet: A Large-Scale Dataset and Benchmark for Object Tracking in the |
|
Wild |
|
size_categories: |
|
- 10K<n<100K |
|
--- |
|
|
|
|
|
# TrackingNet devkit |
|
|
|
|
|
## Download from HuggingFace |
|
|
|
```python |
|
from huggingface_hub import hf_hub_download |
|
from huggingface_hub import HfApi |
|
from huggingface_hub import login |
|
|
|
# Login |
|
login(token = <YOUR_TOKEN>) # https://huggingface.co/settings/tokens -> Create new token |
|
|
|
# List files |
|
api = HfApi() |
|
files = api.list_repo_files(repo_id="SilvioGiancola/TrackingNet", repo_type="dataset") |
|
|
|
# [Optional] Filter files for "TRAIN_0" spliut only |
|
files = [file for file in files if "TRAIN_0/" in file] |
|
|
|
# Download all files from the list |
|
for file in files: |
|
hf_hub_download(repo_id="SilvioGiancola/TrackingNet", filename=file, repo_type="dataset", local_dir="TrackingNet_HF") |
|
|
|
# Download zipped TEST set |
|
hf_hub_download(repo_id="SilvioGiancola/TrackingNet", filename="TEST.zip", repo_type="dataset", local_dir="TrackingNet_HF") |
|
|
|
``` |
|
|
|
## TrackingNet pip package |
|
```bash |
|
conda create -n TrackingNet python pip |
|
pip install TrackingNet |
|
``` |
|
|
|
### Utility functions for TrackingNet |
|
|
|
```python |
|
from TrackingNet.utils import getListSplit |
|
|
|
# Get list of codenames for the 12 training + testing split |
|
TrackingNetSplits = getListSplit() |
|
print(getListSplit()) |
|
# returns ["TEST", "TRAIN_0", "TRAIN_1", "TRAIN_2", "TRAIN_3", "TRAIN_4", "TRAIN_5", "TRAIN_6", "TRAIN_7", "TRAIN_8", "TRAIN_9", "TRAIN_10", "TRAIN_11"] |
|
|
|
|
|
# Get list of tracking sequences |
|
print(getListSequence(split=TrackingNetSplits[1])) # return list of tracking sequences in that split |
|
print(getListSequence(split="TEST")) # return list of tracking sequences for testing |
|
print(getListSequence(split=["TRAIN_0", "TRAIN_1"])) # return list of tracking sequences for train splits 0 and 1 |
|
print(getListSequence(split="TRAIN")) # return list of tracking sequences for al train splits |
|
``` |
|
|
|
### Downloading TrackingNet |
|
|
|
```python |
|
from TrackingNet.Downloader import TrackingNetDownloader |
|
from TrackingNet.utils import getListSplit |
|
|
|
|
|
downloader = TrackingNetDownloader(LocalDirectory="path/to/TrackingNet") |
|
|
|
for split in getListSplit(): |
|
downloader.downloadSplit(split) |
|
``` |
|
|
|
|