Formulario_Cadastro_RDS_OpenCV

The algorithm performs a simple user registration (Name, CPF, E-mail and Telephone) in an Amazon RDS database and also performs the storage, training and facial recognition of the user's face to identify the users already registered in the system in a next time the user is seen.

Requirements

You will need to install the libraries below:

  • numpy
  • OpenCV
  • mysql-connector

Creating RDS-MySQL instance on AWS

  • Access the "AWS Management Console"
  • Open the services menu and select the RDS option
  • Select the "Create database" option
  • Select MySQL
  • Version: MySQL 8.0.11
    -> Free tier
  • Enter the basic data, username and password:

db instance: "database name"

username: "your username"

password: "your password"

  • DB instance size and Storage is default not to mess
  • VPC: Default
  • Subnet group: default
  • Public access: Yes
  • VPC security group: Create new

New VPC security group name: <enter_com_the_name>

  • Availability Zone: choose where you are connected

Operation

When the code is run, the menu below will be presented with the options for registration and identification:
image

Option 1

If option 1 is selected, some fields will be presented for filling in the new registration as shown below:
image

After completing the new registration in our database, the face recognition screen will be presented.image

On this screen we have the option to register a new user photo (space key), perform the training (letter t), or log out (letter q). Pressing the 'space' key on the keyboard, we will capture the photos to perform the training later.
image

By pressing 'space' a folder will be created called 'USER' and inside it will be created a folder with the name previously registered, inside that folder will be stored all the photos of the user that we just registered. In the case of a new registration, another folder will be created automatically with the name registered within the 'USER' folder.
image

Now the time has come to carry out the training of our algorithm for it to recognize the registered user through the photos taken. To do this, press the 't' key on the same screen where we took the capture. The algorithm will be trained and the name of the registered user will be presented directly in the facial recognition layer.
image

Option 2

When the code is run, the menu below will be presented with the options for registration and identification:
image

If option 2 is selected, the face recognition screen will be presented to the user.
image

As in this case we already have our user registered in our database in the cloud, it will only be necessary to press the 't' key to run the training algorithm so that he can recognize the user's face and present his name.
image

Validating the registration via MySQL Workbench

We use MySQL Workbench to validate that our registered user was successfully registered
image

GitHub

https://github.com/vmeazevedo/Formulario_Cadastro_RDS_OpenCV