DeepFlowest

[Face Recognition] FaceNet 이용하여 실시간 얼굴 인식하기 본문

Computer Vision/실습, 세미 프로젝트

[Face Recognition] FaceNet 이용하여 실시간 얼굴 인식하기

Orange57 2020. 8. 11. 23:00
728x90
반응형
SMALL

https://github.com/richmondu/facenet/tree/master/usage

 

richmondu/facenet

Face recognition using Tensorflow. Contribute to richmondu/facenet development by creating an account on GitHub.

github.com

위 링크를 참고하여 웹캠을 이용한 실시간 얼굴 인식 세미 프로젝트를 진행해 보았다.

 

>> pip install scipy==1.1.0

 

>> git clone https://github.com/richmondu/facenet.git

>> conda activate venv

>> cd facenet

>> requirements.txt 파일에 tensorflow 버전 1.15.3으로 변경

>> pip install -r requirements.txt

>> pip install facenet

 

파일 다운로드 후 facenet\usage\models에 위치시키기

https://drive.google.com/open?id=1EXPBSXwTaqrSC0OhUdXNmKSh9qJUQ55-

https://drive.google.com/open?id=1R77HmFADxe87GmoLwzfgMu_HY0IhcyBz

 

Add photos in facenet\usage\datasets\train

 

>> cd usage

 

Training

python classifier.py TRAIN datasets/train models/20180408-102900/20180408-102900.pb models/datasets_classifier.pkl --batch_size 1000

 

>> python classifier.py TRAIN datasets/train models/20180402-114759/20180402-114759.pb models/datasets_classifier.pkl --batch_size 1000

 Testing

python classifier.py CLASSIFY datasets/test models/20180408-102900/20180408-102900.pb models/datasets_classifier.pkl

 

>> python classifier.py CLASSIFY datasets/test models/20180402-114759/20180402-114759.pb models/datasets_classifier.pkl

 Testing w/a webcam

================================

python real_time_face_recognition.py --model models/20180408-102900 --classifier models/datasets_classifier.pkl

>> python real_time_face_recognition.py --model models/20180402-114759 --classifier models/datasets_classifier.pkl

 

또는

 

>> python real_time_face_recognition.py

728x90
반응형
LIST
Comments