Skip to content

handhand123/PRSA-Net

Repository files navigation

Pyramid Region-based Slot Attention Network for Temporal Action Proposal Generation

-Paper

Usage Guide

Prerequisites

The training and testing in PRSA-Net is reimplemented in PyTorch for the ease of use.

Other minor Python modules can be installed by running

pip install -r requirements.txt

Code and Data Preparation

Download Datasets

We support experimenting with two publicly available datasets for temporal action detection: THUMOS14 & ActivityNet v1.3. Here are some steps to download these two datasets.

Download Features

You can get the TSN features for training and testing from G-TAD GoogleDrive. I3D features will be provided later.

Training

Install Align1D layers

cd aligner/
python setup.py install

Set the path of features in config/cfg.yaml

feature_path: $PATH_OF_FEATURES
video_info_path: $PATH_OF_ANNOTATIONS

Then, you can use the following commands to train PRSA-Net

python main.py --mode train --cfg $PATH_TO_CONFIG_FILE

Testing Trained Models

You can evaluate the model's action proposal generation performance and action detection performance at the same time by running the following command

python main.py --mode infer --cfg $PATH_TO_CONFIG_FILE

We use the weight of the 4-th epoch by default for model evaluation during the experiment. If you want, you can modify the eval_model field in the config file. This script will report the proposal generation performance in terms of AR(average recall) under various number of proposals, and detection performance in terms of (mean average precision) at different IoU thresholds..

proposal generation performance on THUMOS14

AR@100 RGB+Flow
PRSA-Net (I3D) 56.12

detection performance on THUMOS14

mAP@0.5IoU (%) RGB+Flow
PRSA-Net (I3D + two-stream) 55.0
PRSA-Net (I3D + PGCN) 58.7

Reference

My implementations borrow ideas from previous works.

BMN: BMN: Boundary-Matching Network for Temporal Action Proposal Generation.

G-TAD: Sub-Graph Localization for Temporal Action Detection

Contact

lishuaicheng@sensetime.com

About

The official implementation of PRSA-Net

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published