This repository contains code for the AAAI 2021 paper:
A Hybrid Attention Mechanism for Weakly-Supervised Temporal Action Localization
- PyTorch 1.7.1
- pytorch-lightning 1.1.2
- loguru, colorama, etc.
Older versions of PyTorch(1.3+) and pytorch-lightning(0.9+) should also work but not tested.
You can create a new conda environment with all the dependencies using:
conda env create -f environment.yml
The ground-truth and I3D features for THUMOS14 and ActivitiNet1.2 dataset can be downloaded from here:
Please put the downloaded files/folders under data/
directory.
To train HAM-Net on Thumos14 dataset:
python main.py
Please check options.py
to know more about the available cli arguments.
To evaluate on Thumos14 dataset:
python main.py --test --ckpt [checkpoint_path]
For ActivityNet-1.2, use main_anet.py
script.
If you find this repo useful for your research, please consider citing the paper:
@misc{islam2021hybrid,
title={A Hybrid Attention Mechanism for Weakly-Supervised Temporal Action Localization},
author={Ashraful Islam and Chengjiang Long and Richard J. Radke},
year={2021},
eprint={2101.00545},
archivePrefix={arXiv},
primaryClass={cs.CV}
}