https://github.com/hritik5102/extract-face-recognition-model
https://github.com/hritik5102/extract-face-recognition-model
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hritik5102/extract-face-recognition-model
- Owner: hritik5102
- Created: 2019-06-06T15:44:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-14T15:26:03.000Z (almost 6 years ago)
- Last Synced: 2025-02-06T03:41:27.589Z (8 months ago)
- Language: Python
- Homepage: https://www.youtube.com/watch?v=PmZ29Vta7Vc&list=WL&index=21&t=2724s
- Size: 1.63 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Extract-face-recognition-model
### Import OpenCV2 for image processing , Import os for file path
import cv2, os### Import numpy for matrix calculation
import numpy as np### Import Python Image Library (PIL)
from PIL import Image### Create Local Binary Patterns Histograms for face recognization
recognizer = cv2.face.createLBPHFaceRecognizer()### Using prebuilt frontal face training model, for face detection
face_cascade = cv2.CascadeClassifier('cascade/data/haarcascade_frontalface_alt2.xml')### Create method to get the images and label data Get the faces and IDs
### Train the model using the faces and IDs Save the model into trainer.yml
recognizer.save("trained.yml")