Skip to content

Commit

Permalink
Update mirroring weights
Browse files Browse the repository at this point in the history
  • Loading branch information
jdddog committed Jun 8, 2018
1 parent 6dd53bb commit c84f0b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/mirroring.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
class Mirroring:
PERSON_EMOTIONS = ['anger', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral']
ROBOT_EMOTIONS = ['angry', 'disgust', 'fear', 'happy.001', 'sad', 'surprised', 'none']
WEIGHTS = [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.0]
MULTIPLIER = [1.05, 1.1, 1.1, 1.07, 1.25, 1.8, 1.0]
WEIGHTS = [0.5, 0.5, 0.5, 0.05, 0.5, 0.5, 0.0]
THRESHOLD = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]
DECAY = 0.08
BLINK_THRESH = 0.35
Expand All @@ -36,7 +37,7 @@ def __init__(self):
rospy.Timer(rospy.Duration(1.0 / self.fps), self.update_robot_emotions_cb)

def get_emotion_value(self, emotype):
return self.biggest_face.emotions[Mirroring.PERSON_EMOTIONS.index(emotype)]
return self.biggest_face.emotions[Mirroring.PERSON_EMOTIONS.index(emotype)] * Mirroring.MULTIPLIER[Mirroring.PERSON_EMOTIONS.index(emotype)]

def update_blink_state(self, value):
try:
Expand Down

0 comments on commit c84f0b2

Please sign in to comment.