| | import os |
| | import sys |
| |
|
| |
|
| | def input_pose(pose_select="front"): |
| | step = 1 |
| | if pose_select == "front": |
| | pose = [[0.0, 0.0, 0.0] for i in range(0, 10, step)] |
| | elif pose_select == "left_right_shaking": |
| | pose = [[-i, 0.0, 0.0] for i in range(0, 20, step)] |
| | pose += [[i - 20.0, 0.0, 0.0] for i in range(0, 40, step)] |
| | pose += [[20.0 - i, 0.0, 0.0] for i in range(0, 20, step)] |
| | pose = pose + pose |
| | pose = pose + pose |
| | pose = pose + pose |
| | else: |
| | raise ValueError("pose_select Error") |
| |
|
| | return pose |
| |
|
| |
|
| | EMOTIONS = ["angry", "disgust", "fear", "happy", "sad", "surprise", "neutral"] |
| |
|
| |
|
| | def input_emotion(emotion_select="neutral"): |
| | sacle_factor = 2 |
| | if emotion_select == "neutral": |
| | emotion = [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0] for _ in range(2)] |
| | elif emotion_select == "happy": |
| | emotion = [[0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0] for _ in range(2)] |
| | elif emotion_select == "angry": |
| | emotion = [[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] for _ in range(2)] |
| | elif emotion_select == "surprised": |
| | emotion = [[0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0] for _ in range(2)] |
| | else: |
| | raise ValueError("emotion_select Error") |
| |
|
| | return emotion * sacle_factor |
| |
|
| |
|
| | def input_blink(blink_select="yes"): |
| | if blink_select == "yes": |
| | blink = [[1.0] for _ in range(25)] |
| | blink += [[0.8], [0.6], [0.0], [0.0]] |
| | blink += [[1.0] for _ in range(5)] |
| | blink = blink + blink + blink |
| | else: |
| | blink = [[1.0] for _ in range(2)] |
| | return blink |
| |
|