Real-Time Eye Blink Detection using Facial Landmarks


-
Real-Time Eye Blink Detection using Facial Landmarks.pdf

Real-Time Eye Blink Detection using Facial Landmarks下载_course
2020-08-20Real-Time Eye Blink Detection using Facial Landmarks.pdf 相关下载链接://download.csdn.net/download/amy1019
- 《Real-time small obstacle detection on highways using compressive RBM road reconstruction》论文阅读总结 3592018-04-27背景介绍,这篇文章要做什么 这是一篇自动驾驶相关的文章,当我们的汽车在高速公路上以高速行驶的时候,一些微小的障碍物都有可能是自动驾驶汽车使用者的巨大隐患。作者认为在高速行驶的汽车上,使用激光雷达等主动传感器很难检测到障碍物,因为需要在离障碍物很远的距离时就检测到障碍物,而激光雷达距离和分辨率都无法达到这样的精度。 所以作者使用单目相机采集图像,训练了一个受限玻尔兹曼机(RBM)重建出假设不存在...
- Facial landmarks: 使用 dlib, OpenCV, and Python提取面部标志点 2142020-06-19Facial landmarks with dlib, OpenCV, and Python 目录 Facial landmarks with dlib, OpenCV, and Python 1.什么是 面部标志 ?(What are facial landmarks?) dlib的面部标志探测器 : 下面我们 dlib和OpenCV来检测图像中的面部标志(Facial landmarks): 面部标志用来定位和便是人脸的显著区域,例如: 眼睛 眉毛 鼻子 口 下颌的轮廓 面部标注点
在人脸识别眨眼检测遇到的问题,求大佬赐教_course
2020-04-27 ``` from imutils.video import FileVideoStream from imutils.video import VideoStream from imutils import face_utils import numpy as np import imutils import dlib import cv2 import sys def _help(): print("Usage:") print(" python blink_detect.py") print(" python blink_detect.py <path of a video>") print("For example:") print(" python blink_detect.py video/lee.mp4") print("If the path of a video is not provided, the camera will be used as the input.Press q to quit.") def eye_aspect_ratio(eye): A = np.linalg.norm(eye[1] - eye[5]) B = np.linalg.norm(eye[2] - eye[4]) C = np.linalg.norm(eye[0] - eye[3]) ear = (A + B) / (2.0 * C) return ear def blink_detection(vs, file_stream): # define three constants, one for the eye aspect ratio to indicate # blink and then the other constants for the min/max number of consecutive # frames the eye must be below the threshold EAR_THRESH = 0.2 EAR_CONSEC_FRAMES_MIN = 1 EAR_CONSEC_FRAMES_MAX = 2 # initialize the frame counters and the total number of blinks blink_counter = [0, 0] # left eye and right eye blink_total = [0, 0] # left eye and right eye print("[INFO] loading facial landmark predictor...") detector = dlib.get_frontal_face_detector() predictor = dlib.shape_predictor("shape_predictor_68_face_landmarks.dat") # grab the indexes of the facial landmarks for the left and # right eye, respectively (lStart, lEnd) = face_utils.FACIAL_LANDMARKS_IDXS["left_eye"] (rStart, rEnd) = face_utils.FACIAL_LANDMARKS_IDXS["right_eye"] print("[INFO] starting video stream thread...") while True: # if this is a file video stream, then we need to check if # there any more frames left in the buffer to process if file_stream and not vs.more(): break frame = vs.read() if frame is not None: frame = imutils.resize(frame) gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) #cv2.imshow("Frame", frame) #cv2.waitKey() rects = detector(gray, 0) if len(rects) == 1: rect = rects[0] shape = predictor(gray, rect) shape = face_utils.shape_to_np(shape) left_eye = shape[lStart:lEnd] right_eye = shape[rStart:rEnd] left_ear = eye_aspect_ratio(left_eye) right_ear = eye_aspect_ratio(right_eye) # compute the convex hull for the left and right eye, then # visualize each of the eyes left_eye_hull = cv2.convexHull(left_eye) right_eye_hull = cv2.convexHull(right_eye) cv2.drawContours(frame, [left_eye_hull], -1, (0, 255, 0), 1) cv2.drawContours(frame, [right_eye_hull], -1, (0, 255, 0), 1) # check to see if the eye aspect ratio is below the blink # threshold, and if so, increment the blink frame counter if left_ear < EAR_THRESH: blink_counter[0] += 1 # otherwise, the eye aspect ratio is not below the blink # threshold else: # if the eyes were closed for a sufficient number of # then increment the total number of blinks if EAR_CONSEC_FRAMES_MIN <= blink_counter[0] and blink_counter[0] <= EAR_CONSEC_FRAMES_MAX: blink_total[0] += 1 blink_counter[0] = 0 # draw the total number of blinks on the frame along with # the computed eye aspect ratio for the frame cv2.putText(frame, "LBlinks: {}".format(blink_total[0]), (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) cv2.putText(frame, "LEAR: {:.2f}".format(left_ear), (10, 60), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) # check to see if the eye aspect ratio is below the blink # threshold, and if so, increment the blink frame counter if right_ear < EAR_THRESH: blink_counter[1] += 1 # otherwise, the eye aspect ratio is not below the blink # threshold else: # if the eyes were closed for a sufficient number of # then increment the total number of blinks if EAR_CONSEC_FRAMES_MIN <= blink_counter[1] and blink_counter[1] <= EAR_CONSEC_FRAMES_MAX: blink_total[1] += 1 blink_counter[1] = 0 # draw the total number of blinks on the frame along with # the computed eye aspect ratio for the frame cv2.putText(frame, "RBlinks: {}".format(blink_total[1]), (200, 30), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) cv2.putText(frame, "REAR: {:.2f}".format(right_ear), (200, 60), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) elif len(rects) == 0: cv2.putText(frame, "No face!", (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) else: cv2.putText(frame, "More than one face!", (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) # cv2.namedWindow("Frame", cv2.WINDOW_NORMAL) cv2.imshow("Frame", frame) # if the `q` key was pressed, break from the loop if cv2.waitKey(1) & 0xFF == ord('q'): break cv2.destroyAllWindows() vs.stop() if len(sys.argv) > 2 or "-h" in sys.argv or "--help" in sys.argv: _help() elif len(sys.argv) == 2: vs = FileVideoStream(sys.argv[1]).start() file_stream = True blink_detection(vs, file_stream) else: vs = VideoStream(src=0).start() file_stream = False blink_detection(vs, file_stream) ```
676KB
Real-timeDriverDrowsinessDetection-EmbeddedSystemUsingModelCompression of DNN
2017-11-24Real-time Driver Drowsiness Detection for Embedded SystemUsing Model Compression of Deep Neural Netw
-
博客
学习二:流动性提供
学习二:流动性提供
-
学院
【Python-随到随学】 FLask第一周
【Python-随到随学】 FLask第一周
-
博客
python稀疏向量100分
python稀疏向量100分
-
下载
win10批处理优化.bat
win10批处理优化.bat
-
学院
使用vue搭建微信H5公众号项目
使用vue搭建微信H5公众号项目
-
下载
acm常用模板.rar
acm常用模板.rar
-
博客
sentinel-dashboard
sentinel-dashboard
-
学院
MaxScale 实现 MySQL 读写分离与负载均衡
MaxScale 实现 MySQL 读写分离与负载均衡
-
学院
华为1+X——网络系统建设与运维(高级)
华为1+X——网络系统建设与运维(高级)
-
博客
centos7安装docker
centos7安装docker
-
学院
ELF视频教程
ELF视频教程
-
下载
《轴流泵和斜流泵》关醒凡.rar
《轴流泵和斜流泵》关醒凡.rar
-
博客
打造个性化社群的必要性
打造个性化社群的必要性
-
学院
零基础极简以太坊智能合约开发环境搭建并开发部署
零基础极简以太坊智能合约开发环境搭建并开发部署
-
下载
PFC汉语看help方法.rar
PFC汉语看help方法.rar
-
下载
基于arm64的opencvsharp4.5.1依赖库
基于arm64的opencvsharp4.5.1依赖库
-
学院
深究字符编码的奥秘,与乱码说再见
深究字符编码的奥秘,与乱码说再见
-
下载
脑机接口导论脑机接口导论
脑机接口导论脑机接口导论
-
博客
0markdown学习
0markdown学习
-
博客
github访问不了
github访问不了
-
下载
aurix内存问题检测和修复
aurix内存问题检测和修复
-
学院
基于SSM实现的房屋租赁系统【附源码】(毕设)
基于SSM实现的房屋租赁系统【附源码】(毕设)
-
学院
基于电商业务的全链路数据中台落地方案(全渠道、全环节、全流程)
基于电商业务的全链路数据中台落地方案(全渠道、全环节、全流程)
-
下载
owasp mantra.zip
owasp mantra.zip
-
下载
职场生存焦虑—如何做到不可替代.pdf
职场生存焦虑—如何做到不可替代.pdf
-
博客
力扣 2021 1-2月
力扣 2021 1-2月
-
下载
GIS_algorithm.zip
GIS_algorithm.zip
-
下载
STM32F40x_ADC_waveform.zip
STM32F40x_ADC_waveform.zip
-
博客
linux查找大于100M的文件
linux查找大于100M的文件
-
博客
Vue中为什么不能检测数组的变化-02-Proxy
Vue中为什么不能检测数组的变化-02-Proxy