Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
B Biometric Authentication For OS Login
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Sahil Paryani
  • Biometric Authentication For OS Login
  • Wiki
  • For Developers

Last edited by Sahil Paryani Aug 01, 2023
Page history

For Developers

Developer Manual

The setting up of the module can be seen in the User Manual. This page works on the assumption that you have gone through it and have configured the setup.

Enrollment Script

Description

The enrollment script captures facial images from the user using the webcam, extracts facial features, and saves them as templates for authentication.

Usage

Run the enrollment script with the desired username as an argument:

python enroll.py <username>
  • The script will capture multiple facial images at 2-second intervals. Ensure that the user looks at the camera during this process.
  • After capturing images, facial features will be extracted and saved as templates in the templates directory.

Customization

  • You can change the number of images captured during enrollment by modifying the num_images_to_capture variable in the enroll.py script.
  • The script saves facial templates in the templates directory. If you want to change the template storage location, modify the template_dir variable in the enroll.py script.
  • Apart from this you can even develop a way to enroll already existing images in the system for template formation.

Authentication Script

Description

The authentication script performs real-time face recognition using the webcam and compares facial features with the stored templates to grant or deny access.

Usage

Open the terminal and Run the authentication script:

python authenticate.py
  • The script will open the webcam and start real-time face recognition.
  • If a recognized face matches a stored template with a distance less than 0.4, access will be granted.
  • If not recognized it will redirect you to the password authentication method.

Customization

  • The authentication threshold for face recognition is set to 0.4 (face_distance < 0.4). You can adjust this threshold for your specific requirements by modifying the condition in the authenticate.py script.
  • Apart from this you can setup a completely different authentication system with different libraries and working model.

PAM Module in C

Description

The PAM module is responsible for integrating the face recognition system with the Ubuntu login process, and also calling the authentication python script and checking the access control status from it.

Clone repository
  • For Developers
  • For Users
  • Home