Fatigue Driving Detection Based on Dlib

Overview

Fatigue-Driving-Detection-Based-on-Dlib

项目概述

项目版本V1.0

V1.0版本仅是软件部分的图像处理, 暂不涉及硬件控制. 硬件控制见V2.0版本(暂未发布)

本项目为本科毕业设计的相关工作, 于2020.05.01完工, 于2021.11.25整理发布(因为太忙还是太懒呢?)

本项目仅是作为理论分析的简单验证工具和毕业设计的实践训练, 在运行过程中的误差很大,其效果远远达不到实际应用的要求.

由于当时刚接触相关内容, 并且再次整理时已经间隔了一年半, 因此肯定存在设计和代码上的缺陷和漏洞, 欢迎大家积极交流

演示视频(00:20s - 00:60s):
https://www.bilibili.com/video/BV1By4y1k7PY?spm_id_from=333.999.0.0

博客地址: 会放到CSDN上(暂未发布)

###项目版本V2.0更新预告: 由树莓派进行人脸位置的检测, 获取位置后控制两个舵机形成二自由度云台追踪人脸
加入了PID舵机控制 + socket通信 + 视频流输出 + 视频堆栈防延迟
演示视频(00:00s - 00:20s):
https://www.bilibili.com/video/BV1By4y1k7PY?spm_id_from=333.999.0.0

#项目文件说明

capture_path: 所有驾驶人的全景图像 (仅采集, 未使用)
face_path: 所有驾驶人的人脸区域图像, 用于身份识别的训练
test_video: 测试视频所存放的文件夹
aspect_ratio_estimation.py: 计算EAR 和 MAR的程序
dlib-19.7.0-cp36-cp36m-win_amd64.whl: dlib的安装文件 drivers_img_acquire.py: 获取驾驶人全景图像和人脸区域的程序
Eigen_Face_Recognizer.py: 特征脸识别器文件, 用特征脸识别不同驾驶人身份(效果并不好, 仅作为理论分析)
get_everybody_EARandMAR_standard.py: 得到每个驾驶人的EAR和MAR基准
haarcascade_eye.xml: 用于检测人眼睛位置的Haar级联分类器文件
haarcascade_frontalface_alt.xml: 用于检测人脸部位置的Harr级联分类器文件
head_posture_estimation.py: 头部姿态估计文件
main.py: 主函数, 用于处理拍摄好的视频图像
shape_predictor_68_face_landmarks.dat: Dlib数据库文件\

如何运行该项目

在运行项目之前, 应确保你有用于测试的视频文件. 本项目中提供了一个视频例程(driving.mp4)

必须执行: 首先运行 drivers_img_acquire.py 文件, 输入当前驾驶人的名字英文缩写,获取不同驾驶人的两类图像

  • 获取的第一类图像为 摄像头全景图像, 默认存放于 './capture_path/{your name}'
  • 获取的第二类图像为 驾驶人人脸区域图像, 默认存放于 './face_path/{your name}'

其次运行main.py程序即可.

如何安装必要的依赖库

必要的库有: Dlib. 其依赖于 cmake 和 boost

  • 1.activate {your env}
  • 2.pip install cmake
  • 3.pip install boost
  • 4.cd 进入存放dlib-19.7.0-cp36-cp36m-win_amd64.whl的文件夹下(已准备好)
  • 5.pip install dlib-19.7.0-cp36-cp36m-win_amd64.whl
OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted. ocrmypdf # it's a scriptable c

jbarlow83 7.9k Jan 03, 2023
Text modding tools for FF7R (Final Fantasy VII Remake)

FF7R_text_mod_tools Subtitle modding tools for FF7R (Final Fantasy VII Remake) There are 3 tools I made. make_dualsub_mod.exe: Merges (or swaps) subti

10 Dec 19, 2022
Python tool that takes the OCR.space JSON output as input and draws a text overlay on top of the image.

OCR.space OCR Result Checker = Draw OCR overlay on top of image Python tool that takes the OCR.space JSON output as input, and draws an overlay on to

a9t9 4 Oct 18, 2022
Image processing using OpenCv

Image processing using OpenCv Write a program that opens the webcam, and the user selects one of the following on the video: ✅ If the user presses the

