Skip to content

Face Authentication System: A Python application using AWS for face recognition

License

Notifications You must be signed in to change notification settings

bourbonbourbon/iot-facial-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IoT Facial Authentication using AWS Rekognition

This is a Python application for capturing images from a camera, comparing them with a reference image, and logging the results. The system utilizes Amazon Web Services (AWS) for image storage and face recognition services.

Getting Started

Before using this application, please ensure you have the following prerequisites:

  • Python 3.10.11 installed in a virtual environment.
  • AWS CLI configured with your API keys.

Install OpenCV on RasberryPi

Installing OpenCV using pip till take a lot of time and may be error prone. This is why it is better to install it using apt, which installs the prebuilt wheel.

Run this command in the terminal:

sudo apt install python3-opencv

Installation

  1. Clone this repository:

  2. Navigate to the project directory:

  3. Initialize the python virtual environment:

    python -m venv venv
  4. Install the required Python packages using pip:

    pip install -r requirements.txt
  5. Create a .env file in the project directory with the following content and replace <YOUR_BUCKET_NAME> and <YOUR_BASE_FACE_FILE> with your AWS S3 bucket name and the base face image file:

    bucket_name=<YOUR_BUCKET_NAME>
    base_face_file=<YOUR_BASE_FACE_FILE>
    

AWS Configuration

Make sure you have configured AWS CLI with your credentials using the following command:

aws configure

Provide your AWS Access Key ID, Secret Access Key, region, and output format. Toggle on Bucket Versioning on your S3 bucket.

Usage

To run the application, execute the face_auth.py script from the project directory:

python face_auth.py

Follow the on-screen instructions to allow the application to access your camera and detect faces. The application will capture an image if a face is detected and its quality is sufficient.

Important Notes

  • This application must be run from the project directory to correctly access the .env file and directories like captured_images, logs, haarcascade etc.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Face Authentication System: A Python application using AWS for face recognition

Topics

Resources

License

Stars

Watchers

Forks

Languages