Skip to content

ManasB17/Face-Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is a set of utility functions for facial recognition using the facenet_pytorch library. The following functions are provided:

  • open_cam(cam_num): Opens a camera device and returns a VideoCapture object.
  • capture_frame(cap): Captures a frame from the given video capture device.
  • recognize_faces(unknown_embeddings, stored_embeddings): Calculates the distances between unknown embeddings and stored embeddings.
  • draw_bounding_boxes(box, frame, name, dist): Draws bounding boxes around detected faces and displays name and distance from stored embeddings.
  • facial_feature(model, img_cropped_list): Computes the facial feature embeddings of the input cropped face images using the given PyTorch model.
  • detect_face(frame, model): Detects a face in a frame using a given face detection model.
  • main(): Runs the main facial recognition program.

Dependencies

The following Python packages are required to run the facial recognition utility:

  • facenet_pytorch
  • Pillow
  • torchvision
  • torch

The following third-party libraries are required:

  • cv2 (OpenCV)

Installation

To use this project first install the required packages as listed:

--Install all required packages from requirements.txt file :

  pip install -r requirements.txt

Run Locally

Clone the project

  git clone 

Go to the project directory

  cd Computer-Vision

Install dependencies

  pip install requirements.txt

Open terminal

  python infer_recognize_face.py 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages