Face Recognition using HuskyLens

Face Recognition using HuskyLens

In this tutorial, you will learn how to recognize different faces using HuskyLens and retrieve the data to Maker Pi Pico using CircuitPython code. By the end of this tutorial, you will be able to print all the recognized face IDs on the HuskyLens screen to the shell, and the color of the LED will change with different face IDs. 

 

Hardware Required

1. Maker Pi Pico

2. Gravity HuskyLens - AI Machine Vision Camera with Silicone Case

3. USB Micro B Cable

 

Connection

Connection between Maker Pi Pico and HuskyLens

Maker Pi PicoHuskyLens
GP9T / (Green)
GP8R / (Blue)
GND- / (Black)
VBUS+ / (Red)

 

Getting Started

In this tutorial, we will use Thonny editor and CircuitPython to write the code for this project. If you are not familiar with Thonny, check out the video below:

 

Required Libraries

Download the HuskyLens CircuitPython library from here

Unzip and place the circuitPyHuskyLib.py file in your CIRCUITPY/lib folder.

You also need to include these libraries in your CIRCUITPY/lib folder.

  • adafruit_bus_device
  • neopixel.mpy

You can download it from https://circuitpython.org/libraries

All the libraries are placed inside the CIRCUITPY/lib folder.

The libraries are in CIRCUITPY/lib folder.

 

Getting Started with Face Recognition using HuskyLens

Before starting to use HuskyLens to recognize faces, you need to teach HuskyLens how to learn faces. You can learn how to recognize faces using HuskyLens from the HuskyLens Wiki

or you can view the tutorial video below: 

Enable “Learn Multiple” function on HuskyLens

You can view the video here: https://photos.app.goo.gl/TSKKcKtatWaZjFR56

 

Learn Multiple face on HuskyLens

You can view the video here: https://photos.app.goo.gl/w7o3RdYWRhd7H2Rh6

 

Forget learned face on HuskyLens

You can view the video here: https://photos.app.goo.gl/LKB2EUzbhErQdXh46

 

Code

You can download the code here: face_recognition.py

 

Demo Video

You may view the demo here: https://photos.app.goo.gl/omc9WmJgoKfUUxHv5

 

Result

  • When you point the HuskyLens at faces, it will automatically recognize and highlight the faces.
  • The shell will also indicate the detected face ID.
  • The LED at GP28 (top right corner) will also light up accordingly.

 

Hardware Components


Related Posts

Face Detection using HuskyLens

Face Detection using HuskyLens

In this tutorial, you will learn how to detect faces using HuskyLens and retrieve data to Maker Pi Pico using CircuitPython code...