The official repository of our paper "ACM-Net: Action Context Modeling Network for Weakly-Supervised Temporal Action Localization" .
Traditional methods mainly focus on foreground and background frames separation with only a single attention branch and class activation sequence. However, we argue that apart from the distinctive foreground and background frames there are plenty of semantically ambiguous action context frames. It does not make sense to group those context frames to the same background class since they are semantically related to a specific action category. Consequently, it is challenging to suppress action context frames with only a single class activation sequence. To address this issue, in this paper, we propose an action-context modeling network termed ACM-Net, which integrates a three-branch attention module to measure the likelihood of each temporal point being action instance, context, or non-action background, simultaneously. Then based on the obtained three-branch attention values, we construct three-branch class activation sequences to represent the action instances, contexts, and non-action backgrounds, individually.
Required packages are listed in requirements.txt
. You can install by running:
pip install -r requirements.txt
We evaluate our ACM-Net on two popular benchmark datasets THUMOS-14 and ActivityNet-1.3. We provide extracted features for
- THUMOS-14: Google Drive / Baidu Wangpan (pwd: vc21)
- ActivityNet-1.3: Google Drive / Baidu Wangpan (pwd: man7)
Before running the code, please download the target dataset and unzip it under the data/
folder.
You can train your own model by running:
# For the THUMOS-14 datasets.
python main_thu.py --batch_size 16
# For the ActivityNet-1.3 datasets.
python main_act.py --batch_size 64
You can configure your own hyper-parameters in config/model_config.py
To test your model, you can run following command:
# For the THUMOS-14 datasets.
python main_thu.py --test --checkpoint $checkpoint_path
# For the ActivityNet-1.3 datasets.
python main_act.py --test --checkpoint $checkpoint_path
Note that we apply the wandb
client to log the experiments, if you don't want to use this tool, you can disable it in the command with --without_wandb
like
python main_thu.py --without_wandb
If you find our code or our paper useful for your research, please cite our work:
@article{qu_2021_acmnet,
title={ACM-Net: Action Context Modeling Network for Weakly-Supervised Temporal Action Localization},
author={Sanqing Qu, Guang Chen, Zhijun Li, Lijun Zhang, Fan Lu, Alois Knoll},
journal={arXiv preprint arXiv:2104.02967},
year={2021}
}
We referenced the repos below for the code
If you have any question or comment, please contact the first author of this paper -- Sanqing Qu ([email protected])