Skip to content

+49 1626571232

info@openelab.io

🚀 Free Shipping from 50€ in EU / 80€ Worldwide

Build a Face Recognition App with AI Edge Computing

21 May 2024 0 Comments

Perform Actions Based on Face Recognition Using HuskyLens

 
This facial recognition tracking demo uses DFRobot's HuskyLens for facial recognition and performs corresponding actions based on the recognition results. For example, when HuskyLens recognizes a specific face, it can trigger the device to wave a flag, play music, turn on lights, or execute other preset actions. This intelligent facial recognition technology can bring a more convenient and personalized user experience.
  
     
 

Devices Used In this Project

   
  • Raspberry Pi 4B
  • Two SG90 180-degree servos
  • SKU SEN0305 Gravity HUSKYLENS AI Camera
  • Breadboard
  • Male-to-male jumper wires

 

HuskyLens AI Vision Sensor

 
HuskyLens AI Vision Sensor is an easy-to-use AI vision sensor that comes with seven built-in functions: face recognition, object tracking, object recognition, line following, color recognition, tag recognition, and object classification. With just one button, you can complete AI training, eliminating the need for complex training and intricate vision algorithms, allowing you to focus more on the design and implementation of your projects.
   
HuskyLens has onboard UART/I2C interfaces, which can connect to mainstream controllers like Arduino, LattePanda, and micro:bit, allowing seamless hardware integration. HuskyLens directly outputs recognition results to the controller, enabling you to create highly creative projects without having to deal with complex algorithms.
 
  

Specific Steps

 
This project can recognize both single and multiple faces, enabling more precise facial recognition and crowd monitoring.

1. Recognizing a Single Face

This function can detect any facial contours, recognize and track learned faces, and send the data through the serial port. By default, it is set to learn and recognize a single face.
Operation Settings
Toggle the "function button" to the left until "Face Recognition" appears at the top of the screen.
 
  
Learning and Recognizing a Single Face
(1)Detect faces.

(2)Point the HuskyLens at an area with faces. The screen will automatically highlight all detected faces with white boxes and display the word "face" for each. 

(3)If the "+" in the center of the screen is not aligned with any face frame, the RGB light on the other side will not light up.   


(4)If the "+" in the center of the screen is aligned with any face frame, the RGB light on the other side will turn blue.
 

Tip: If you want HuskyLens to learn or recognize your own face, such as for a selfie, and you cannot see the screen, you can determine the status based on the different colors of the RGB indicator light.
  
Learn Faces
(1) Align the "+" in the center of the HuskyLens screen with the face you want to learn, and briefly press the "learn button" to complete the learning process. If the same face is recognized, a blue box will appear on the screen displaying "Face: ID1." This indicates that face recognition is now possible.
 
 
(2) However, the above operation only allows HuskyLens to learn one angle (dimension) of a face, but a face is actually three-dimensional and has multiple angles. If the angle of the face changes, such as from a front face to a side face, HuskyLens may not be able to recognize it. To solve this problem, HuskyLens has a continuous learning function built in, which can record various angles of a face, making HuskyLens more accurate over time.
 
(3) The method for entering faces from various angles is as follows: (Note: Before learning a new face, you must first make HuskyLens forget the faces it has already learned. Refer to the "Forget Learned Faces" section for instructions.)
 
(4) Align the "+" in the center of the HuskyLens screen with the face you want to learn, and press and hold the "learn button" without releasing it. A yellow box labeled "Face: ID1" will appear on the face in the screen, indicating that HuskyLens is learning the face. Then, align the yellow box in the center of the HuskyLens screen with different angles of the same person's face, such as the front and side views (it can also be multiple photos of the same person), to enter various angles of this face. During the learning process, the RGB light will be yellow.
 
 
(5) Then, release the "learn button" to end the learning process. If HuskyLens recognizes the learned face, it will be highlighted with a blue box on the screen and display "Face: ID1."
Tip: If there is no "+" in the center of the screen, it means HuskyLens has already learned faces in this function (learned state). To make HuskyLens learn a new face, you need to make it forget the previously learned faces first.
 
Recognize Faces
(1) The face information learned by HuskyLens will be automatically saved. Subsequently, when HuskyLens detects a learned face, it will highlight the face with a blue box labeled "Face: ID1." The size of the box will adjust with the size of the face and automatically track it. During this time, the RGB indicator light will be green.
 
 

Experimental Phenomenon

The face recognition demo developed by the OpenELAB team uses HuskyLens for face detection and recognition. It then controls the raising and lowering of a flag through signal control by connecting the signal pin of an SG90 180-degree servo to the PWM output pin GPIO5 on a Raspberry Pi. This project is widely used in surveillance systems, access control systems, border inspections, public safety fields, and more, for identifying and tracking criminal suspects and missing persons.
 
 
 
 
If you're working on a project using a face recognition application, our website offers a wide range of face recognition products, and we can also produce customized face recognition application based on your requirements.
OpenELAB is a one-stop development platform for global AIoT electronics enthusiasts and an open-source community for electronic engineers. Besides providing developer modules online, our services also include customized manufacturing of various electronic parts such as micro switches and batteries, as well as plastic or metal parts through 3D printing, injection molding, CNC, laser cutting, etc.
In addition to face recognition products, OpenELAB offers other electronic component sourcing services such as sensors, displays, IoT, and more. OpenELAB has a user-friendly website that makes it easy to find the components you need, and we offer fast shipping to customers around the world.
Moreover, OpenELAB offers Design as a Service (DaaS) for design optimization, Manufacturing as a Service (MaaS) for production manufacturing, Supply Chain as a Service (SaaS) for supply chain support, and Quality as a Service (QaaS) for quality control to AIoT products transitioning into mass production, ensuring a smooth transition to the commercial production phase.
Most importantly, OpenELAB is dedicated to building a global open-source community for AIoT electronic developers. Through the OpenELAB open community, developers in the AIoT electronic revolution can collaborate, empower each other, and create a culture of mutual respect and collaborative sharing, generating more innovative AIoT intelligent hardware products for the world.
Prev Post
Next Post

Leave a comment

All blog comments are checked prior to publishing

Someone recently bought a

Thanks for subscribing!

This email has been registered!

Shop the look

Choose Options

Edit Option
Back In Stock Notification
this is just a warning
Login
Shopping Cart
0 items
RuffRuff App RuffRuff App by Tsun