Human Action Recognition Dataset Generation

$ 0.00

Total downloads: 9

This repository has the OpenCV python code which segments the human object from a video frame. The human object must be in action. This is further used to analyze and classify the different actions in a video. In this repository, you will get:

  • python code to segment the object in action from the video
  • processed data of UT interaction data and labels.xlsx

Description

Step1: Data Pre-processing

The frame segmentation part is done using python. I have attached a demo of the operation. The input video is the segmented video as downloaded from the weblink. The name of video has information for all actions and etc. An excel file is attached for it. An example is here

Set sequence # Activity Class ID Starting Frame # Ending Frame # Activity Class ID Main actor (left=0, right=1, both=-1)
00_1_4.avi’ seq1 4 32 89 punching 1

 

In each video for segmentation, we need to select the actor by marking ROI around the main actor and selecting it by pressing enter. The action of the main actor will be tracked automatically and each frame will be saved in the destined directory. The main actor in each video is defined in label.xlsx (designed from data on the website). You can check the video for this.

you need to take care of actors in each video, the video may have one or two main actors and need to be segmented all actors action. Further manual analysis is required to further filter the frames of action only. We will leave the rest frames of the main actor in each video. For example, in the above table, the main action is in from frame 32-89 and the activity class is 4 which is punching. Once all action data is filtered and labeled, can be used for classification.

Requisites to run main.py

  1. download python latest version from this link : https://www.python.org/downloads/
  2. install opencv as

2.1 go to the command prompt

2.2 type pip install opencv-python and enter

2.3 once its installation is finished, type

                              pip install opencv-contrib-python  and enter

How to run main.py

  • open command prompt
  • type the command as

python <directory of main.py> <input video location> <directory where images to be saved>

 

example:

python F://freelancer//aditiJah//Data_preprocessing//main.py F://freelancer//aditiJah//ut-interaction_segmented_set1//segmented_set1 F://freelancer//aditiJah//ut-interaction_segmented_set1//images

Step 2: How to run MATLAB code

 

once the data pre-processing and labels.xlsx is generated, run main.m by giving proper path in the code.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.