[ Teaching ]  Implementation Of Face Recognition “Access Control System” Using NVIDIA Jetson Nano - PART II
  Comments:

Implementation Of Face Recognition “Access Control System” Using NVIDIA Jetson Nano - PART II

  By : Leadtek AI Expert     8914

Remember the face recognition access control system mentioned in the previous article? Click here for recap.

You can refer to the table below for the items required. In this article, I will introduce how to build such a system by yourself.


Item
Quantity
NVIDIA Jetson Nano
1
5V4A power supply (for Jetson Nano)
1
House model with door
1
PWM control board (PCA9685)
1
SG90 motor
1
Logitech camera (C310)
1
Dupont Cable (Female to Female)
6
Keyboard and mouse
1


The items are displayed in the picture below, and the installation is not difficult. The key is the installation of the model's door shaft and the connection of the control board.


First, mount the motor under the floor of the house and connect the motor shaft to the door shaft.


Then connect the wire of the motor to the PWM control board, and connect it to pin location 0. This completes the motor connection.


Next, prepare 4 Dupont Cables to be connected to GND, SCL, SDA and UCC on the PWM control board. This part is for connection with Jetson Nano, so that the results of human face recognition can be transmitted to the door shaft to open and close the door. The GPIOs on the Jetson Nano are connected to GND, (Pin 5) I2C_2SCL, (Pin 3) I2C_SDA, and 3V3 in order.

  

At this stage, the installation is almost done. I also added a button for booting up, eliminating the need to unplug the power cord now and then. You have to prepare 2 Dupont Cables and a button module. The button module is connected to GND and OUT, and the Jetson Nano is connected to the J40 position.

Finally, connect the USB Camera and connect the keyboard, mouse and monitor, and you're done.

The display interface supported by Jetson Nano is HDMI and DP. Avoid using adapters, and remember to prepare a monitor with such connectors.


If you successfully enter the Jetson Nano page after boot up, you can start the software installation. Please refer to the previous article for the related resources for face recognition, and download it to the system. We have integrated this module into an icon. The following figure shows the icon content and the actual running environment. In this system, Python version 3.6.8, and deep learning framework TensorFlow 1.14.0 are used, along with CUDA 10.0.


In addition to face recognition, the system also adds recognition functions for emotion, age and gender mentioned in the previous article. Except for face recognition, the other three functions will be displayed on the screen without the need for identity verification. To verify, what happens if someone who can’t be identified is in front of the camera? Please check out the video below.


As shown in the video, if an unidentifiable person appears, the door will automatically close.

Is it difficult to add new people? Not at all.

You only need to prepare photos from 5 different angles, and first zoom them to 800x600 resolutions with MS Paint. As the Jetson Nano has only 4GB memory and the operating system takes up nearly 1GB of memory after startup, if the image resolution is too high, the model cannot be trained.


After adjusting the 5 photos, create a new folder with the same name as the person and copy the photos into the folder. 

 

Start the training again, and the system will add the new person information to the model. Let's check the result.


As shown in the video, when Harry (the male) enters the screen, the system can recognize his identity and the door opens automatically.

But when other unidentifiable people (the female) appeared, the door closed again.

Even the unidentifiable people appeared, it can still detect the motion, age and gender information, and the result will be shown on the top of the green bounding box.

That's how easy you can build your face recognition AI model using NVIDIA Jetson Nano.



Comments as following