Home

Awesome

STPN - Weakly Supervised Action Localization by Sparse Temporal Pooling Network (reproduced)

Overview

This repository contains a reproduced code for the paper "Weakly Supervised Action Localization by Sparse Temporal Pooling Network" by Phuc Nguyen, Ting Liu, Gautam Prasad, and Bohyung Han, CVPR 2018.

Usage Guide

0.Requirements

1.Preprocessing

  1. Subsample the video with the sampling ratio of 10 frames per second.
  2. After sampling the video frames, rescale them to make the smallest dimension of the frame equal to 256 while preserving the aspect ratio.
  3. Calculate the Optical Flow (TV-L1)
  4. Save the rgb frames to train_data/rgb and the flow frames to train_data/flows with the name of vid_num/{:06d}.png. (test_data/rgb, test_data/flows for the case of test data) I simply save the videos as 1,2,3,....200 for the convenience.
  1. Extract the feature vector of each video by using the code in the "feature_extraction" folder. The extracted features will be saved in the [train/test]_data/[rgb/flow]_features. Since I use the TITAN X GPU which has 12GB Memory, I extract the feature from 16*100 frames which means 100 segments at each time. If you have the GPU with smaller memory, you should extract the feature with the reduced number of segments. Please refer to the extract_feature.sh in the folder.

2.Train the Model

3.Test and Extract the Result

4.Evaluate

Reproduced Result

With the provided sample checkpoint(files in the code/ckpt/ckpt001), I got the following result for the THUMOS14 test set, which is similar to the paper.

tIoU0.10.20.30.40.50.60.70.80.9mAP
STPN(paper)52.044.735.525.816.99.94.31.20.121.2
Reproduced52.144.234.726.117.710.14.91.30.121.3

Please note that the best result appears around 22k ~ 25k and sometimes the performance could be slightly different from the numbers above.

Comments

If you have any questions or comments, please contact me. bellos1203@snu.ac.kr

Acknowledgements

This work was supported by Institute for Information & communications Technology Promotion(IITP) grant funded by the Korea government(MSIT) (2017-0-01780, The technology development for event recognition/relational reasoning and learning knowledge based system for video understanding)

License

Apache-2.0