Skip to content

Commit

Permalink
tidyup_comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KennardWang committed Oct 25, 2023
1 parent e0bf047 commit d1aa62b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion UnityAssets/Script/Momose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void paraUpdate()
eyeOpenLeft = Convert.ToSingle(para[3]);
eyeOpenRight = Convert.ToSingle(para[4]);

// eye balls
// eyeballs
eyeBallX = Convert.ToSingle(para[5]);
eyeBallY = Convert.ToSingle(para[6]);

Expand Down
12 changes: 4 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,24 +157,24 @@ def run():

if args.connect:
# Calibrate: pitch(15 is camera angle)
# Head
# head
roll = np.clip(
-(180 + np.degrees(steady_pose[2])), -50, 50)
pitch = np.clip(
-(np.degrees(steady_pose[1])), -50, 50)
yaw = np.clip(-(np.degrees(steady_pose[0])), -50, 50)

# Eyes
# eyes
earLeft = utils.eye_aspect_ratio(marks[36:42])
earRight = utils.eye_aspect_ratio(marks[42:48])
eyeballX = steady_pose[6]
eyeballY = steady_pose[7]

# Eyebrows
# eyebrows
barLeft = utils.brow_aspect_ratio(marks[17:22])
barRight = utils.brow_aspect_ratio(marks[22:27])

# Mouth
# mouth
mouthWidthRatio = utils.mouth_distance(
marks[60:68]) / (facebox[2] - facebox[0])
mouthOpen = utils.mouth_aspect_ratio(marks[60:68])
Expand All @@ -200,14 +200,10 @@ def run():
mouthWidth = utils.calibrate_mouthWidth(
mouthWidthRatio, args.gpu)

print(barLeft)

# Update
sock.update_all(roll, pitch, yaw, eyeOpenLeft, eyeOpenRight, eyeballX,
eyeballY, eyebrowLeft, eyebrowRight, mouthWidth, mouthOpen)

sock.cnt = 0

# In debug mode, show the marks
if args.debug:

Expand Down

0 comments on commit d1aa62b

Please sign in to comment.