Giter VIP home page Giter VIP logo

cmcs-temporal-action-localization's Introduction

CMCS-Temporal-Action-Localization

Code for 'Completeness Modeling and Context Separation for Weakly Supervised Temporal Action Localization' (CVPR2019).

Paper and Supplementary.

Recommended Environment

  • Python 3.5
  • Cuda 9.0
  • PyTorch 0.4

Prerequisites

  • Install dependencies: pip3 install -r requirements.txt.
  • Install Matlab API for Python (matlab.engine).
  • Prepare THUMOS14 and ActivityNet datasets.

Feature Extraction

We employ UntrimmedNet or I3D features in the paper.

  1. Download the features:
  1. Join the zip files by zip --fix {} --out {} and unzip the files.
  2. Put the extracted folder into the parent folder of this repo. (Or change the paths in the config file.)

If you want to extract features by yourself, please refer to these two repos:

Other features can also be used.

Generate Static Clip Masks:

Static clip masks are used for hard negative mining. They are included in the download features. If you want to generate the masks by yourself, please refer to tools/get_flow_intensity_anet.py.

Check ActivityNet Videos

URL links of some videos in this dataset are no longer valid. Check the availability and generate this file: anet_missing_videos.npy.

Run

  1. Train models with weak supervision (Skip this if you use our trained model):
python3 train.py --config-file {} --train-subset-name {} --test-subset-name {} --test-log
  1. Test and save the class activation sequences (CAS):
python3 test.py --config-file {} --train-subset-name {} --test-subset-name {} --no-include-train
  1. Action localization using the CAS:
python3 detect.py --config-file {} --train-subset-name {} --test-subset-name {} --no-include-train

For THUMOS14, predictions are saved in output/predictions and final performances are saved in a npz file in output. For ActivityNet, predictions are saved in output/predictions and final performances can be obtained via the dataset evaluation API.

Settings

Our method is evaluated on THUMOS14 and ActivityNet with I3D or UNT features. Experiment settings and their auguments are listed as following.

config-file train-subset-name test-subset-name
1 configs/thumos-UNT.json val test
2 configs/thumos-I3D.json val test
3 configs/anet12-local-UNT.json train val
4 configs/anet12-local-I3D.json train val
5 configs/anet13-local-I3D.json train val
6 configs/anet13-server-I3D.json train test

Trained Models

Our trained models are provided in this folder. To use these trained models, run test.py and detect.py with the config files in this folder.

Citation

@InProceedings{Liu_2019_CVPR, author = {Liu, Daochang and Jiang, Tingting and Wang, Yizhou}, title = {Completeness Modeling and Context Separation for Weakly Supervised Temporal Action Localization}, booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2019} }

License

MIT

cmcs-temporal-action-localization's People

Contributors

finspire13 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.