pixID is a lightweight, offline-capable attendance system that uses facial recognition, built using the ESP32-S3 CAM and a local Flask server. Designed with minimal hardware and no reliance on cloud services, it’s perfect for classroom, lab, or small office environments.
To create a smart, secure, and offline-first facial recognition system that:
- Automatically logs attendance using facial data
- Works without internet access
- Is cost-effective and hardware-friendly
- Can later sync with cloud-based systems
- ESP32-S3 CAM acts as a Wi-Fi access point.
- When triggered (manually or by IR sensor), it captures a face image and sends it to a local server.
- A Flask backend:
- Processes the image
- Matches it with known faces using
face_recognition(Python) - Logs attendance in a CSV file
- Updates a simple web dashboard
- LED feedback on the ESP32 provides status cues.
- 🔒 Offline support (no internet required after setup)
- 🎞️ Face capture via
/captureendpoint or IR gesture - 🧠 Local face recognition using Python +
face_recognition - 🧾 Attendance logged in
attendance_log.csv - 🖥️ Web dashboard to view attendance records
- 💡 LED status indicator (capturing / success / failure)
- 🔌 Powered via standard 12V laptop adapter
| Component | Tech Used |
|---|---|
| Camera Board | ESP32-S3 CAM |
| Server Backend | Flask (Python) |
| Recognition | DeepFace (ArcFace) |
| Communication | HTTP (image POST to Flask) |
| Storage | CSV log, local known_faces DB |
| Triggering | Manual + IR gesture-based |
app/
├── app.py ← Main Flask server
├── data/
│ ├── embeds/ ← Eembeddings.pkl
│ ├── imgDataset ← Training images
│ │ └── known_faces/ ← Original photo records
│ │ │ └── person1/
│ │ │ └── person2/
│ │ │ └── person3/
│ ├── logs/ ← Attendance CSV file
│ └── processed/ ← Original photo records
├── templates/ ← Frontend HTML pages
├── static/ ← CSS & JS assets
├── uploads/ ← Enhanced images for recognition
├── images/ ← Raw images from ESP32
├── utils/
│ └── prepare_embeds.py ← Use this after adding new known faces
├── requirements.txt
- Flash the ESP32-S3 CAM with
pixid_cam_code.ino - Ensure it:
- Creates a SoftAP network
- Runs a
/captureroute - Takes and POSTs images to Flask server
git clone https://github.com/yourusername/pixID.git
cd pixID/server
# Create virtual environment (optional)
python -m venv venv
source venv/bin/activate # For Windows: venv\Scripts\activate
# Install dependencies
pip install -r ../requirements.txt
# Run server
python app.pyServer will listen at http://192.168.4.1:5000 (ESP32’s network)
- Add clear, front-facing images in
imgdataset/known_faces/ - Filenames will be used as (e.g.,
1.jpg→ "in /Farzam")
- Connect to ESP32 Wi-Fi
- Visit
http://192.168.4.1/captureto trigger capture manually - IR-based gesture capture also supported (customizable in
.inofile)
- Flask hosts a basic web dashboard at
/dashboard - View recent attendance records with timestamps
- No cloud service used — all computation and logging are local
- You can later integrate cloud sync (e.g., Firebase or Google Sheets API)
- Recognition is best with clear, evenly lit faces from front view
- IR sensor is optional but adds hands-free interaction
- Add real-time face detection on ESP32 preview
- Implement cloud-based sync (Firebase or S3)
- Optimize power usage (deep sleep cycles)
- Add mobile-friendly dashboard
- Inspired by CS50, AI, and IoT coursework
- Built with ❤️ by Farzam Asad as an exploration into practical AI + embedded systems
pixID is a proof-of-concept project for learning, exploration, and showcasing embedded + AI integration.