Skip to content

nj7782/Facedetection_with_uniqueID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Facedetection_with_uniqueID: Using YoloV5+SORT for Therapist and Child Detection and Tracking

Overview

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.

Features

  • Unique ID Assignment: Each detected person is assigned a unique ID that remains consistent throughout the video.
  • Re-entry and Occlusion Handling: The system re-assigns the correct ID to a person who exits and re-enters the frame, or when visibility is partially obscured.
  • Efficient Tracking: Utilizes the YOLOv5 object detection model along with the SORT algorithm for real-time tracking.
  • Face Saving Logic: Every 10 seconds, the code will crop the faces of tracked persons and save them to the specified output folder. Filenames will include the tracking ID and the current timestamp.

Requirements

Before running the project, ensure you have the following installed:

  • Python 3.7+
  • OpenCV
  • PyTorch
  • SORT
  • YOLOv5

Installation

1. Clone the Repository

Clone this repository:

git clone https://github.com/nj7782/Facedetection_with_uniqueID.git

2. Install the Dependencies

Install the required dependencies:

pip install -r requirements.txt

3. Download YOLOv5

Download the YOLOv5 repository from the official GitHub page:

4. Download SORT

Download SORT from its official repository:

5. Download YOLOv5 Pre-trained Weights

Download the pre-trained YOLOv5 weights (for example, yolov5s.pt):

Make sure to place the weights file in the appropriate directory as referenced in the code.

Running the Code

To run the tracking system:

python detect_and_track.py

Output

The output video will display bounding boxes with unique IDs assigned to each person detected in the footage. The results will be similar to the output video found here:

Result


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages