FaceTagger is a simple Python-based face recognition system that can identify known faces in images using deep learning. Built on top of the face_recognition library and OpenCV, this project demonstrates how to build a modular pipeline for face recognition.
- Detect and recognize faces from images
- Label known faces using image file names
- Easily add new known persons
- Works offline, lightweight, and extensible
- Can be extended for webcam/video or real-time surveillance
FaceTagger/ ├── known_faces/ # Images of known people (one face per image) ├── test_images/ # Images with multiple unknown faces ├── output/ # Labeled images are saved here ├── encodings/ # Pickled face encodings ├── app/ │ ├── encoder.py # Encodes new faces │ ├── recognizer.py # Recognizes faces in test images │ └── utils.py # Utility/helper functions ├── main.py # Entry point to test recognition ├── requirements.txt # Python dependencies └── README.md # Project documentation
git clone https://github.com/yourusername/FaceTagger.git
cd FaceTaggerpython -m venv venv
venv\Scripts\activate # Windows
.\venv\Scripts\Activate
# OR
source venv/bin/activate # macOS/Linuxpip install -r requirements.txt-
Place images of known people in the known_faces/ folder (e.g., nehal.jpg)
-
Place a group photo in the test_images/ folder
-
Run the app:
python main.py-
The system detects faces in the test image, compares them with known encodings, and labels them.
-
The final image is saved in the
output/directory with a timestamp in its filename (e.g.,result_group_photo_20231027_123000.jpeg).
face_recognition
opencv-python
Python 3.7+
- Add real-time webcam recognition
- Use a database for face storage and logging
- Integrate with Flask/Django for web-based interface
- Train on your own face dataset
- Add confidence threshold & face clustering
Nehal Patel
Professor | Developer | AI Researcher
📍 Surat, Gujarat, India
This project is open-source and available under the MIT License.