TD-DETR [ICCV 25]: The Devil is in the Spurious Correlations: Boosting Moment Retrieval with Dynamic Learning
July 20, 2025 · View on GitHub
The Devil is in the Spurious Correlations: Boosting Moment Retrieval with Dynamic Learning
Xinyang Zhou*, Fanyue Wei*, Lixin Duan, Angela Yao, Wen Li
Equal Contribution
This repo contains the official code of our ICCV2025 paper: [The Devil is in the Spurious Correlations: Boosting Moment Retrieval with Dynamic Learning]

Prerequisites
0. Clone this repo
1. Datasets
We use the features from Moment-DETR and CG-DETR.
QVHighlights md5: e07e50947226e01b1bd74122d6695c3c
Charades-STA md5: 262823450cd253c84f4afeb3f5e43170
TACoS md5: 8aa001f389bb57e5db0ab58a34dcfe9f
After downloading, you can change 'feat_root' in shell files under td_detr/scripts/*/.
2. Similarity Matrix
In Section 3.1: Video Synthesizer, we develop a Similarity based Spurious Pair Selection. To reduce the repeated calculations, we precalculated the similarity matrix and upload to google drive. We suggest either download and unzip them into similarity/ or modify the --sim_matrix_path option in shell files under td_detr/scripts/*/.
3. Dependencies
Creating conda environment and installing all the dependencies as follows:
# create conda env
conda create --name td_detr python=3.7
# activate env
conda actiavte td_detr
# install other python packages
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 torchtext==0.10.1 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt
4. Training & Evaluation
QVHighlights
# Training
bash td_detr/scripts/train.sh
# Eval
bash td_detr/scripts/inference.sh
Charades-STA
# Training
bash td_detr/scripts/charadesSTA/train_charades.sh
# Eval
bash td_detr/scripts/charadesSTA/inference_charades.sh
TACoS
# Training
bash td_detr/scripts/tacos/train_tacos.sh
# Eval
bash td_detr/scripts/tacos/inference_charades.sh
LICENSE
The codes are under MIT license.