This project implements a real-time Human Activity Recognition system using a pre-trained deep learning model built with TensorFlow/Keras. The system captures live video from a webcam and classifies human actions such as walking, sitting, standing, and more.
- π§ Project Overview
- π Project Structure
- π Model Details
- π How It Works
- π¦ Requirements
βΆοΈ How to Run- π§ͺ Sample Output
- π Notes
- π§° Utility Function: Max Subsequence
- π· Screenshots (Optional)
- π€ Contributing
- π License
The goal of this project is to recognize and classify human activities using a Convolutional Neural Network (CNN) trained on image data. The model is capable of identifying various physical states from webcam video in real time.
- π§ Standing
- πͺ Sitting
- ποΈ Sleeping
- πΆ Walking
- π§ Walking on Stairs
- βΉ Control (Default/Idle state)
- Framework: TensorFlow / Keras
- Input Size: 150x150 RGB images
- Normalization: Pixel values scaled to
[-1, 1] - Output: Softmax classification across 6 activity classes
- Captures live video feed using OpenCV.
- Each frame is:
- Converted to a PIL image
- Resized to 150x150 pixels
- Normalized and reshaped to match the model's input format
- Model predicts the activity from the processed frame.
- Predicted label is printed to the console with a timestamp.
Install the dependencies using pip:
pip install numpy opencv-python tensorflow pillowEnsure your webcam is connected and functional.
Run the main script:
Copy Edit
python main.pyPress q to exit the live video feed.