From a794ad9dde5517e66fd64901dc503209568d718e Mon Sep 17 00:00:00 2001 From: Juha Jeronen Date: Tue, 9 Jan 2024 10:44:49 +0200 Subject: [PATCH] Fix eye_unimpressed (arity 2; had only one JSON key) - The "eye_unimpressed" morph had just one key in the emotion JSON, although the model has two morphs (left and right) for this. Now it has two, as it should. - This change breaks backward compatibility for old emotion JSON files. - OTOH, not much of an issue, because in all versions prior to this one being developed, the emotion JSON system was underutilized (only a bunch of pre-made presets, only used internally by the live plugin). - Thus it is important to fix this now, before the next release, because the improved manual poser makes it easy to generate new emotion JSON files, so from the next release on we can assume those to exist in the wild. --- talkinghead/TODO.md | 6 ------ talkinghead/emotions/_defaults.json | 15 ++++++++++----- talkinghead/emotions/admiration.json | 5 +++-- talkinghead/emotions/amusement.json | 5 +++-- talkinghead/emotions/anger.json | 5 +++-- talkinghead/emotions/annoyance.json | 5 +++-- talkinghead/emotions/approval.json | 5 +++-- talkinghead/emotions/caring.json | 5 +++-- talkinghead/emotions/confusion.json | 5 +++-- talkinghead/emotions/curiosity.json | 5 +++-- talkinghead/emotions/desire.json | 5 +++-- talkinghead/emotions/disappointment.json | 5 +++-- talkinghead/emotions/disapproval.json | 5 +++-- talkinghead/emotions/disgust.json | 5 +++-- talkinghead/emotions/embarrassment.json | 5 +++-- talkinghead/emotions/excitement.json | 5 +++-- talkinghead/emotions/fear.json | 5 +++-- talkinghead/emotions/gratitude.json | 5 +++-- talkinghead/emotions/grief.json | 5 +++-- talkinghead/emotions/joy.json | 5 +++-- talkinghead/emotions/love.json | 5 +++-- talkinghead/emotions/nervousness.json | 5 +++-- talkinghead/emotions/neutral.json | 5 +++-- talkinghead/emotions/optimism.json | 5 +++-- talkinghead/emotions/pride.json | 5 +++-- talkinghead/emotions/realization.json | 5 +++-- talkinghead/emotions/relief.json | 5 +++-- talkinghead/emotions/remorse.json | 5 +++-- talkinghead/emotions/sadness.json | 5 +++-- talkinghead/emotions/surprise.json | 5 +++-- talkinghead/tha3/app/util.py | 7 +------ 31 files changed, 95 insertions(+), 73 deletions(-) diff --git a/talkinghead/TODO.md b/talkinghead/TODO.md index cf309ed..983e176 100644 --- a/talkinghead/TODO.md +++ b/talkinghead/TODO.md @@ -40,12 +40,6 @@ - Zigzag deformation - Investigate if some particular emotions could use a small random per-frame oscillation applied to "iris_small", for that anime "intense emotion" effect (since THA3 doesn't have a morph specifically for the specular reflections in the eyes). -- The "eye_unimpressed" morph has just one key in the emotion JSON, although the model has two morphs (left and right) for this. - - We should fix this, but it will break backward compatibility for old emotion JSON files. - - OTOH, maybe not much of an issue, because in all versions prior to this one being developed, the emotion JSON system - was underutilized anyway (only a bunch of pre-made presets, only used by the live plugin). - - All the more important to fix this now, before the next release, because the improved manual poser makes it easy to - generate new emotion JSON files, so from the next release on we can assume those to exist in the wild. ### Client-side bugs / missing features: diff --git a/talkinghead/emotions/_defaults.json b/talkinghead/emotions/_defaults.json index 650f7b6..a0b4607 100644 --- a/talkinghead/emotions/_defaults.json +++ b/talkinghead/emotions/_defaults.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.3585, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -66,7 +67,8 @@ "eye_surprised_right_index": 0.3585, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -112,7 +114,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 1.0, "eye_raised_lower_eyelid_right_index": 1.0, "iris_small_left_index": 0.698, @@ -158,7 +161,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.3725, "eye_raised_lower_eyelid_right_index": 0.401, "iris_small_left_index": 0.6745, @@ -333,7 +337,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, diff --git a/talkinghead/emotions/admiration.json b/talkinghead/emotions/admiration.json index 0086e3f..65fb349 100644 --- a/talkinghead/emotions/admiration.json +++ b/talkinghead/emotions/admiration.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.3585, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/amusement.json b/talkinghead/emotions/amusement.json index cfcad1b..58c4564 100644 --- a/talkinghead/emotions/amusement.json +++ b/talkinghead/emotions/amusement.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.3585, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/anger.json b/talkinghead/emotions/anger.json index 24bbe7a..abe0b1f 100644 --- a/talkinghead/emotions/anger.json +++ b/talkinghead/emotions/anger.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 1.0, "eye_raised_lower_eyelid_right_index": 1.0, "iris_small_left_index": 0.698, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/annoyance.json b/talkinghead/emotions/annoyance.json index 109fab6..edf8605 100644 --- a/talkinghead/emotions/annoyance.json +++ b/talkinghead/emotions/annoyance.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.3725, "eye_raised_lower_eyelid_right_index": 0.401, "iris_small_left_index": 0.6745, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/approval.json b/talkinghead/emotions/approval.json index fc71d5e..93b1dfa 100644 --- a/talkinghead/emotions/approval.json +++ b/talkinghead/emotions/approval.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/caring.json b/talkinghead/emotions/caring.json index 54cfa29..58b6378 100644 --- a/talkinghead/emotions/caring.json +++ b/talkinghead/emotions/caring.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.3945, "eye_raised_lower_eyelid_right_index": 0.9, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/confusion.json b/talkinghead/emotions/confusion.json index b82926d..470e23d 100644 --- a/talkinghead/emotions/confusion.json +++ b/talkinghead/emotions/confusion.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/curiosity.json b/talkinghead/emotions/curiosity.json index d149e22..d048b96 100644 --- a/talkinghead/emotions/curiosity.json +++ b/talkinghead/emotions/curiosity.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/desire.json b/talkinghead/emotions/desire.json index 288d976..d0b9276 100644 --- a/talkinghead/emotions/desire.json +++ b/talkinghead/emotions/desire.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/disappointment.json b/talkinghead/emotions/disappointment.json index ec1fdab..b0e6601 100644 --- a/talkinghead/emotions/disappointment.json +++ b/talkinghead/emotions/disappointment.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/disapproval.json b/talkinghead/emotions/disapproval.json index 9c9950c..03d8f82 100644 --- a/talkinghead/emotions/disapproval.json +++ b/talkinghead/emotions/disapproval.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.5475, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/disgust.json b/talkinghead/emotions/disgust.json index c6e6c56..9b40d66 100644 --- a/talkinghead/emotions/disgust.json +++ b/talkinghead/emotions/disgust.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.5475, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/embarrassment.json b/talkinghead/emotions/embarrassment.json index d125aff..3b07109 100644 --- a/talkinghead/emotions/embarrassment.json +++ b/talkinghead/emotions/embarrassment.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.5475, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/excitement.json b/talkinghead/emotions/excitement.json index 8b2644c..4e21c45 100644 --- a/talkinghead/emotions/excitement.json +++ b/talkinghead/emotions/excitement.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 1.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/fear.json b/talkinghead/emotions/fear.json index 3659322..7dc89f3 100644 --- a/talkinghead/emotions/fear.json +++ b/talkinghead/emotions/fear.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 1.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 1.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/gratitude.json b/talkinghead/emotions/gratitude.json index 8c42c27..6c48b60 100644 --- a/talkinghead/emotions/gratitude.json +++ b/talkinghead/emotions/gratitude.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.216, "eye_relaxed_right_index": 0.2315, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/grief.json b/talkinghead/emotions/grief.json index 4edaa16..91e0e51 100644 --- a/talkinghead/emotions/grief.json +++ b/talkinghead/emotions/grief.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/joy.json b/talkinghead/emotions/joy.json index c762085..756231a 100644 --- a/talkinghead/emotions/joy.json +++ b/talkinghead/emotions/joy.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/love.json b/talkinghead/emotions/love.json index 5863307..468cf51 100644 --- a/talkinghead/emotions/love.json +++ b/talkinghead/emotions/love.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/nervousness.json b/talkinghead/emotions/nervousness.json index e180ecd..092b517 100644 --- a/talkinghead/emotions/nervousness.json +++ b/talkinghead/emotions/nervousness.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/neutral.json b/talkinghead/emotions/neutral.json index aaecf60..f314b5c 100644 --- a/talkinghead/emotions/neutral.json +++ b/talkinghead/emotions/neutral.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/optimism.json b/talkinghead/emotions/optimism.json index dd6a12d..0479fce 100644 --- a/talkinghead/emotions/optimism.json +++ b/talkinghead/emotions/optimism.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/pride.json b/talkinghead/emotions/pride.json index 1313da0..8145a0e 100644 --- a/talkinghead/emotions/pride.json +++ b/talkinghead/emotions/pride.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/realization.json b/talkinghead/emotions/realization.json index c889af9..f98b357 100644 --- a/talkinghead/emotions/realization.json +++ b/talkinghead/emotions/realization.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.3, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/relief.json b/talkinghead/emotions/relief.json index 80c362d..65be60c 100644 --- a/talkinghead/emotions/relief.json +++ b/talkinghead/emotions/relief.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.0, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/remorse.json b/talkinghead/emotions/remorse.json index 22953f7..4d338b3 100644 --- a/talkinghead/emotions/remorse.json +++ b/talkinghead/emotions/remorse.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.284, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/sadness.json b/talkinghead/emotions/sadness.json index 9f48692..9d908ba 100644 --- a/talkinghead/emotions/sadness.json +++ b/talkinghead/emotions/sadness.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 0.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.6265, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/emotions/surprise.json b/talkinghead/emotions/surprise.json index 4368ed3..6a10656 100644 --- a/talkinghead/emotions/surprise.json +++ b/talkinghead/emotions/surprise.json @@ -20,7 +20,8 @@ "eye_surprised_right_index": 1.0, "eye_relaxed_left_index": 0.0, "eye_relaxed_right_index": 0.0, - "eye_unimpressed": 0.0, + "eye_unimpressed_left_index": 0.0, + "eye_unimpressed_right_index": 0.0, "eye_raised_lower_eyelid_left_index": 0.0, "eye_raised_lower_eyelid_right_index": 0.0, "iris_small_left_index": 0.6265, @@ -45,4 +46,4 @@ "body_z_index": 0.0, "breathing_index": 0.0 } -} \ No newline at end of file +} diff --git a/talkinghead/tha3/app/util.py b/talkinghead/tha3/app/util.py index 35b7284..d14dd02 100644 --- a/talkinghead/tha3/app/util.py +++ b/talkinghead/tha3/app/util.py @@ -25,10 +25,6 @@ logger = logging.getLogger(__name__) # The keys for a pose in the emotion JSON files. -# -# TODO: "eye_unimpressed" is arity-2, but has only one entry in the JSON. The current implementation smashes both into one, -# letting the second one (right slider) win. Maybe the two values should be saved separately, but we have to avoid -# breaking the live mode served by `app.py`. posedict_keys = ["eyebrow_troubled_left_index", "eyebrow_troubled_right_index", "eyebrow_angry_left_index", "eyebrow_angry_right_index", "eyebrow_lowered_left_index", "eyebrow_lowered_right_index", @@ -39,7 +35,7 @@ posedict_keys = ["eyebrow_troubled_left_index", "eyebrow_troubled_right_index", "eye_happy_wink_left_index", "eye_happy_wink_right_index", "eye_surprised_left_index", "eye_surprised_right_index", "eye_relaxed_left_index", "eye_relaxed_right_index", - "eye_unimpressed", "eye_unimpressed", + "eye_unimpressed_left_index", "eye_unimpressed_right_index", "eye_raised_lower_eyelid_left_index", "eye_raised_lower_eyelid_right_index", "iris_small_left_index", "iris_small_right_index", "mouth_aaa_index", @@ -59,7 +55,6 @@ posedict_keys = ["eyebrow_troubled_left_index", "eyebrow_troubled_right_index", assert len(posedict_keys) == 45 # posedict_keys gives us index->key; make an inverse mapping. -# Note this doesn't work for "eye_unimpressed", because it's not unique. (All the more reason to fix that.) posedict_key_to_index = {key: idx for idx, key in enumerate(posedict_keys)}