EZ-CLIP: Efficient Zero-Shot Video Action Recognition

May 11, 2025 Β· View on GitHub

Official PyTorch Implementation
arXiv TMLR 2025 T2L Repository


πŸš€ Major Announcement: Published in TMLR 2025!

πŸŽ‰ EZ-CLIP has evolved into T2L: Efficient Zero-Shot Action Recognition with Temporal Token Learning and is now published in Transactions on Machine Learning Research (TMLR) 2025!
We’ve released a new, enhanced codebase for T2L, incorporating the latest advancements. Visit the new repository for the most up-to-date code and resources:
πŸ‘‰ T2L Repository πŸ‘ˆ

This EZ-CLIP repository remains available for reference but may not receive further updates. Explore T2L for the cutting-edge implementation!


Updates

  • πŸ“¦ Trained Models: Download pre-trained models from Google Drive.
  • πŸ“„ Published Paper: See details in the TMLR 2025 publication and new T2L repository.

Overview

EZ-CLIP Architecture

EZ-CLIP is an innovative adaptation of CLIP tailored for zero-shot video action recognition. By leveraging temporal visual prompting, it seamlessly integrates temporal dynamics while preserving CLIP’s powerful generalization. A novel motion-focused learning objective enhances its ability to capture video motion, all without altering CLIP’s core architecture.

For the latest advancements, check out T2L: Efficient Zero-Shot Action Recognition with Temporal Token Learning in the T2L Repository.

Contents

Introduction

EZ-CLIP tackles the challenge of adapting CLIP for zero-shot video action recognition with a lightweight and efficient approach. Through temporal visual prompting and a specialized learning objective, it captures motion dynamics effectively while retaining CLIP’s generalization capabilities. This makes EZ-CLIP both practical and powerful for video understanding tasks.

The work has been significantly advanced in our TMLR 2025 publication, T2L: Efficient Zero-Shot Action Recognition with Temporal Token Learning. Explore the T2L Repository for the latest developments.

Prerequisites

Set up the environment using the provided requirements.txt:

pip install -r requirements.txt

Model Zoo

Note: All models are based on the publicly available ViT/B-16 CLIP model.

Zero-Shot Results

Trained on Kinetics-400 and evaluated on downstream datasets.

ModelInputHMDB-51UCF-101Kinetics-600Model Link
EZ-CLIP (ViT-16)8x22452.979.170.1Link

Base-to-Novel Generalization Results

Datasets are split into base and novel classes, with models trained on base classes and evaluated on both.

DatasetInputBase Acc.Novel Acc.HMModel Link
K-4008x22473.160.666.3Link
HMDB-518x22477.058.266.3Link
UCF-1018x22494.477.985.4Link
SSV28x22416.613.314.8Link

Data Preparation

Extract videos into frames for efficient processing. See the Dataset_creation_scripts directory for instructions.
Supported datasets:

Training

Train EZ-CLIP with:

python train.py --config configs/K-400/k400_train.yaml

Testing

Evaluate a trained model with:

python test.py --config configs/ucf101/UCF_zero_shot_testing.yaml

Citation

If you find this code or models useful, please cite our work:

TMLR 2025 Publication:

@article{
ahmad2025tl,
title={T2L: Efficient Zero-Shot Action Recognition with Temporal Token Learning},
author={Shahzad Ahmad and Sukalpa Chanda and Yogesh S Rawat},
journal={Transactions on Machine Learning Research},
issn={2835-8856},
year={2025},
url={https://openreview.net/forum?id=WvgoxpGpuU},
note={}
}

arXiv Preprint:

@article{ahmad2023ezclip,
  title={EZ-CLIP: Efficient Zero-Shot Video Action Recognition},
  author={Ahmad, Shahzad and Chanda, Sukalpa and Rawat, Yogesh S},
  journal={arXiv preprint arXiv:2312.08010},
  year={2023}
}

Acknowledgments

This codebase builds upon ActionCLIP. We express our gratitude to the authors for their foundational contributions.
For the latest updates, visit the T2L Repository.


Contact: For questions or issues, please open an issue on this repository or the T2L Repository.

Explore the Future of Zero-Shot Action Recognition with T2L!
πŸ‘‰ T2L Repository πŸ‘ˆ