This project implements a real-time smart CCTV system that combines YOLOv8 object detection and ArcFace embeddings for robust face recognition, with SQLite database integration for identity management and event logging.
- YOLOv8 for detecting people in video streams (webcam, IP camera, or pre-recorded video).
- Face extraction from detected persons.
- ArcFace embeddings (via DeepFace) to compute unique 512-D face vectors.
- SQLite database for:
- Enrolling new users.
- Storing embeddings.
- Logging recognition events with timestamps + confidence scores.
- Outputs:
- Annotated live video with bounding boxes + labels.
- SQLite log records.
- Future hooks: Telegram/Email alerts.
- The system detects multiple people and matches them with enrolled users.
- Example:
Alice (0.91)andBob (0.88)detected in a live stream.
SQLite table logs every recognition event:
id,name,confidence,timestamp.
minimal-yolov8-arcface-repo/
├── app.py # YOLOv8 + ArcFace real-time script
├── minimal_yolov8_arcface.ipynb # Notebook demo with SQLite
├── requirements.txt # Dependencies
├── README.md # Documentation
├── LICENSE # MIT License
├── assets/ # Screenshots + diagrams
│ ├── architecture_pro.png
│ ├── sample_output.png
│ └── logs_preview.png
└── enroll/ # Enrolled faces
├── Alice/
└── Bob/
- Install dependencies:
pip install -r requirements.txt
- Enroll identities (place face images inside
enroll/<Name>/). - Run the real-time script:
python app.py
- Or explore the notebook:
jupyter notebook minimal_yolov8_arcface.ipynb
This project is licensed under the MIT License.


