Cov txheej txheem:
- Kauj Ruam 1: Yam Koj Xav Tau
- Kauj Ruam 2: Python Code Nrog Qhov Muag Pom Cov Duab Ua Ntej Dataset (PC Version)
- Kauj ruam 3: Raspberry Pi Version
Video: Kev tsaug zog ceeb toom System: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Txhua xyoo ntau tus neeg plam lawv txoj sia vim raug kev tuag hauv ntiaj teb thiab kev tsav tsheb tsis tsaug zog yog ib qho tseem ceeb ua rau muaj kev huam yuaj thiab tuag. Kev qaug zog thiab pw tsaug zog me me ntawm kev tswj hwm kev tsav tsheb feem ntau yog lub hauv paus ua rau muaj xwm txheej loj. Txawm li cas los xij, thawj cov cim ntawm kev qaug zog tuaj yeem kuaj pom ua ntej muaj xwm txheej tshwm sim thiab yog li ntawd, kuaj pom tus neeg tsav tsheb qaug zog thiab nws qhov kev qhia tseem tab tom tshawb fawb. Feem ntau ntawm cov txheej txheem ib txwm los txhawm rau pom kev tsaug zog yog ua raws kev coj tus cwj pwm thaum qee qhov cuam tshuam thiab tuaj yeem cuam tshuam rau cov tsav tsheb, thaum qee qhov xav tau cov ntsuas ntsuas siab. Yog li ntawd, hauv daim ntawv no, lub teeb yuag, lub sijhawm tiag tiag tus neeg tsav tsheb txoj kev tsaug zog pom tau tsim thiab ua haujlwm ntawm Android daim ntawv thov. Lub kaw lus kaw cov vis dis aus thiab pom tus neeg tsav tsheb lub ntsej muag hauv txhua lub thav duab los ntawm kev siv cov txheej txheem ua duab. Lub kaw lus muaj peev xwm txheeb xyuas thaj chaw thaj tsam ntawm lub ntsej muag, suav nrog Qhov Muag Pom Qhov Sib Piv (EAR) thiab Qhov Muag Kaw Qhov Muag (ECR) txhawm rau txheeb xyuas tus neeg tsav tsheb tsaug zog raws li qhov pib hloov pauv. Lub tshuab kev kawm algorithms tau ua haujlwm los ntsuas qhov ua tau zoo ntawm txoj kev thov. Cov txiaj ntsig ua piv txwv qhia pom tias tus qauv thov tuaj yeem ua tiav qhov tseeb ntawm 84% siv kev faib cais hav zoov.
Kauj Ruam 1: Yam Koj Xav Tau
1. RASPBERRY PI
2. WEBCAM (C270 HD WEB CAM RAU QHOV TSEEB)
Pc version yuav xav tau qee qhov kev hloov pauv hauv cov cai
Kauj Ruam 2: Python Code Nrog Qhov Muag Pom Cov Duab Ua Ntej Dataset (PC Version)
txhawm rau txheeb xyuas qhov muag tau zoo nyob rau lub sijhawm tiag tiag ntawm cov vis dis aus, peb tuaj yeem siv cov ntaub ntawv sbelow.dat no.
drive.google.com/open?id=1UiSHe72L4TeN14VK…
Rub tawm.dat cov ntaub ntawv los ntawm qhov txuas saum toj no thiab khiav cov lej hauv qab no
Nab hab sej code
from scipy.spatial import distancefrom imutils import face_utils import imutils import dlib import cv2
def eye_aspect_ratio (qhov muag):
A = distance.euclidean (qhov muag [1], qhov muag [5]) B = distance.euclidean (qhov muag [2], qhov muag [4]) C = nrug deb.euclidean (qhov muag [0], qhov muag [3]) pob ntseg = (A + B) / (2.0 * C) return ear thresh = 0.25 frame_check = 20 detect = dlib.get_frontal_face_detector () twv = dlib.shape_predictor (".
(lStart, lEnd) = face_utils. FACIAL_ SibS_68_IDXS ["left_eye"]
(rStart, rEnd) = face_utils. FACIAL_ SibS_68_IDXS ["right_eye"] cap = cv2. VideoCapture (0) chij = 0 thaum muaj tseeb: ret, thav duab = cap.read () thav duab = imutils.resize (thav duab, dav = 450) txho = cv2.cvtColor (thav duab, cv2. COLOR_BGR2GRAY) cov ntsiab lus = kuaj pom (txho, 0) rau cov ncauj lus hauv cov ncauj lus: duab = kwv yees (txho, txhoj puab) duab = ntsej muag_utils.shape_to_np (duab)#hloov mus rau NumPy Array leftEye = puab [lStart: lEnd] rightEye = shape [rStart: rEnd] leftEAR = eye_aspect_ratio (leftEye) rightEAR = eye_aspect_ratio (rightEye) pob ntseg = (leftEAR + rightEAR) / 2.0 leftEyeHull = cv2.convexHull (leftEye) rightEyeHull = cv2.convexHull drawContours (thav duab, [leftEyeHull], -1, (0, 255, 0), 1) cv2.drawContours (thav duab, [rightEyeHull], -1, (0, 255, 0), 1) yog pob ntseg = frame_check: cv2.putText (thav duab, "**************** ALERT! ****************", (10, 30), cv2. FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) cv2.putText (thav duab, "**************** ALERT! *********** ***** ", (10, 325), cv2. FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) #print (" Dro wsy ") lwm: chij = 0 cv2.imshow (" Ncej ", thav duab) qhov tseem ceeb = cv2.waitKey (1) & 0xFF yog qhov tseem ceeb == ord (" q "): so cv2.destroyAllWindows () cap.stop ()
Kauj ruam 3: Raspberry Pi Version
thaum cov tib neeg kaw nws lub qhov muag ces raspberry pi yuav ua rau koj ceeb toom
Txuas koj lub buzzer rau tus pin 23 (saib daim duab)
los ntawm scipy.spatial ntshuam nrug
ntshuam RPi. GPIO ua GPIO
los ntawm lub sijhawm ntshuam pw
GPIO.setwarnings (Cuav)
GPIO.setmode (GPIO. BCM)
los ntawm imutils ntshuam face_utils
import imutils import dlib import cv2
lub suab = 23
GPIO.setup (buzzer, GPIO. OUT)
def eye_aspect_ratio (qhov muag):
A = distance.euclidean (qhov muag [1], qhov muag [5]) B = distance.euclidean (qhov muag [2], qhov muag [4]) C = nrug deb.euclidean (qhov muag [0], qhov muag [3]) pob ntseg = (A + B) / (2.0 * C) return ear thresh = 0.25 frame_check = 20 detect = dlib.get_frontal_face_detector () twv = dlib.shape_predictor (".
(lStart, lEnd) = face_utils. FACIAL_ SibS_68_IDXS ["left_eye"]
(rStart, rEnd) = face_utils. FACIAL_ SibS_68_IDXS ["right_eye"] cap = cv2. VideoCapture (0) chij = 0 thaum muaj tseeb: ret, thav duab = cap.read () thav duab = imutils.resize (thav duab, dav = 450) txho = cv2.cvtColor (thav duab, cv2. COLOR_BGR2GRAY) cov ntsiab lus = kuaj pom (txho, 0) rau cov ncauj lus hauv cov ncauj lus: duab = kwv yees (txho, txhoj puab) duab = ntsej muag_utils.shape_to_np (duab)#hloov mus rau NumPy Array leftEye = puab [lStart: lEnd] rightEye = shape [rStart: rEnd] leftEAR = eye_aspect_ratio (leftEye) rightEAR = eye_aspect_ratio (rightEye) pob ntseg = (leftEAR + rightEAR) / 2.0 leftEyeHull = cv2.convexHull (leftEye) rightEyeHull = cv2.convexHull drawContours (thav duab, [leftEyeHull], -1, (0, 255, 0), 1) cv2.drawContours (thav duab, [rightEyeHull], -1, (0, 255, 0), 1) yog pob ntseg = frame_check: cv2.putText (thav duab, "**************** ALERT! ****************", (10, 30), cv2. FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) cv2.putText (thav duab, "**************** ALERT! *********** ***** ", (10, 325), cv2. FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) #print (" Dro uas ")
GPIO.output (buzzer, GPIO. HIGH)
lwm: chij = 0
GPIO.output (buzzer, GPIO. LOW)
cv2.imshow ("Frame", frame) key = cv2.waitKey (1) & 0xFF yog qhov tseem ceeb == ord ("q"): so cv2.destroyAllWindows () cap.stop ()
Pom zoo:
Kev Ceeb Toom Kub Ceeb Toom: 10 Kauj Ruam
Kev Ceeb Toom Kub Ceeb Toom: Nyob hauv Florida, Kuv txaus siab tsim cov khaub ncaws uas tuaj yeem ceeb toom kuv thaum nws kub heev sab nraum. Siv Arduino thiab ob peb yam yooj yim kuv tuaj yeem tsim lub rooj tsav xwm hauv Circuit uas tuaj yeem suav nrog hauv lub taub hau uas ceeb toom kuv thaum
Ua Tus Hais Lus / Lub Suab Ceeb Toom Ceeb Toom: 4 Kauj Ruam
Ua Tus Hais Lus / Lub Suab Ceeb Toom Ceeb Toom: Qhov haujlwm no peb tau ua Kev Tham / Lub Suab Ceeb Toom thiab Ceeb Toom. Tsawg kawg ob lub cim tuaj yeem siv tau hauv txoj haujlwm no
Ceeb Toom Cov Neeg Tuaj Saib Lub Vev Xaib ceeb toom Nrog IFTTT: 6 Cov Kauj Ruam
Kev ceeb toom Cov Neeg Tuaj Saib Lub Vev Xaib Nrog IFTTT: Hauv cov lus qhia no, koj yuav tau txais Android ceeb toom thaum ib tus neeg mus ntsib koj li Website.so rau qhov no Koj yuav tsum muaj kev paub me ntsis ntawm PHP programming lus thiab Kev paub yooj yim ntawm C Yam Lus kom paub li cas IFTTT App cov haujlwm (
Kev Pom Kev Ceeb Toom Kev Ceeb Toom: 9 Kauj Ruam
Kev Pom Kev Ceeb Toom Kev Ceeb Toom: Phau ntawv qhia no qhia koj yuav ua li cas txhawm rau qhia rau Phillips Hawj kom ceeb toom. Nws yuav muaj txiaj ntsig zoo rau cov neeg lag ntseg thiab tsis hnov lus zoo, muaj lub zeem muag qis lossis tsis hnov lus zoo. Kev Pom Kev Ceeb Toom Ceeb Toom yog qhia rau cov neeg siv tom qab tau txais kev ceeb toom
Lus Ceeb Toom Arduino Tshuab Ntxhua Khaub Ncaws - Thawb Ceeb Toom rau Xov Tooj Nrog Blynk: 5 Cov Kauj Ruam (nrog Duab)
Lus Ceeb Toom Arduino Tshuab Ntxhua Khaub Ncaws - Thawb Ceeb Toom rau Xov Tooj Nrog Blynk: Peb lub tshuab ntxhua khaub ncaws nyob hauv lub nkas -las thiab peb tsis hnov lub suab nrov nrov los qhia tias ntxuav tas lawm. Kuv xav nrhiav txoj hauv kev kom tau txais kev ceeb toom, txhua qhov chaw peb nyob hauv tsev, thaum lub voj voog tiav lawm. Kuv tau tinkering nrog Arduino, ESP8266 WiFi