Face Mask Detection - Grove Shield for Seeed Studio XIAO - huangduoduo11 - CodeCraft Hub
Scene: Health. Edge AI application on CodeCraft Hub for Health use cases.
Devices / BOM: Grove Shield for Seeed Studio XIAO, Grove Vision AI V2, Seeed Studio XIAO ESP32S3, MP3 Module V4.0, UART Interface, mini MP3 Player/Walkman, powered by WT2605X
Health application on CodeCraft Hub. A Mask Recognition Reminder Based on Edge Vision. Built with Seeed Studio XIAO ESP32-S3 and Grove Vision AI V2, it detects whether a person is wearing a mask locally. When no mask is recognized, it plays a voice prompt to remind them to wear one, making mask checking simple and contactless.
Documentation
This project is inspired by everyday public health reminders and the need for simple, contactless mask checking. Using Seeed Studio XIAO ESP32-S3 and Vision AI V2 edge vision technology, we created a mask recognition reminder that can detect whether a person is wearing a mask locally. When it recognizes that someone is not wearing a mask, it plays a voice prompt to remind them kindly and clearly. No image data is uploaded, which helps protect privacy. With this project, we hope to make mask reminders easier, safer, and more friendly in shared spaces.
Deploy steps
- 步骤 1
Deploy an AI model to your device (in-app tool on CodeCraft Hub).
- Hardware Connection
Insert the XIAO ESP32-S3 into the Grove Shield: Ensure the USB port aligns with the shield's orientation and press the pins firmly into place.
Connect the XIAO ESP32-S3 to your computer via a USB Type-C cable. Note: The Type-C cable must be a data cable, not a charging-only cable.
Connect the Vision AI V2 module (visual input) to the XIAO-ESP32's SDA/SCL pins.
GND → XIAO GND
VCC → XIAO 3.3V
SDA → XIAO D4
SCL → XIAO D5
Insert a FAT32‑formatted memory card, connect a speaker, then connect to the XIAO board's serial port. TX and RX are crossed (not side-by-side)!!!!
GND → XIAO GND
VCC → XIAO 3.3V
RX → XIAO D6
TX → XIAO D7
- Firmware Flashing
This application supports the XIAO ESP32‑S3 . Select the corresponding firmware based on your board.
Click the "Flash Firmware" button below, follow the prompts to select the appropriate serial port, and connect the device. The flash address is 0x0 (default configuration).
If the device is not recognized, double‑click the Reset button on the XIAO to enter Download Mode, then try again.
Flash firmware to your device (in-app tool on CodeCraft Hub).
- 步骤 4 Powering On and Usage
After flashing is complete, press the reset button on the XIAO ESP32-S3. The system will start mask recognition automatically.
Train Your Vision Recognition Model
Use Vision AI V2 to train an image classification model. You can define two image categories:
Mask: people wearing a mask No mask: people not wearing a mask Update the audio file
Prepare a FAT32-formatted memory card. Save the reminder audio file to the root directory as 0003.wav.
Try out the project
When a person wearing a mask faces the camera, the speaker remains silent. When a person without a mask faces the camera, the speaker plays 0003.wav to remind them to wear a mask. All recognition runs locally on the edge device, and no image data is uploaded.
- 步骤 5 File
0003.wav