Commit 9fa0f329 authored by I.K Seneviratne's avatar I.K Seneviratne

Committing the modification in some files.

parent 505c9017
...@@ -216,18 +216,19 @@ def get_frame_emotion_recognition(video_name): ...@@ -216,18 +216,19 @@ def get_frame_emotion_recognition(video_name):
surprise_count = 0 surprise_count = 0
# get the detections # get the detections
detections = ar.person_detection(image, net) detections, persons = ar.person_detection(image, net)
# to count the extracted detections for a frame # to count the extracted detections for a frame
detection_count = 0 detection_count = 0
# if there are detections # if there are detections
if (len(detections) > 0): if (len(detections) > 0):
# loop through the detections # loop through the detections
for detection in detections: for person in persons:
label = emotion_recognition(classifier, face_classifier, detection) label = emotion_recognition(classifier, face_classifier, person)
# checking for the label # checking for the label
if label == class_labels[0]: if label == class_labels[0]:
...@@ -422,17 +423,17 @@ def emotion_frame_groupings(video_name, frame_landmarks, frame_group_dict): ...@@ -422,17 +423,17 @@ def emotion_frame_groupings(video_name, frame_landmarks, frame_group_dict):
neutral_count = 0 neutral_count = 0
detection_count = 0 detection_count = 0
detections = ar.person_detection(image, net) detections, persons = ar.person_detection(image, net)
# if there are detections # if there are detections
if (len(detections) > 0): if (len(detections) > 0):
# looping through the detections in each frame # looping through the detections in each frame
for detection in detections: for person in persons:
# run the model and get the emotion label # run the model and get the emotion label
label = emotion_recognition(classifier, face_classifier, detection) label = emotion_recognition(classifier, face_classifier, person)
# increment the count based on the label # increment the count based on the label
if label == class_labels[0]: if label == class_labels[0]:
......
This diff is collapsed.
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
$(document).ready(function () { $(document).ready(function () {
let folder = ''; let folder = '';
$('#activity_loader').attr('hidden', false); {#$('#activity_loader').attr('hidden', false);#}
{#$('#emotion_loader').attr('hidden', false);#} {#$('#emotion_loader').attr('hidden', false);#}
{#$('#gaze_loader').attr('hidden', false);#} {#$('#gaze_loader').attr('hidden', false);#}
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
} }
//this is a test function (delete later) //this is a test function (delete later)
/*
let interval = setInterval(() => { let interval = setInterval(() => {
{#let url = 'http://127.0.0.1:8000/get-random_number';#} {#let url = 'http://127.0.0.1:8000/get-random_number';#}
...@@ -355,6 +355,7 @@ ...@@ -355,6 +355,7 @@
} }
*/
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment