Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
21_22-J-02
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22-J-02
21_22-J-02
Commits
0805d72e
Commit
0805d72e
authored
May 05, 2022
by
NaweenTharuka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated video emotion detection backend
parent
d5bf965f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
Presently/presently/users/emotiondetectionvideo.py
Presently/presently/users/emotiondetectionvideo.py
+2
-1
No files found.
Presently/presently/users/emotiondetectionvideo.py
View file @
0805d72e
...
@@ -124,6 +124,7 @@ def detect_emotions(location_videofile, NumberofFrames):
...
@@ -124,6 +124,7 @@ def detect_emotions(location_videofile, NumberofFrames):
try
:
try
:
gray_face
=
cv2
.
resize
(
gray_face
,
model
.
input_shape
[
1
:
3
])
gray_face
=
cv2
.
resize
(
gray_face
,
model
.
input_shape
[
1
:
3
])
except
Exception
as
e
:
except
Exception
as
e
:
print
(
"Cannot resize "
+
str
(
e
))
continue
continue
gray_face
=
__preprocess_input
(
gray_face
,
True
)
gray_face
=
__preprocess_input
(
gray_face
,
True
)
...
@@ -154,4 +155,4 @@ def detect_emotions(location_videofile, NumberofFrames):
...
@@ -154,4 +155,4 @@ def detect_emotions(location_videofile, NumberofFrames):
else
:
else
:
return
max
(
arry
,
key
=
arry
.
get
),
arry
return
max
(
arry
,
key
=
arry
.
get
),
arry
emo
,
arr1
=
detect_emotions
(
location_videofile
,
30
0
)
emo
,
arr1
=
detect_emotions
(
location_videofile
,
5
0
)
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