M.Najafi 4 Feb 18, 2022
The project is an official implementation of our paper "3D Human Pose Estimation with Spatial and Temporal Transformers".

3D Human Pose Estimation with Spatial and Temporal Transformers This repo is the official implementation for 3D Human Pose Estimation with Spatial and

Ce Zheng 363 Dec 28, 2022
Detect textlines in document images

Textline Detection Detect textlines in document images Introduction This tool performs border, region and textline detection from document image data

QURATOR-SPK 70 Jun 30, 2022
Detect and fix skew in images containing text

Alyn Skew detection and correction in images containing text Image with skew Image after deskew Install and use via pip! Recommended way(using virtual

Kakul 230 Dec 21, 2022
([email protected]) Boosting Co-teaching with Compression Regularization for Label Noise

Nested-Co-teaching ([email protected]) Pytorch implementation of paper "Boosting Co-tea

YINGYI CHEN 41 Jan 03, 2023
SceneCollisionNet This repo contains the code for "Object Rearrangement Using Learned Implicit Collision Functions", an ICRA 2021 paper. For more info

SceneCollisionNet This repo contains the code for "Object Rearrangement Using Learned Implicit Collision Functions", an ICRA 2021 paper. For more info

NVIDIA Research Projects 31 Nov 22, 2022
Zoom , GoogleMeets에서 Vtuber 데뷔하기

EasyVtuber Facial landmark와 GAN을 이용한 Character Face Generation Google Meets, Zoom 등에서 자신만의 웹툰, 만화 캐릭터로 대화해보세요! 악세사리는 어느정도 추가해도 잘 작동해요! 안타깝게도 RTX 2070

Gunwoo Han 140 Dec 23, 2022
The virtual calculator will be above the live streaming from your camera

The virtual calculator is above the live streaming from my camera usb , the program first detect my hand and in each frame calculate the distance between two finger ,if the distance is lower than the

gasbaoui mohammed al amine 5 Jul 01, 2022
Scan the MRZ code of a passport and extract the firstname, lastname, passport number, nationality, date of birth, expiration date and personal numer.

PassportScanner Works with 2 and 3 line identity documents. What is this With PassportScanner you can use your camera to scan the MRZ code of a passpo

Edwin Vermeer 441 Dec 24, 2022
Converts an image into funny, smaller amongus characters

SussyImage Converts an image into funny, smaller amongus characters Demo Mona Lisa | Lona Misa (Made up of AmongUs characters) API I've also added an

Dhravya Shah 14 Aug 18, 2022
Document Image Dewarping

Document image dewarping using text-lines and line Segments Abstract Conventional text-line based document dewarping methods have problems when handli

Taeho Kil 268 Dec 23, 2022
A pkg stiching around view images(4-6cameras) to generate bird's eye view.

AVP-BEV-OPEN Please check our new work AVP_SLAM_SIM A pkg stiching around view images(4-6cameras) to generate bird's eye view! View Demo · Report Bug

Xinliang Zhong 37 Dec 01, 2022
Fun program to overlay a mask to yourself using a webcam

Superhero Mask Overlay Description Simple project made for fun. It consists of placing a mask (a PNG image with transparent background) on your face.

KB Kwan 10 Dec 01, 2022
Scale-aware Automatic Augmentation for Object Detection (CVPR 2021)

SA-AutoAug Scale-aware Automatic Augmentation for Object Detection Yukang Chen, Yanwei Li, Tao Kong, Lu Qi, Ruihang Chu, Lei Li, Jiaya Jia [Paper] [Bi

Jia Research Lab 182 Dec 29, 2022
🖺 OCR using tensorflow with attention

tensorflow-ocr 🖺 OCR using tensorflow with attention, batteries included Installation git clone --recursive http://github.com/pannous/tensorflow-ocr

646 Nov 11, 2022
Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.

EasyOCR Ready-to-use OCR with 80+ languages supported including Chinese, Japanese, Korean and Thai. What's new 1 February 2021 - Version 1.2.3 Add set

Jaided AI 16.7k Jan 03, 2023
SCOUTER: Slot Attention-based Classifier for Explainable Image Recognition

SCOUTER: Slot Attention-based Classifier for Explainable Image Recognition PDF Abstract Explainable artificial intelligence has been gaining attention

87 Dec 26, 2022