Skip to content

shmatozz/desktop-App-With-Face-Auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Desktop App with Face Authentication

Available languages: English, Russian

This repository presents my univercity coursework on theme:

Creating a Person Identification Application

Contents

  1. Problem statement
  2. Software Toolset
  3. Description of software system
  4. Testing
  5. Conclusion
  6. References

Problem statement

Goal

The main purpose of this work is to create an application for user identification using neural networks when trying to log in to a personal account.

Tasks

To achieve the goal, the following tasks were performed:

  1. Review of existing technologies
  2. Designing the structure and interface of the application
  3. Selection of relevant decision tools
  4. Software implementation of the designed application
  5. Increasing the ease of use of the application through the introduction of neural networks
  6. Testing the received application to ensure correct operation

Software Toolset

  • Python 3
  • Git
  • PyQt6
  • Qt Designer
  • Facenet-pytorch
  • PostgreSQL 14
  • Sphinx documentation

Description of software system

This project includes the implementation of the application by creating several independent windows created using the PyQt6 framework and Qt Designer. This application structure was chosen to improve the readability and perception of the code. Each window has its own class and file, therefore, all methods implemented in the class will apply only to a specific window. Also, the user interface and the implementation of the methods of each window were divided into different classes and files to improve the readability of the code.

List of application windows:

Account login window

Sign In window

Available interface elements:

  • Text field – initial value = “Hello!”, then it will be used to inform the user about errors
  • login field – user login input
  • password field – user password input
  • Remember me checkbox – when clicked, the application remembers the user and will not ask for re-authorization after closing
  • Sign In button – performs the user authorization procedure in the system using a password or face identification (if this option was enabled during registration or in the settings)
  • Sign Up button – opens the registration window in the system

Account registration window

Sign Up window Sign Up window

Available interface elements:

  • Required fields for registration:
    • name field – user real name input
    • login field – user login input
    • password field – user password input
  • Optional fields for registration:
    • surname field – user surname input
    • email field – user email input
  • Upload button – a button for uploading a photo to create a face layout and subsequent authentication using it. Immediately after selecting a photo, it is scanned for the presence of any face. If the face was not found, an error is displayed in the text field
  • Sign Up button – performs the user registration procedure in the system and returns the user to the authorization window
  • Back button – returns the user to the authorization window without registering a new account

Main application window

Main menu

Main menu window

This window consists of two parts:

  1. Slide menu for navigation. There are 3 states available:

    • completely closed
    • only page icons are shown (shown in screenshot, it is by default)
    • expanded, both icons and names of available pages are visible
  2. Main page of the application, where you can see how face recognition works by uploading a photo. After the algorithm completes, a photo with a highlighted face or faces will appear on the main screen

Main menu with uploaded image window

Available interface elements:

Slide menu:

  • Profile button – opens the user profile menu in the system
  • Settings button – opens the application settings menu
  • About button – opens the interface with a link to the project's GitHub repository
  • Close button – closes the slide menu

The main page of the application:

  • Upload button – upload a photo to demonstrate the operation of the facial recognition algorithm using a neural network.
  • Text field – output of the processed image with the recognized face (empty by default)

Profile menu

Profile menu

Available interface elements:

  • Fields name, surname, email, login – fields for displaying information entered by the user during registration
  • Change password button – shows the user the fields for entering a new password
  • Save button – saves data to the database if something has been changed
  • User avatar image – displays the uploaded image, when clicked opens a window for selecting a new image
  • Exit button – exits the user's account in the system and closes the application
  • Back button – returns the user to the main screen of the application

Settings menu

Settings menu

Available interface elements:

  • Enable face authentication checkbox - When this function is enabled, the Upload button opens to upload a photo with the user's face. If everything went without errors, a message is displayed about the successful connection of the function. Otherwise, an error message will be displayed and the user will not be able to press Back button to return to main menu. In this case, the user must either upload another photo or turn off the setting
  • Back button – returns the user to the main screen of the application

Testing

An account was taken into which the user had previously uploaded an image with his face. Next, an attempt was made to log in by the same user who created the account and an attempt to log in by a completely different person.

Account owner login attempt:

Account owner attempt

Stranger login attempt:

Stranger login attempt

Note: The authorization process is carried out in 5 attempts. The algorithm scans images from the user's device camera 5 times. For successful authorization, at least 3 out of 5 attempts must be successful. The attempt is considered successful if the distance between the embedding vectors of the face from the database and the face scanned from the camera is less than 0.5.

Conclusion

During the implementation of this project, it was possible to consider in detail the field of neural networks and machine learning, as well as try to apply these technologies in practice. Based on the results of consideration of various relevant decision tools in face recognition using neural networks, the FaceNet model was chosen due to its high accuracy rates. Moreover, during the work, it was possible to successfully implement the selected model into the user interface of the designed application, thereby greatly simplifying the authentication procedure in the application system.

This README file is an abbreviated version of the explanatory note for the course project. The full version will be uploaded later.

References

  1. F. Schroff, D. Kalenichenko, J. Philbin. FaceNet: A Unified Embedding for Face Recognition and Clustering : here
  2. Facenet-pytorch repo : here

About

university coursework - app for person identification

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages