An intelligent access control system powered by Computer Vision, Real-Time Analytics, and IoT concepts.
FaceLogger is a full-stack solution designed to automate reception desks, gyms, and restricted areas. It replaces traditional ID cards with facial biometrics, providing a seamless and secure entry experience.
Key Features:
- 🔐 Facial Recognition: Implements LBPH (Local Binary Patterns Histograms) algorithm for robust user identification.
- ⚡ Real-Time Logging: Instant data transmission from the camera client to the web dashboard via REST API.
- 🖥️ Interactive Mode: Visual feedback (Green/Red overlays) for the end-user.
- 📊 Analytics Dashboard: Web interface to monitor access logs, timestamps, and captured snapshots.
- ⚙️ IoT Hardware Integration: Physical access using Serial communication to trigger micro servo motor and feedback LEDs by Arduino.
Software:
- Computer Vision: OpenCV (Face detection & recognition)
- Backend API: Python FastAPI &
pyserial - Database: SQLite (Lightweight local storage)
- Frontend: HTML5, CSS3, JavaScript (Fetch API)
Hardware / IoT:
- Microcontroller: Arduino Uno
- Actuators: Micro Servo Motor (Turnstile simulation)
- Visual Feedback: Green/Red LEDs
- Python 3.x installed
- A working webcam
git clone https://github.com/icarodev10/FaceLogger.git cd FaceLogger
pip install -r requirements.txt
Start the API & Dashboard: Open a terminal and run:
python api.py The Dashboard will be available at: http://localhost:8000
Register a User (Required for first run): Open a second terminal and run:
python gerenciador.py Select option 1 and follow the instructions to capture your face and train the model.
Start the Camera Totem: Run the camera client:
python camera_web.py The Camera UI will be available at: http://localhost:5000
⚙️ How it works Enrollment: The gerenciador.py script captures 30 samples of the user's face and generates a trainer.yml model.
Detection: The camera_web.py captures video frames and compares them against the trained model.
Authorization: If a match is found (Confidence < 60), a request is sent to the API.
Logging: The API saves the event and the base64 image to the database, updating the Dashboard instantly.
The system can work 100% digital, but includes support to physical hardware. The python script communicates with an Arduino by USB, sending binary signals
1(Match found): Turn the green LED on and rotates the servo to 90°0(Access Denied): Quickly turn the red LED on and keep the servo locked in 0°.
facelogger_arduino.mp4
Developed by Icaro de Souza 🚀 https://www.linkedin.com/in/icaro-souza-ti/