Overview
Is someone here? This project can let you know! You can use a Fruit Jam running CircuitPython with a USB webcam to run a local front face detection model from OpenCV. The feed from the webcam is displayed via DVI video output.
When a face is detected, a green box is drawn around the face. The CircuitPython code utilizes a Turbo helper module to speed up checking the face detection model against the incoming camera frames. This is a great way to add person detection to projects, like a video doorbell, without connecting to The Cloud™️since this runs 100% locally and offline.
What's the Deal with Turbo?
CircuitPython Turbo lets you write Python helper modules with Viper decorators from MicroPython. These modules are compiled using mpy-cross for the specific architecture of the chip that it will run on. This creates an .MPY file that goes into the /lib folder on your CIRCUITPY device. The functions that utilize Viper decorators become native machine code on compilation. Not everything benefits from Viper decorators, but code snippets that use heavy math computations, like graphics, see a significant speed-up.
Tim C. wrote an excellent explainer for how Viper modules are written in his PixelDust Digital Sand for CircuitPython Guide:
Viper functions are written as Python, but they are their own weird flavor of Python with an extra set of rules that must be followed.
Local variables and arguments must be
int,uint(32-bit only),bool,ptr,ptr8,ptr16,ptr32, orobject. They cannot usefloatslike normal Python numbers do. Parameters get passed to the Viper function as a list of values, and are accessed via their index within that list. There is no overflow protection. Integers will silently wrap, out-of-range indexes can corrupt memory or crash instead of raising a cleanIndexError. Variables cannot change types. Mixing of typed values withobjectvalues will fall back to slower runtime calls.
- or -
Page last edited October 15, 2026