OpenCV + Dlib對人臉位置進行校準
# coding:utf-8
'''
人臉位置校準
'''
import cv2
import dlib
predictor_path = 'temp/dlib/shape_predictor_5_face_landmarks.dat'
detector = dlib.get_frontal_face_detector()
sp = dlib.shape_predictor(predictor_path)
camera = cv2.VideoCapture(0)
if not camera.isOpened():
print("cannot open camear")
exit(0)
while True:
ret,frame = camera.read()
if not ret:
continue
cv2.imshow('camera',frame)
frame_new = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)
# 檢測臉部
dets = detector(frame_new, 1)
print("Number of faces detected: {}".format(len(dets)))
num_faces = len(dets)
if num_faces == 0:
print("Sorry, there were no faces found in current frame")
continue
# 查詢臉部位置
faces = dlib.full_object_detections()
for detection in dets:
faces.append(sp(frame_new, detection))
images = dlib.get_face_chips(frame_new, faces, size=320)
for image in images:
c
相關文章
- python ubuntu dlib人臉識別3-人臉對齊PythonUbuntu
- dlib 人臉對齊 基本原理
- 人臉檢測(detection)與人臉校準(alignment)
- 基於OpenCV和dlib的人臉交換實現探究OpenCV
- 在Mac系統執行dlib人臉識別DemoMac
- 人臉識別之Python DLib庫進行人臉關鍵點識別Python
- MTCNN人臉檢測與校準(5特徵點)CNN特徵
- opencv 人臉識別OpenCV
- OpenCV — 人臉識別OpenCV
- 圖片人臉檢測——Dlib版(四)
- 視訊人臉檢測——Dlib版(六)
- 宅男福音DeepFake進階版!基於位置對映圖網路進行3D人臉重建3D
- 刷臉認證如何實現人臉又快又準完成校驗?
- 基於OpenCV+dlib開發一個人臉識別應用OpenCV
- opencv視訊人臉檢測OpenCV
- OpenCV 人臉檢測自學(3)OpenCV
- python ubuntu dlib 5 -人臉識別並打分PythonUbuntu
- 基於深度學習的人臉識別系統系列(Caffe+OpenCV+Dlib)——【六】設計人臉識別的識別類深度學習OpenCV
- openCV實戰專案--人臉考勤OpenCV
- 視訊人臉檢測——OpenCV版(三)OpenCV
- 圖片人臉檢測——OpenCV版(二)OpenCV
- OpenCv人臉檢測技術-(實現抖音特效-給人臉戴上墨鏡)OpenCV特效
- python ubuntu dlib 人臉識別11-物體追蹤PythonUbuntu
- python Ubuntu dlib 人臉識別9-輔助函式PythonUbuntu函式
- OpenCV-Python 人臉眼睛嘴識別OpenCVPython
- 基於opencv實現簡單人臉檢測OpenCV
- 使用 OpenCV 與 Face++ 實現人臉解鎖OpenCV
- 教你用Excel進行語音校對Excel
- 在Python中使用OpenCV進行人臉檢測PythonOpenCV
- 頭部姿態估計 - OpenCV/Dlib/CeresOpenCV
- 智慧校園人臉識別系統原始碼原始碼
- Python+OpenCV人臉識別技術詳解PythonOpenCV
- 學校人臉識別應用6大核心特性
- 主題:人臉檢測原理及示例(OpenCV+Python)OpenCVPython
- 如何用OpenCV在Python中實現人臉檢測OpenCVPython
- OpenCV-Python實戰(16)——人臉追蹤詳解OpenCVPython
- Python-OpenCV人臉識別之資料集生成PythonOpenCV
- 【opencv3】 svm實現手寫體與人臉識別OpenCV