Available languages: English✅, Russian
This repository presents my univercity coursework on theme:
Creating a Person Identification Application
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.
To achieve the goal, the following tasks were performed:
- Review of existing technologies
- Designing the structure and interface of the application
- Selection of relevant decision tools
- Software implementation of the designed application
- Increasing the ease of use of the application through the introduction of neural networks
- Testing the received application to ensure correct operation
- Python 3
- Git
- PyQt6
- Qt Designer
- Facenet-pytorch
- PostgreSQL 14
- Sphinx documentation
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 – a window for entering a username and password (or face identification)
- Account registration window – a window for creating a new account in the system
- Main application window – application window for system navigation (profile view, application settings, etc.)
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
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
This window consists of two parts:
-
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
-
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
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)
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
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
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:
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.
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.