项目作者: Piyush-99
项目描述 :
OpenCV Attendance - Face Detection and Recognition
高级语言: Python
项目地址: git://github.com/Piyush-99/OpenCV-Attendance.git
OpenCV-Attendance
Python3
Process
- Train the model with pictures you want to recognize
- Click a group photo and save it in “files” directory
- OpenCV will recognize the people on which it was trained
Scripts
- train.py — Trains the model with the pictures provided in directory “training-data/(s1 /s2 /s3….)”
Saves the model as trained_data.yml
- crop_pp.py — Crops the faces from the image saved in “files” directory
- recognize_all_faces.py — Recognizes the cropped images and prints the names
Usage ( In Order )
- To train the model execute
python train.py - To crop the image execute
python crop_pp.py test.1.jpg - To recognize faces
python recognize_all_faces.py
Images are taken from google images. They may be subject to copyright. Used here for educational purpose.