Facedetection_with_uniqueID: Using YoloV5+SORT+KalmanFilter for Therapist and Child Detection and Tracking
This project focuses on detecting and tracking people (therapist and child) in video footage using YOLOv5 and the SORT tracking algorithm. The system assigns unique IDs to individuals and tracks them consistently throughout the video, even if they re-enter the frame or are partially occluded.
While the implementation works, it may have limitations in tracking accuracy, particularly in scenarios where a person goes out of the frame or after an occlusion. The Kalman filter helps improve tracking but may not always handle re-identification perfectly in complex scenarios.
- YOLOv5: State-of-the-art object detection for identifying people.
- SORT: Efficient tracking algorithm for assigning unique IDs.
- Kalman Filter: Used to smooth tracking and predict object positions during occlusions.
-
Download the required files:
- YOLOv5 from the official repository: Download YOLOv5
- SORT for tracking: Download SORT
- YOLOv5 Weights: Pre-trained weights such as
yolov5s.ptcan be used.- Download example weights: yolov5s.pt
- Kalman Filter Implementation: This is integrated into the codebase, no additional setup is required.
-
Install dependencies:
- Make sure to install all required packages by running the following command:
pip install -r requirements.txt
- Make sure to install all required packages by running the following command:
- Clone or download this repository.
- Update the paths in the
inference.pyscript:- Specify paths to YOLOv5, SORT, Kalman Filter, and weights files.
- Update the video file path for your input video.
- Run the script:
python inference.py