MCPcopy Index your code
hub / github.com/benedettaliberatori/T3AL

github.com/benedettaliberatori/T3AL @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
292 symbols 864 edges 43 files 43 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Paper Project page

Test-Time Zero-Shot Temporal Action Localization

Benedetta Liberatori, Alessandro Conti, Paolo Rota, Yiming Wang, Elisa Ricci

Paper

Abstract: Zero-Shot Temporal Action Localization (ZS-TAL) seeks to identify and locate actions in untrimmed videos unseen during training. Existing ZS-TAL methods involve fine- tuning a model on a large amount of annotated training data. While effective, training-based ZS-TAL approaches as- sume the availability of labeled data for supervised learning, which can be impractical in some applications. Furthermore, the training process naturally induces a domain bias into the learned model, which may adversely affect the model’s gen- eralization ability to arbitrary videos. These considerations prompt us to approach the ZS-TAL problem from a radically novel perspective, relaxing the requirement for training data. To this aim, we introduce a novel method that performs Test- Time adaptation for Temporal Action Localization (T3AL). In a nutshell, T3AL adapts a pre-trained Vision and Lan- guage Model (VLM) at inference time on a sample basis. T3AL operates in three steps. First, a video-level pseudo- label of the action category is computed by aggregating information from the entire video. Then, action localization is performed adopting a novel procedure inspired by self- supervised learning. Finally, frame-level textual descriptions extracted with a state-of-the-art captioning model are em- ployed for refining the action region proposals. We validate the effectiveness of T3AL by conducting experiments on the THUMOS14 and the ActivityNet-v1.3 datasets. Our results demonstrate that T 3 AL significantly outperforms zero-shot baselines based on state-of-the-art VLMs, confirming the benefit of a test-time adaptation approach.

Setup

We recommend the use of a Linux machine with CUDA compatible GPUs. We provide a Conda environment to configure the required libraries.

Clone the repo with:

git clone ...
cd T3AL

Conda

The environment can be installed and activated with:

conda create --name t3al python=3.8
conda activate t3al
pip install -r requirements.txt

Preparing Datasets

We recommend to use pre-extracted CoCa features to accelerate inference. Please download the extracted features for THUMOS14 and ActivityNet-v1.3 datasets from links below.

In the same folder, you will find captions generated with CoCa. Given the size of the datasets, we generated caption at 10 fps for THUMOS14 and 1 fps for ActivityNet-v1.3.

Pre-extracted Features

Dataset Link Captions
THUMOS14 Google Drive Google Drive
ActivityNet-v1.3 Google Drive Google Drive

Then add the paths in the config files config/<dataset_name>.yaml, for example as:

training:
  feature_path: '/path/to/Thumos14/features/'
  video_path: '/path/to/Thumos14/videos/'

Evaluation

The method can be evaluated on the dataset of interest and selecting the split and setting, by running the following bash script:

python src/train.py experiment=tt_<dataset_name> data=<dataset_name> model.video_path=</path/to/data/> model.split=<split> model.setting=<setting> data.nsplit=0 exp_name=<exp_name>

We provide config files for the main method tt_<dataset_name>, the training free baseline tf_<dataset_name> and the baselines baseline.

Citation

Please consider citing our paper in your publications if the project helps your research.

@InProceedings{Liberatori_2024_CVPR,
    author    = {Liberatori, Benedetta and Conti, Alessandro and Rota, Paolo and Wang, Yiming and Ricci, Elisa},
    title     = {Test-Time Zero-Shot Temporal Action Localization},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2024},
    pages     = {18720-18729}
}

Core symbols most depended-on inside this repo

defineProperties
called by 26
docs/static/js/bulma-carousel.js
_classCallCheck
called by 13
docs/static/js/bulma-carousel.js
train
called by 9
src/train.py
_package_available
called by 7
tests/helpers/package_available.py
run_sh_command
called by 5
tests/helpers/run_sh_command.py
state_dict
called by 4
src/data/custom_datamodule.py
load_state_dict
called by 4
src/data/custom_datamodule.py
defineProperties
called by 4
docs/static/js/bulma-slider.js

Shape

Function 186
Method 94
Class 12

Languages

Python52%
TypeScript48%

Modules by API surface

docs/static/js/fontawesome.all.min.js70 symbols
docs/static/js/bulma-carousel.js50 symbols
src/data/components/dataset.py15 symbols
src/models/tt_method_module.py13 symbols
src/models/tf_method_module.py13 symbols
src/models/components/tt_method.py13 symbols
src/models/baseline_module.py13 symbols
src/data/custom_datamodule.py11 symbols
src/models/components/tf_method.py10 symbols
docs/static/js/bulma-slider.js8 symbols
docs/static/js/bulma-carousel.min.js8 symbols
src/models/components/baselines.py7 symbols

For agents

$ claude mcp add T3AL \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page