Human-Activity-Recognition

Human Activity Recognition (HAR) System

Overview

This project implements a real-time Human Activity Recognition (HAR) system using advanced deep learning techniques. The system employs a Long-term Recurrent Convolutional Networks (LRCN) model to accurately classify various human activities from video inputs captured via a webcam. The user interface is built using Streamlit, enabling a seamless web-based interaction.

Features

Installation

Prerequisites

System Dependencies

Ensure you have the following system dependencies installed:

On Ubuntu, install these dependencies using:

sudo apt update
sudo apt install libgl1-mesa-glx libglib2.0-0

Python Packages

Clone the repository:

git clone https://github.com/thomasantony12/Human-Activity-Recognition.git 
cd HAR

Install the required Python packages:

pip install -r requirements.txt

Usage

  1. Start the Streamlit app:
    streamlit run HAR.py
    
  2. Open your web browser and go to http://localhost:8501 to access the HAR system.

  3. Grant necessary permissions for webcam access.

  4. The video feed will be displayed along with real-time activity classification.

Project Structure

Dataset

The dataset used for training and testing is UFC101 Dataset, the dataset consists of video files from various action. Each video file is manually labeled with its corresponding action.

Development

Running Tests

To run unit tests, execute:

pytest tests/

Sample Test Case Table | Test Case ID | Description | Input | Expected Output | Actual Output Status | | — | — | — | — | — | | TC1 | Test video feed capture | Start webcam | Webcam feed is displayed | Webcam feed is displayed | Pass | | TC2 | Test activity classification “Jumping Jack” | Video of activity | Activity classified as “Jumping Jack” | Activity classified as “Jumping Jack” | Pass | | TC3 | Test invalid input | Obstructed view | Error message or unknown classification | Error message or unknown classification | Pass

Challenges and Limitations

Future Work

Contributing

Contributions to enhance the HAR system are welcome. Please fork the repository and submit pull requests for any improvements or bug fixes.

License

Acknowledgements

Contact

For questions or support, please contact. thomasantony12042001@gmail.com