T-CoRe
March 20, 2025 ยท View on GitHub
This is the official code for the paper "When the Future Becomes the Past: Taming Temporal Correspondence for Self-supervised Video Representation Learning" accepted by Conference on Computer Vision and Pattern Recognition (CVPR 2025). This paper is available at here.
When the Future Becomes the Past: Taming Temporal Correspondence for Self-supervised Video Representation Learning
Authors: Yang Liu, Qianqian Xu*, Peisong Wen, Siran Dai, Qingming Huang*

๐ฉ Checkpoints
| Dataset | Backbone | Epoch | J\\&F_m | mIoU | PCK@0.1 | Download |
|---|---|---|---|---|---|---|
| ImageNet | VIT-S/16 | 100 | 64.1 | 39.7 | 46.2 | link |
| K400 | VIT-S/16 | 400 | 64.7 | 37.8 | 47.0 | link |
| K400 | VIT-B/16 | 200 | 66.4 | 38.9 | 47.1 | link |
๐ป Environments
- Ubuntu 20.04
- CUDA 12.4
- Python 3.9
- Pytorch 2.2.0
See requirement.txt for others.
๐ง Installation
-
Clone this repository
git clone https://github.com/yafeng19/T-CORE.git -
Create a virtual environment with Python 3.9 and install the dependencies
conda create --name T_CORE python=3.9 conda activate T_CORE -
Install the required libraries
pip install -r requirements.txt
๐ Training
Dataset
- Download Kinetics-400 training set.
- Use third-party tools or scripts to extract frames from original videos.
- Place the frames in
data/Kinetics-400/frames/train. - Generate files for training data by
python base_model/tools/dump_files.pyand plce the files indata/Kinetics-400/frames. - Integrate the frames and files into the following structure:
T-CoRe โโโ data โ โโโ Kinetics-400 โ โโโ frames โ โโโ train โ โ โโโ class_1 โ โ โ โโโ video_1 โ โ โ โ โโโ 00000.jpg โ โ โ โ โโโ 00001.jpg โ โ โ โ โโโ ... โ โ โ โ โโโ 00019.jpg โ โ โ โโโ ... โ โ โ โโโ video_m โ โ โโโ ... โ โ โโโ class_n โ โโโ class-ids-TRAIN.npy โ โโโ class-names-TRAIN.npy โ โโโ entries-TRAIN.npy โ โโโ labels.txt โโโ base_model โโโ scripts
Scripts
We provide a script with default parameters. Run the following command for training.
bash scripts/pretrain.sh
The well-trained models are saved at here.
๐ Evaluation
Dataset
In our paper, three dense-level benchmarks are adopted for evaluation.
| Dataset | Video Task | Download link |
|---|---|---|
| DAVIS | Video Object Segmentation | link |
| JHMDB | Human Pose Propagation | link |
| VIP | Semantic Part Propagation | link |
Scripts
We provide a script with default parameters. Run the following command for evaluation.
bash scripts/eval.sh
๐๏ธ Citation
If you find this repository useful in your research, please cite the following papers:
@misc{liu2025futurepasttamingtemporal,
title={When the Future Becomes the Past: Taming Temporal Correspondence for Self-supervised Video Representation Learning},
author={Yang Liu and Qianqian Xu and Peisong Wen and Siran Dai and Qingming Huang},
year={2025},
eprint={2503.15096},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2503.15096},
}
๐ง Contact us
If you have any detailed questions or suggestions, you can email us: liuyang232@mails.ucas.ac.cn. We will reply in 1-2 business days. Thanks for your interest in our work!