This repository contains the reference code for the a novel video-text retrieval method "Complementarity-aware Space Learning", codes and trained models will be released soon!
- Python 3.6
- Pytorch 1.7.1 (strongly recommand)
- Numpy 1.19
-
Please follow dual_enc to download the required features for MSRVTT. Then put the folder “msrvtt10k” under ${DataPath }.
-
Please follow HGR to download the required annotations (int2word.json, word2int.json, word_embeds.glove32b.th). Then put them under the file ${DataPath }.
# clone the repository
git clone
cd CSL
export PYTHONPATH=$(pwd):${PYTHONPATH}
To reproduce the results of our paper, do the following two steps:
-
modify the /path/to/data in ./inference.py into $DataPath
-
please run the code below:
python inference.py
To train a our CSL model, do the following two steps:
- modify the /path/to/data in ./train_msrvtt.py into $DataPath
- please run the code below:
cd ./
python main.py
Note that it takes 1 v100 GPUs and around 20 hours to train this model.