python3+
face_recognition
import face_recognition
import cv2
import numpy as np
from keras.models import load_model
# This is a demo of running face recognition on live video from your webcam. It's a little more complicated than the
# other example, but it includes some basic performance tweaks to make things run a lot faster:
# 1. Process each video frame at 1/4 resolution (though still display it at full resolution)
# 2. Only detect faces in every other frame of video.
# PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam.
# OpenCV is *not* required to use the face_recognition library. It's only required if you want to run this
# specific demo. If you have trouble installing it, try any of the other demos that don't require it instead.
emotion_dict = {'Angry': 0, 'Sad': 5, 'Neutral': 4, 'Disgust': 1, 'Surprise': 6, 'Fear': 2, 'Happy': 3}
# G

使用Python3和face_recognition库进行人脸识别,同时结合hdf5模型进行情绪识别。文章提供了一个链接,指向GitHub资源,包含情绪检测模型。
最低0.47元/天 解锁文章
429





