This repository is the official implementation of ECM. In this work, we study the weakly supervised temporal action localization and develop the Equivalent Classification Mapping (ECM) mechanism. Paper from arXiv or IEEE.
To install requirements:
conda env create -f environment.yaml
Before running the code, please activate this conda environment.
Download Thumos14 from baiduyun (code:ecmd).
Download ActivityNet1.2 from baiduyun (code:ecmd).
Download ActivityNet1.3 features from baiduyun (code:ecmd).
Please ensure the data structure is as below
├── data
└── Thumos14
├── val
├── video_validation_0000051.npz
├── video_validation_0000052.npz
└── ...
└── test
├── video_test_0000004.npz
├── video_test_0000006.npz
└── ...
└── ActivityNet1.2
├── training
├── v___dXUJsj3yo.npz
├── v___wPHayoMgw.npz
└── ...
└── validation
├── v__3I4nm2zF5Y.npz
├── v__8KsVaJLOYI.npz
└── ...
└── ActivityNet1.3
├── training
├── v___c8enCfzqw.npz
├── v___dXUJsj3yo.npz
└── ...
└── validation
├── v__1vYKA7mNLI.npz
├── v__3I4nm2zF5Y.npz
└── ...
To train the ECM model on THUMOS14 dataset, please first run this command:
cd ./tools
python train.py -dataset THUMOS14
To train the ECM model on ActivityNet v1.2 dataset, please run this command:
cd ./tools
python train.py -dataset ActivityNet1.2
To train the ECM model on ActivityNet v1.3 dataset, please run this command:
cd ./tools
python train.py -dataset ActivityNet1.3
To evaluate ECM model on Thumos14, run:
python eval.py -dataset THUMOS14 -weight_file ../checkpoints/THUMOS14_best.pth
To evaluate ECM model on ActivityNet1.2, run:
python eval.py -dataset ActivityNet1.2 -weight_file ../checkpoints/ActivityNet1.2_best.pth
To evaluate ECM model on ActivityNet1.3, run:
python eval.py -dataset ActivityNet1.3 -weight_file ../checkpoints/ActivityNet1.3_best.pth
You can download pre-trained models here:
- THUMOS14_best.pth baiduyun (code:ecmd) trained on THUMOS14 using parameters same as "./experiments/THUMOS14.yaml".
- ActivityNet1.2_best.pth baiduyun (code:ecmd) trained on ActivityNet v1.2 using parameters same as "./experiments/ActivityNet1.2.yaml".
- ActivityNet1.3_best.pth baiduyun (code:ecmd) trained on ActivityNet v1.2 using parameters same as "./experiments/ActivityNet1.3.yaml".
Our model achieves the following performance on :
threshold | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 |
---|---|---|---|---|---|---|---|---|---|
mAP | 62.61 | 55.05 | 46.47 | 38.19 | 29.13 | 19.50 | 10.88 | 3.80 | 0.42 |
threshold | average-mAP | 0.50 | 0.55 | 0.60 | 0.65 | 0.70 | 0.75 | 0.80 | 0.85 | 0.90 | 0.95 |
---|---|---|---|---|---|---|---|---|---|---|---|
mAP | 25.45 | 40.96 | 37.7 | 34.24 | 31.46 | 28.49 | 24.94 | 21.16 | 16.95 | 12.13 | 6.46 |
threshold | average-mAP | 0.50 | 0.55 | 0.60 | 0.65 | 0.70 | 0.75 | 0.80 | 0.85 | 0.90 | 0.95 |
---|---|---|---|---|---|---|---|---|---|---|---|
mAP | 23.48 | 36.68 | 34.08 | 31.52 | 29.01 | 26.49 | 23.56 | 20.04 | 16.08 | 11.42 | 5.92 |
@article{zhao2022equivalent,
title={Equivalent classification mapping for weakly supervised temporal action localization},
author={Zhao, Tao and Han, Junwei and Yang, Le and Zhang, Dingwen},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
year={2022},
publisher={IEEE}
}