Toggle navigation
Toggle navigation
This project
Loading...
Sign in
skywrace
/
drowsiness_detector
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
skywrace
2022-05-15 10:15:22 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
adb948185a2615b2ae3a07d19b8b8b7c10c031cd
adb94818
1 parent
478e331e
chore: Test selecting 'eye' and 'mouth' landmarks from predictor
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
DetectModel/main.py
DetectModel/main.py
View file @
adb9481
...
...
@@ -64,8 +64,14 @@ def main():
shape
=
predictor
(
gray
,
rect
)
shape
=
face_utils
.
shape_to_np
(
shape
)
# Draw on our image, all the finded cordinate points (x,y)
for
(
x
,
y
)
in
shape
:
r_eye
=
shape
[
36
:
43
]
l_eye
=
shape
[
42
:
48
]
mouth
=
shape
[
48
:
69
]
for
(
x
,
y
)
in
l_eye
:
cv2
.
circle
(
frame
,
(
x
,
y
),
2
,
(
0
,
255
,
0
),
-
1
)
for
(
x
,
y
)
in
r_eye
:
cv2
.
circle
(
frame
,
(
x
,
y
),
2
,
(
0
,
255
,
0
),
-
1
)
for
(
x
,
y
)
in
mouth
:
cv2
.
circle
(
frame
,
(
x
,
y
),
2
,
(
0
,
255
,
0
),
-
1
)
both_eyes_closed
=
False
...
...
Please
register
or
login
to post a comment