This project implements a real-time human activity recognition system using deep learning models. The project integrates YOLO for object detection and ResNet-34 for action classification, offering a robust solution for applications like surveillance, healthcare monitoring, and more.
- Real-time person detection using YOLO (You Only Look Once).
- Activity classification using a pre-trained ResNet-34 model.
- Supports both image-based and video-based human activity recognition.
- GPU-accelerated performance with CUDA for faster inference.
- Audio feedback for detected actions and status.
model/
├── resnet-34.onnx
├── yolov3.cfg
├── yolov3.weights
├── coco.names
└── Audio/
images/
test/
train/
├── class 1
├── class 2
image.py
video_detection.py
realtime.py
- Python 3.8 or later
- Libraries:
opencv-pythonnumpyplaysound- CUDA-compatible GPU and drivers for acceleration
-
Clone the repository:
git clone https://github.com/harish-00-11/Human-Activity-Recognition-using-deep_learning.git cd real-time-human-activity-recognition -
Install required libraries:
pip install -r requirements.txt
-
Download the required pre-trained models:
- Place the YOLO files (
yolov3.cfg,yolov3.weights, andcoco.names) in themodel/directory. - Rename
resnet-34_kinetics.onnxtoresnet-34.onnxand place it in the same directory.
- Place the YOLO files (
-
Add your test images to the
images/folder and videos to thetest/folder.
Run the following command to classify actions from images:
python image.pyProcess a video file to detect and classify actions:
python video_detection.pyUse a webcam to detect and classify actions in real-time:
python realtime.py- Bounding Boxes: Persons detected by YOLO are highlighted with green rectangles.
- Action Labels: The identified activity is displayed on the screen with confidence percentages.
- Audio Feedback: Alerts indicating detection status and classified actions.
- YOLOv3: For real-time object detection.
- ResNet-34: For robust activity recognition.
- OpenCV: For image processing and display.
- CUDA: For accelerating the computation.