0% found this document useful (0 votes)
32 views

Software Project Face Detection System Using Open CV Final Report

The document describes a face recognition attendance tracking project that uses computer vision libraries like OpenCV and face_recognition. It captures video frames from a webcam, detects faces in each frame, recognizes the faces by comparing them to known faces, and records the results in an Excel sheet. The main components are OpenCV for video processing, face_recognition for face detection and recognition, and Excel libraries for managing attendance data. It provides details on the workflow, functionalities of each library, and how they work together for live face recognition and attendance marking.

Uploaded by

Meghana K
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Software Project Face Detection System Using Open CV Final Report

The document describes a face recognition attendance tracking project that uses computer vision libraries like OpenCV and face_recognition. It captures video frames from a webcam, detects faces in each frame, recognizes the faces by comparing them to known faces, and records the results in an Excel sheet. The main components are OpenCV for video processing, face_recognition for face detection and recognition, and Excel libraries for managing attendance data. It provides details on the workflow, functionalities of each library, and how they work together for live face recognition and attendance marking.

Uploaded by

Meghana K
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Sure, let's break down the project details into a table format:

| Library | Purpose | Installation


Command (Python 3) |

|--------------------|---------------------------------------------------------------------------------------------------------------
---|-----------------------------------------------|

| `cv2` (OpenCV) | Computer vision library for image and video processing. Used for capturing
video frames, image resizing, and drawing on frames. | `pip3 install opencv-python` |

| `face_recognition` | Face recognition library for recognizing and manipulating faces from Python.
Used for face detection and recognition in the video stream. | `pip3 install face_recognition` |

| `numpy` | Numerical computing library, used for array operations. Used internally by
`face_recognition` for efficient numerical calculations. | `pip3 install numpy` |

| `xlwt`, `xlrd`, `xlutils` | Libraries for reading and writing Excel files (`.xls`). Used for managing
attendance data in an Excel sheet. | `pip3 install xlwt xlrd xlutils` |

### Project Overview:

The project uses computer vision techniques to perform face recognition in a live video stream
captured from a webcam. It marks attendance by comparing detected faces with known faces and
records the results in an Excel sheet. The main components and their functionalities are as follows:

1. **OpenCV (`cv2`):**

- Captures video frames from the webcam (`cv2.VideoCapture`).

- Resizes video frames to improve face recognition speed.

- Draws rectangles around detected faces and displays them.

2. **Face Recognition (`face_recognition`):**

- Recognizes faces in the video stream using pre-trained models.

- Compares face encodings of detected faces with known face encodings.

- Determines the best match for each face based on the smallest distance.

3. **Excel Operations (`xlwt`, `xlrd`, `xlutils`):**

- Reads and writes to an Excel sheet (`attendence_excel.xls`).

- Adds a new sheet for each lecture with date and student names.

- Marks attendance as "Present" for recognized faces.


### Workflow:

1. **Initialization:**

- Initializes OpenCV for video capture and sets up face recognition for known faces.

- Creates or opens an Excel file to store attendance data.

2. **Main Loop:**

- Captures video frames from the webcam.

- Resizes frames and converts them to RGB format for face recognition.

- Performs face recognition on every other frame to save processing time.

3. **Face Recognition:**

- Detects faces in the video frames using `face_recognition.face_locations`.

- Computes face encodings using `face_recognition.face_encodings`.

- Compares face encodings with known face encodings using `face_recognition.compare_faces` and
`face_recognition.face_distance`.

- Marks attendance in the Excel sheet for recognized faces.

4. **Display:**

- Draws rectangles around detected faces.

- Displays the video stream with face recognition results.

5. **Termination:**

- Exits the main loop and releases the webcam when the 'q' key is pressed.

### OpenCV (`cv2`):

OpenCV is an open-source computer vision and machine learning software library. It provides various
tools and functions for image and video processing. In this project, OpenCV is used for capturing
video frames, resizing images, drawing on frames, and displaying the video stream.

The face_recognition library is built on top of OpenCV and dlib. It simplifies face recognition tasks by
providing a high-level interface for working with facial features and matching faces. It uses pre-
trained models to detect and recognize faces in images and video streams.

You might also like