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.
- Real-Time Processing: Captures and processes video feed in real-time.
- Activity Classification: Identifies activities such as "Apply Lipstick", "Baby Crawling", "Blowing Candles", "Brushing Teeth", "Cutting In Kitchen", "Haircut", "Hammering", "Head Massage", "Horse Riding", "Jumping Jack", and "Shaving Beard".
- User-Friendly Interface: Interactive web application for easy usage.
- Adaptive Learning: Capable of continuous learning to enhance accuracy.
- Python 3.9+
- pip (Python package installer)
Ensure you have the following system dependencies installed:
libgl1-mesa-glx
libglib2.0-0
On Ubuntu, install these dependencies using:
sudo apt update
sudo apt install libgl1-mesa-glx libglib2.0-0
git clone https://github.com/thomasantony12/Human-Activity-Recognition.git
cd HAR
pip install -r requirements.txt
- Start the Streamlit app:
streamlit run HAR.py
-
Open your web browser and go to http://localhost:8501 to access the HAR system.
-
Grant necessary permissions for webcam access.
-
The video feed will be displayed along with real-time activity classification.
- HAR.py: Main application file for running the Streamlit app.
- model84.keras: Pre-trained LRCN model for activity recognition.
- requirements.txt: List of Python dependencies required for the project.
- tests/: Directory containing unit tests for the project.
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.
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 |
TC2 | Test activity classification "Jumping Jack" | Video of activity | Activity classified as "Jumping Jack" | Activity classified as "Jumping Jack" |
TC3 | Test invalid input | Obstructed view | Error message or unknown classification | Error message or unknown classification |
- Predefined Activities: Limited to specific activities trained in the model.
- Hardware Dependency: Requires a good quality webcam for optimal performance.
- Performance Variability: Real-time performance depends on the hardware capabilities of the system.
- Expand Activity Set: Incorporate a broader range of human activities.
- Model Improvement: Enhance model accuracy with more training data and better algorithms.
- Performance Optimization: Improve system performance on lower-end devices.
- Multisensory Integration: Integrate data from other sensors for more robust activity recognition.
Contributions to enhance the HAR system are welcome. Please fork the repository and submit pull requests for any improvements or bug fixes.
- This project is licensed under the MIT License. See the LICENSE file for more details.
- Streamlit for the web framework.
- TensorFlow/Keras for the deep learning tools.
- Dataset providers used for training the LRCN model.
For questions or support, please contact.
[email protected]