An open API service indexing awesome lists of open source software.

https://github.com/manavmax/facedetector

FaceDetector is a modern, cross-platform face detection desktop application built using Qt and OpenCV's deep learning (DNN) module. It allows users to detect faces from webcam or video files, capture cropped face images, and view live thumbnails of detected faces in real-time.
https://github.com/manavmax/facedetector

computer-vision deep-learning dnn face-detection gui-app opencv qt qt6

Last synced: about 2 months ago
JSON representation

FaceDetector is a modern, cross-platform face detection desktop application built using Qt and OpenCV's deep learning (DNN) module. It allows users to detect faces from webcam or video files, capture cropped face images, and view live thumbnails of detected faces in real-time.

Awesome Lists containing this project

README

          

# 🧠 FaceDetector - Qt C++ Real-Time Face Detection App

A powerful real-time face detection desktop application built using **Qt (C++)**, **OpenCV DNN**, and **modern UI** principles. It supports **webcam**, **local video files**, **manual face capture**, and **thumbnail previews**, making it ideal for educational projects, research, or internship showcases.

---

## πŸš€ Features

- πŸŽ₯ Live webcam streaming with real-time face detection
- πŸ“ Load and analyze local video files
- πŸ€– DNN-based face detection using OpenCV’s `res10_300x300_ssd` model
- πŸ–ΌοΈ Thumbnail previews of manually captured faces
- πŸ’Ύ Saves cropped face images to `faces/` folder with **timestamped filenames**
- πŸŽ›οΈ Responsive modern GUI built with Qt Designer
- 🟒 Start / πŸ”΄ Stop / πŸ“Έ Capture buttons
- ✨ Status label + face count label
- βœ… Fully working on macOS (Apple Silicon / Intel)

---

## πŸ“Έ Screenshots

| Live Detection | Face Capture | Thumbnails |
|----------------|--------------|------------|
| ![Live](Screenshot/live.png) | ![Capture](Screenshot/capture.png) | ![Thumbs](Screenshot/thumb.png) |

---

## 🧰 Tech Stack

- **Language**: C++
- **GUI**: Qt 6 / Qt Widgets
- **Face Detection**: OpenCV 4.x + DNN module
- **Build System**: CMake
- **Platform**: macOS (tested on Qt 6.9.1)

---

## πŸ“‚ Folder Structure

FaceDetector/
β”œβ”€β”€ main.cpp
β”œβ”€β”€ mainwindow.cpp / .h / .ui
β”œβ”€β”€ haarcascade_frontalface_default.xml (optional)
β”œβ”€β”€ deploy.prototxt
β”œβ”€β”€ res10_300x300_ssd_iter_140000.caffemodel
β”œβ”€β”€ faces/ # Cropped face images saved here
β”œβ”€β”€ CMakeLists.txt
└── README.md

---

## πŸ’» How to Run

### 1. Clone the Repository

```bash
git clone https://github.com/manavmax/FaceDetector.git
cd FaceDetector
```
### 2. Open in Qt Creator
File β†’ Open Project β†’ CMakeLists.txt
Make sure OpenCV is linked in Kit / CMake configuration

### 3. Build & Run
Click the green ▢️ Run button in Qt Creator

### 4. Select Webcam or Browse File from the dropdown
---
## βš™οΈ Model Files Required

Ensure the following two files are placed in the same folder as the executable:
deploy.prototxt res10_300x300_ssd_iter_140000.caffemodel
If running from Qt Creator, copy them to the build/ directory:
cp deploy.prototxt res10_300x300_ssd_iter_140000.caffemodel ./build/
---
### πŸ™‹β€β™‚οΈ Author
Manav Sharma
---
### 🏁 Status
βœ… Project is complete and fully functional.