1 # Config file for FacialLandmarksForCubism
3 # The path of this config file should be passed to the constructor
4 # of the FacialLandmarkDetector.
6 # Comments are lines that start with a '#' and are ignored by the parser.
7 # Note that a line will be considered as a comment ONLY IF the '#' is the
8 # very first character of the line, i.e. without any preceeding whitespace.
11 ## Section 0: OpenSeeFace connection parameters
12 osfIpAddress 127.0.0.1
15 ## Section 1: Cubism params calculation control
17 # These values control how the facial landmarks are translated into
18 # parameters that control the Cubism model, and will vary from person
19 # to person. The following values seem to work OK for my face, but
20 # your milage may vary.
22 # Section 1.0: Live2D automatic functionality
23 # Set 1 to enable, 0 to disable.
24 # If these are set, the automatic functionality in Live2D will be enabled.
25 # Note: If you set auto blink, eye control will be disabled.
30 # Section 1.1: Face Y direction angle (head pointing up/down)
31 # The Y angle is calculated mainly based on the angle formed
32 # by the corners and the tip of the nose (hereafter referred
33 # to as the "nose angle").
35 # This applies an offset (in degrees).
36 # If you have a webcam at the top of your monitor, then it is likely
37 # that when you look at the centre of your monitor, the captured image
38 # will have you looking downwards. This offset shifts the angle upwards,
39 # so that the resulting avatar will still be looking straight ahead.
40 faceYAngleCorrection 10
42 # This is the baseline value for the nose angle (in radians) when looking
44 faceYAngleZeroValue 1.8
46 # ... and this is when you are looking up...
47 faceYAngleUpThreshold 1.3
49 # ... and when looking down.
50 faceYAngleDownThreshold 2.3
52 # This is an additional multiplication factor applied per degree of rotation
53 # in the X direction (left/right) - since the nose angle reduces when
54 # turning your head left/right.
55 faceYAngleXRotCorrection 0.15
57 # This is the multiplication factor to reduce by when smiling or laughing -
58 # the nose angle increases in such cases.
59 faceYAngleSmileCorrection 0.075
62 # Section 1.2: Eye control
63 # This is mainly calculated based on the eye aspect ratio (eye height
64 # divided by eye width).
66 # Maximum eye aspect ratio when the eye is closed
67 eyeClosedThreshold 0.18
69 # Minimum eye aspect ratio when the eye is open
72 # Max eye aspect ratio to switch to a closed "smiley eye"
73 eyeSmileEyeOpenThreshold 0.6
75 # Min "mouth form" value to switch to a closed "smiley eye"
76 # "Mouth form" is 1 when fully smiling / laughing, and 0 when normal
77 eyeSmileMouthFormThreshold 0.75
79 # Min "mouth open" value to switch to a closed "smiley eye"
80 # "Mouth open" is 1 when fully open, and 0 when closed
81 eyeSmileMouthOpenThreshold 0.5
83 # Enable winks (experimental)
84 # Winks may or may not work well on your face, depending on the dataset.
85 # If all you get is ugly asynchronous blinks, consider setting this to
87 # Also, this seems to not work very well when wearing glasses.
91 # Section 1.3: Mouth control
92 # Two parameters are passed to Cubism to control the mouth:
93 # - mouth form: Controls smiles / laughs
94 # - mouth openness: How widely open the mouth is
95 # Mouth form is calculated by the ratio between the mouth width
96 # and the eye separation (distance between the two eyes).
97 # Mouth openness is calculated by the ratio between the lip separation
98 # (distance between upper and lower lips) and the mouth width.
100 # Max mouth-width-to-eye-separation ratio to have a normal resting mouth
101 mouthNormalThreshold 0.75
103 # Min mouth-width-to-eye-separation ratio to have a fully smiling
105 mouthSmileThreshold 1.0
107 # Max lip-separation-to-mouth-width ratio to have a closed mouth
108 mouthClosedThreshold 0.1
110 # Min lip-separation-to-mouth-width ratio to have a fully opened mouth
111 mouthOpenThreshold 0.4
113 # Additional multiplication factor applied to the mouth openness parameter
114 # when the mouth is fully smiling / laughing, since doing so increases
116 mouthOpenLaughCorrection 0.2
119 ## Section 2: Filtering parameters
120 # The facial landmark coordinates can be quite noisy, so I've applied
121 # a simple moving average filter to reduce noise. More taps would mean
122 # more samples to average over, hence smoother movements with less noise,
123 # but it will also cause more lag between your movement and the movement
124 # of the avatar, and quick movements (e.g. blinks) may be completely missed.
132 rightEyeOpenNumTaps 3