GithubHelp home page GithubHelp logo

zhangnyg / actionrecognition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from i3orn2fly/actionrecognition

0.0 1.0 0.0 40.75 MB

Action Recognition based on Pose Estimation. Graduation Project for Bachelor Degree.

Python 2.42% Jupyter Notebook 0.23% PureBasic 97.33% Shell 0.02%

actionrecognition's Introduction

ActionRecognition

Action Recognition based on pose estimation.

Graduation Project for Bachelor Degree
By Kenessary Koishybay, Nauryzbek Razakhbergenov.
Mentor: Anara Sandygulova. Nazarbayev University

Introduction

Pose estimation algortihm is based on tensorflow implementation of Realtime Multi-Person Pose Estimation

Requirements:

  • Python 2.7
  • OpenCV3
  • sklearn
  • scipy
  • imutils
  • xgboost

Running

To run my code you need to type:
    python -B Main.py <input_video> <output_video>
Here, arguments <input_video> and <output_video> are optional, and default values can be seen in the code.

How it works

Pose Estimation

Pose estimation is the process of locating body key points.
Pose estimation problem is usually solved by training Deep Learning architectures with annotated datasets such as MPII or COCO
We didn't have computational power to train on these datasets. Thus, we tried pre-trained model mentioned at the beginning.
Architecture:

However, after looking that even prediction on that architecture takes too much time, we use Mobile Net in the final version. We use pose estimation for Detection and collecting coordinates (x,y) of body key-points.

Tracking

Note, that we decided to remove code concerning EWMA in the final version.

Activity Recognition

Single Data Sample Length:
290 = 2*14*10 (x,y coords of 14 body parts in 10 frames) + 10(indexes of each frame)

For every (N = 10)th frame:

  1. Open pose features calculated for every tracked humans
  2. This features is then added to the previous features of the tracks
  3. If the length of resulting feature vectors of specific tracks is large enough, feature vectors will be converted to data samples
  4. These data samples is then goes as input to the machine learning algorithm (XGBoost)
  5. XGBoost classifies activity of each data sample as code.
  6. Code is then decoded into Activity Labels

Training

If you wan't to train our activity recognition algorithm to increase accuracy, first you should extract suitable data from videos dataset.

Data Extraction

We extracted data samples from KTH dataset.
Code is in ExtractData folder.

Model Selection and Training

TODO

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.