# Squirrel Watch

用 ESP32-S3 摄像头和 Edge Impulse 识别并记录访客松鼠。

AI-powered squirrel detection system using ESP32-S3 CAM, Edge Impulse, and Arduino Mega.

用 ESP32-S3 摄像头和 Edge Impulse 识别并记录访客松鼠。

- id: dishadometi-ai-squirrel-detection-esp32
- author: dishadometi
- repository: https://github.com/dishadometi/AI-Squirrel-Detection-ESP32
- license: BSD-3-Clause
- shape: square
- scenes: ai
- boards: ESP32-S3
- browser_playable: no
- preview: Project screenshots
- html: https://esp32gallery.com/projects/dishadometi-ai-squirrel-detection-esp32/
- html_zh: https://esp32gallery.com/zh/projects/dishadometi-ai-squirrel-detection-esp32/
- json: https://esp32gallery.com/data/catalog/projects/dishadometi-ai-squirrel-detection-esp32.json

## Hardware

ESP32-S3. Verify the exact board revision, wiring and power requirements in the upstream build guide.

ESP32-S3；请在上游构建文档中核对具体板型、供电与接线。

## English

```
Two microcontrollers split the job: an ESP32-S3 CAM takes the picture and runs an Edge Impulse model, then raises GPIO1 when the `squirrel` class passes 0.50. That 3.3 V signal crosses a SparkFun BOB-12009 level converter into digital pin 7 of an Arduino Mega 2560, which lights a red LED for a squirrel or a green one for none. The model was trained on 140 images, and Edge Impulse reported 65.2% validation and 81.5% test-set accuracy; lighting, distance, background and camera angle can change that. Both firmwares are single `.ino` sketches, one per board.
```

## 中文

```
两块单片机分工：ESP32-S3 CAM 拍照并跑 Edge Impulse 训练的分类模型，判成 squirrel 且置信度超过 0.50 就把 GPIO1 拉高；这个 3.3V 信号经 SparkFun BOB-12009 电平转换送到 Arduino Mega 2560 的第 7 脚，Mega 再点亮红灯，没有松鼠就亮绿灯。数据集只有 140 张图，Edge Impulse 给出的验证准确率是 65.2%，测试集是 81.5%，光照、距离、背景和机位都会影响实际表现。两块板的固件各是一个 .ino：ESP32 一份、Mega 一份。调试时踩过悬浮输入乱跳和 ESP-NN 库编译不过的坑。目前只是工作原型，后续想扩充数据集、去户外拿真松鼠测，再加个防雨外壳。
```
