Your shopping cart is empty!
Face Recognition using HuskyLens
- Hao Khee Tan
- 14 Aug 2023
- Tutorial
- Beginner
- 1000
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
2. Gravity HuskyLens - AI Machine Vision Camera with Silicone Case
Connection
Maker Pi Pico | HuskyLens |
---|---|
GP9 | T / (Green) |
GP8 | R / (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.
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.