Skip to content

mitu246/Activity-Recognition-in-Videos-using-Keras

Repository files navigation

Topic:

One of the motivations for this project was to choose an action that a Deep Neural Network could detect from a video. The action that was assigned to me was Detecting a “Stretching Body”. So, the task is to design a classifier using Deep Neural Networks architecture to detect and classify a stretching body.

Motivation:

In our daily lives we stretch before we hit the gym or start our morning schedule. One of the motivations for this topic could be that if we consider a camera fitted in a smart home where it could detect if a person is stretching or not, by this we could be able to record the number of times a person performed stretching in a day. With this we can set up a health monitor that could detect if the person performed stretching enough number of times or not.

Problem Statement:

The challenge here is to detect the activity (Stretching) through the videos. So, I would start with using different type of Neural Network architectures (Including CNN, LSTM, 3D CNN) to classify whether the "Stretching" is being performed in the video or not. The problem would be a binary class classification model where there would be two labels, "Stretching" and "No Stretching".

Data Generation and Gathering:

The dataset for stretching body was not available online. Thus, I collected some videos of people performing different type of stretches from YouTube. To generalize the data well enough, I looked for videos of same stretching manoeuvres performed at different camera angles and from different people. Also, I tried to include videos where a person is dancing or lying on the floor just to make model learn that any manoeuvre that seems close to stretching but is not actually a stretching manoeuvre. I downloaded about 40 different videos which had a many stretching manoeuvres performed in them at different times. Mostly videos were about 10 to 25 min long. So, I used "Moviemaker Tool" to cut long videos into short videos to prepare the training dataset. For example, I had a video in which a person performed 10 stretches and I cut the whole video into 10 different shorter videos of stretching body. Any part of the video in between those 10 stretches had served as candidate videos for non-stretching data. Thus, in total I had about 230 videos of Stretching and Non-Stretching body, out of which 130 are the videos falling in “Stretching Class” and 100 fall in “Non-Stretching Class”. Most of the videos were pretty short ranging from 5s to 15s, and any single video contained just one stretching manoeuvre or didn’t contain it at all.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages