Code Monkey home page Code Monkey logo

danet's Introduction

DANet: Dual-attention Network for View-invariant Action recognition.

We propose a Dual-Attention Network (DANet) aims to learn robust video representation for view-invariant action recognition. The DANet is composed of relation-aware spatiotemporal self-attention and spatiotemporal cross-attention modules. The relation-aware spatiotemporal self-attention module learns representative and discriminative action features. This module captures local and global long-range dependencies, as well as pairwise relations among human body parts and joints in the spatial and temporal domains. The cross-attention module learns view-invariant attention maps and generates discriminative features for semantic representations of actions in different views.

Main function and modules source code

The main function and modules source code will be released for future work and to facilitate communication

Datasets

There are 3 datasets to download:

  • NTU RGB+D 60 Skeleton
  • NTU RGB+D 120 Skeleton
  • UESTC skeleton Datatset

NTU RGB+D 60 and 120 Dataset Request dataset here: http://rose1.ntu.edu.sg/Datasets/actionRecognition.asp Download the skeleton datasets:

  • nturgbd_skeletons_s001_to_s017.zip (NTU RGB+D 60)
  • nturgbd_skeletons_s018_to_s032.zip (NTU RGB+D 120)
  • Extract above files to ./data/nturgbd_raw

UESTC Dataset Request dataset here: https://github.com/HRI-UESTC/CFM-HRI-RGB-D-action-database

Dataset Preparation.

Put downloaded data into the following directory structure:

  • data/
    • UESTC/ ... # raw data of UESTC
    • ntu/
    • ntu120/
    • nturgbd_raw/
      • nturgb+d_skeletons/ # from nturgbd_skeletons_s001_to_s017.zip ...
      • nturgb+d_skeletons120/ # from nturgbd_skeletons_s018_to_s032.zip

Generating Data:

cd ./data/ntu # or cd ./data/ntu120
 # Get skeleton of each performer
 python get_raw_skes_data.py
 # Remove the bad skeleton 
 python get_raw_denoised_data.py
 # Transform the skeleton to the center of the first frame
 python seq_transformation.py

Attention Results

Here we present the attention results learned by DANet on the NTU-60 dataset, where the ellipses' radius are proportional to the joint relevance. The greenlight ellipses indicate the correct attention weights, with a larger radius corresponding to higher weights.

  • DANet Attention weights (camera 1 (45 degree view). image

  • DANet Attention weights( camera 3 (side view)). image

  • DANet Attention weights (Drinking water) image

  • DANet Attention weights (Hugging other person) image

  • DANet Attention weights (Hand-shaking). image

Acknowledgements

This repo is based on 2s-AGCN and ST-TR. The data processing is borrowed from SGN

Thanks to the original authors for their work!

Contact

For any questions, feel free to contact: [email protected]

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.