Add Win32 support in README, build scripts, and example demo.
[facial-landmarks-for-cubism.git] / config.txt
CommitLineData
830d0ba4
AIL
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
cb483d3b
AIL
11## Section 0: OpenSeeFace connection parameters
12osfIpAddress 127.0.0.1
13osfPort 11573
14
af96b559 15## Section 1: Cubism params calculation control
830d0ba4
AIL
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
af96b559 22# Section 1.0: Live2D automatic functionality
2b1f0c7c
AIL
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.
26autoBlink 0
27autoBreath 0
28randomMotion 0
29
af96b559 30# Section 1.1: Face Y direction angle (head pointing up/down)
830d0ba4
AIL
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.
40faceYAngleCorrection 10
41
42# This is the baseline value for the nose angle (in radians) when looking
43# straight ahead...
44faceYAngleZeroValue 1.8
45
46# ... and this is when you are looking up...
47faceYAngleUpThreshold 1.3
48
49# ... and when looking down.
50faceYAngleDownThreshold 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.
55faceYAngleXRotCorrection 0.15
56
57# This is the multiplication factor to reduce by when smiling or laughing -
58# the nose angle increases in such cases.
59faceYAngleSmileCorrection 0.075
60
61
af96b559 62# Section 1.2: Eye control
830d0ba4 63# This is mainly calculated based on the eye aspect ratio (eye height
cb483d3b 64# divided by eye width).
830d0ba4
AIL
65
66# Maximum eye aspect ratio when the eye is closed
cb483d3b 67eyeClosedThreshold 0.18
830d0ba4
AIL
68
69# Minimum eye aspect ratio when the eye is open
cb483d3b 70eyeOpenThreshold 0.21
830d0ba4
AIL
71
72# Max eye aspect ratio to switch to a closed "smiley eye"
73eyeSmileEyeOpenThreshold 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
77eyeSmileMouthFormThreshold 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
81eyeSmileMouthOpenThreshold 0.5
82
cb483d3b
AIL
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.
88winkEnable 1
89
830d0ba4 90
af96b559 91# Section 1.3: Mouth control
830d0ba4
AIL
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
101mouthNormalThreshold 0.75
102
103# Min mouth-width-to-eye-separation ratio to have a fully smiling
104# or laughing mouth
105mouthSmileThreshold 1.0
106
107# Max lip-separation-to-mouth-width ratio to have a closed mouth
108mouthClosedThreshold 0.1
109
110# Min lip-separation-to-mouth-width ratio to have a fully opened mouth
111mouthOpenThreshold 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
116mouthOpenLaughCorrection 0.2
117
118
af96b559 119## Section 2: Filtering parameters
830d0ba4
AIL
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
cb483d3b
AIL
126faceXAngleNumTaps 7
127faceYAngleNumTaps 7
128faceZAngleNumTaps 7
830d0ba4
AIL
129mouthFormNumTaps 3
130mouthOpenNumTaps 3
131leftEyeOpenNumTaps 3
132rightEyeOpenNumTaps 3
133