Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
medienverarbeitung17.projectmood
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Frank Tjado Ihmels
medienverarbeitung17.projectmood
Commits
355e564d
Commit
355e564d
authored
Feb 06, 2018
by
tihmels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Projekt abgabebereit gemacht
parent
7c716ac1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
6 deletions
+11
-6
README.rst
README.rst
+3
-0
projectmood/WebcamVideoStream.py
projectmood/WebcamVideoStream.py
+1
-0
projectmood/process_model.py
projectmood/process_model.py
+2
-1
projectmood/sorted_set_facedetector.py
projectmood/sorted_set_facedetector.py
+1
-0
projectmood/webcam.py
projectmood/webcam.py
+4
-5
No files found.
README.rst
View file @
355e564d
...
...
@@ -37,6 +37,9 @@ Setup
***************
Model Injection
***************
...
...
projectmood/WebcamVideoStream.py
View file @
355e564d
...
...
@@ -2,6 +2,7 @@ from threading import Thread
import
cv2
class
WebcamVideoStream
:
def
__init__
(
self
,
src
=
0
):
...
...
projectmood/process_model.py
View file @
355e564d
...
...
@@ -15,9 +15,10 @@ import argparse
import
glob
import
logging
import
random
import
sys
import
cv2
import
numpy
as
np
import
sys
from
email_service
import
sendMail
...
...
projectmood/sorted_set_facedetector.py
View file @
355e564d
...
...
@@ -19,6 +19,7 @@ import shutil
import
sys
import
cv2
from
email_service
import
sendMail
from
face_detect
import
locate_faces
...
...
projectmood/webcam.py
View file @
355e564d
...
...
@@ -14,13 +14,12 @@
import
argparse
import
cv2
import
cv2.face
from
cv2
import
*
import
numpy
as
np
from
RingBuffer
import
RingBuffer
from
WebcamVideoStream
import
WebcamVideoStream
from
face_detect
import
extract_faces
from
image_commons
import
nparray_as_image
,
draw_
with_alpha
,
draw_img
from
image_commons
import
nparray_as_image
,
draw_
alpha_3dim
,
draw_2dim
parser
=
argparse
.
ArgumentParser
(
description
=
'ProjectMood Emotion Detection'
)
parser
.
add_argument
(
'-0'
,
action
=
'append_const'
,
dest
=
'emotions'
,
const
=
'neutral'
,
help
=
'neutral'
)
...
...
@@ -88,7 +87,7 @@ def show_webcam_and_run(model, emoticons, window_size=(600, 600), window_name=pa
processed_image
=
nparray_as_image
(
normalized_face
[:,
:],
mode
=
'L'
)
w
,
h
=
vc
.
size
()
# And print it to the frame
draw_
img
(
frame
,
processed_image
,
(
w
-
300
,
h
-
300
,
250
,
250
))
draw_
2dim
(
frame
,
processed_image
,
(
w
-
300
,
h
-
300
,
250
,
250
))
# No entry in the ring buffer is None
if
not
(
any
(
x
is
None
for
x
in
predictions
)):
...
...
@@ -97,7 +96,7 @@ def show_webcam_and_run(model, emoticons, window_size=(600, 600), window_name=pa
# Most frequent value is displayed
image_to_draw
=
emoticons
[
unique
[
0
]]
draw_
with_alpha
(
frame
,
image_to_draw
,
(
40
,
40
,
200
,
200
))
draw_
alpha_3dim
(
frame
,
image_to_draw
,
(
40
,
40
,
200
,
200
))
cv2
.
imshow
(
window_name
,
frame
)
frame
=
vc
.
read
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment