Upgrade to Cubism 5 Release R1.
[facial-landmarks-for-cubism.git] / config.txt
1 # Config file for FacialLandmarksForCubism
2
3 # The path of this config file should be passed to the constructor
4 # of the FacialLandmarkDetector.
5
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.
9
10
11 ## Section 0: OpenSeeFace connection parameters
12 osfIpAddress 127.0.0.1
13 osfPort 11573
14
15 ## Section 1: Cubism params calculation control
16 #
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.
21
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.
26 autoBlink 0
27 autoBreath 0
28 randomMotion 0
29
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").
34
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
41
42 # This is the baseline value for the nose angle (in radians) when looking
43 # straight ahead...
44 faceYAngleZeroValue 1.8
45
46 # ... and this is when you are looking up...
47 faceYAngleUpThreshold 1.3
48
49 # ... and when looking down.
50 faceYAngleDownThreshold 2.3
51
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
56
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
60
61
62 # Section 1.2: Eye control
63 # This is mainly calculated based on the eye aspect ratio (eye height
64 # divided by eye width).
65
66 # Maximum eye aspect ratio when the eye is closed
67 eyeClosedThreshold 0.18
68
69 # Minimum eye aspect ratio when the eye is open
70 eyeOpenThreshold 0.21
71
72 # Max eye aspect ratio to switch to a closed "smiley eye"
73 eyeSmileEyeOpenThreshold 0.6
74
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
78
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
82
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
86 # zero instead.
87 # Also, this seems to not work very well when wearing glasses.
88 winkEnable 1
89
90
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.
99
100 # Max mouth-width-to-eye-separation ratio to have a normal resting mouth
101 mouthNormalThreshold 0.75
102
103 # Min mouth-width-to-eye-separation ratio to have a fully smiling
104 # or laughing mouth
105 mouthSmileThreshold 1.0
106
107 # Max lip-separation-to-mouth-width ratio to have a closed mouth
108 mouthClosedThreshold 0.1
109
110 # Min lip-separation-to-mouth-width ratio to have a fully opened mouth
111 mouthOpenThreshold 0.4
112
113 # Additional multiplication factor applied to the mouth openness parameter
114 # when the mouth is fully smiling / laughing, since doing so increases
115 # the mouth width
116 mouthOpenLaughCorrection 0.2
117
118
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.
125
126 faceXAngleNumTaps 7
127 faceYAngleNumTaps 7
128 faceZAngleNumTaps 7
129 mouthFormNumTaps 3
130 mouthOpenNumTaps 3
131 leftEyeOpenNumTaps 3
132 rightEyeOpenNumTaps 3
133