MrinalJain17 / Human-Activity-Recognition

Recognizing human activities using Deep Learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Machine Learning Engineer Nanodegree

⚠️ This project is not maintained anymore ⚠️

Capstone Project - Human Activity Recognition

Recognizing human activities using Deep Learning

View the project notebook here - Link to Jupyter Notebook

Dataset

Recognition of Human Actions

There are a total of 599 videos, with each category having 100 videos (with the exception of Handclapping having 99 videos).

All the videos were captured at 25fps frame rate. Each video has a spatial resolution of 160x120 pixels.

Instructions

  1. Clone the repository and navigate to the downloaded folder.

    	git clone https://github.com/MrinalJain17/Human-Activity-Recognition.git
    	cd Human-Activity-Recognition
    
  2. Unzip the compressed data files and store in the format as mentioned here

    • Use the helper function download_files() present in data_utils.py as follows to do this in your current working directory automatically. (The function will delete the compressed files after they are successfully extracted)
    	import data_utils
    	
    	data_utils.download_files()
  3. The following file is corrupted which gives an error when being loaded. Delete it before proceeding.

    'person01_boxing_d4_uncomp.avi' (present in Data/Boxing/)

  4. In order to read the videos, there is a helper class Videos in utils.py.

    	import numpy as np
    	from utils import Videos
    	
    	reader = Videos(target_size=(128, 128), 
    			to_gray=True, 
                		max_frames=40, 
                		extract_frames='first', 
                		required_fps=5, 
                		normalize_pixels=(-1, 1))
    	
    	videos = reader.read_videos(video_absolute_paths)

    Refer the code for a detailed documentation.
    This utility is being maintained in a seperate repository here

  5. Run the following command to view the project notebook:

    	jupyter notebook human_activity_recognition.ipynb
    

Requirements

Python 3.x (preferably from the Anaconda Distribution)

Install FFmpeg on your machine

For Linux:

	$ sudo apt-get update
	$ sudo apt-get install libav-tools

For Windows or MAC/OSX:
Download the required binaries from here. Extract the zip file and add the location of binaries to the PATH variable

Additional Libraries:

  • Scikit-video

     	pip install sk-video
    
  • Tensorflow

     	pip install tensorflow
    

    For GPU support or a custom installation, follow the instructions given on the Tensorflow website.

  • Keras

     	pip install keras
    
  • tqdm - Required for displaying the progress bar.

     	pip install tqdm
    

These libraries will be required for successful execution of the project files.

About

Recognizing human activities using Deep Learning

License:MIT License


Languages

Language:Jupyter Notebook 99.6%Language:Python 0.4%