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. By the end of this tutorial, you will be able to print the number of faces on the HuskyLens screen to the shell, and the LED will light up when a face is detected.


Hardware Required

1. Maker Pi Pico

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

3. USB Micro B Cable



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.



You can download the code here: face_detection.py


Demo Video

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



  • When you point the HuskyLens at faces, it will automatically detect and highlight them with a white frame and display the word "Face" on the screen.
  • The shell will also indicate the number of faces that are detected.
  • The LED at GP28 (top right corner) will also light up when face is detected.

Result on HuskyLens screen and in Thonny shellLED (at GP28) lights up


What you can do with Face Detection?

You can build a face tracking robot with HuskyLens and Robo Pico. 

You can refer to this link to get the code for the face tracking robot. 

Hardware Components

USB Micro B Cable

$1.00 $1.48 $1.00

x 1 unit(s)

Related Posts

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...