Remove references to dlib and OpenCV. Added TODOs to use with OSF.
[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
af96b559 11## Section 1: Cubism params calculation control
830d0ba4
AIL
12#
13# These values control how the facial landmarks are translated into
14# parameters that control the Cubism model, and will vary from person
15# to person. The following values seem to work OK for my face, but
16# your milage may vary.
17
af96b559
AIL
18# If 1, laterally invert the image (create a mirror image); if 0, don't invert
19lateralInversion 1
20
21# Section 1.0: Live2D automatic functionality
2b1f0c7c
AIL
22# Set 1 to enable, 0 to disable.
23# If these are set, the automatic functionality in Live2D will be enabled.
24# Note: If you set auto blink, eye control will be disabled.
25autoBlink 0
26autoBreath 0
27randomMotion 0
28
af96b559 29# Section 1.1: Face Y direction angle (head pointing up/down)
830d0ba4
AIL
30# The Y angle is calculated mainly based on the angle formed
31# by the corners and the tip of the nose (hereafter referred
32# to as the "nose angle").
33
34# This applies an offset (in degrees).
35# If you have a webcam at the top of your monitor, then it is likely
36# that when you look at the centre of your monitor, the captured image
37# will have you looking downwards. This offset shifts the angle upwards,
38# so that the resulting avatar will still be looking straight ahead.
39faceYAngleCorrection 10
40
41# This is the baseline value for the nose angle (in radians) when looking
42# straight ahead...
43faceYAngleZeroValue 1.8
44
45# ... and this is when you are looking up...
46faceYAngleUpThreshold 1.3
47
48# ... and when looking down.
49faceYAngleDownThreshold 2.3
50
51# This is an additional multiplication factor applied per degree of rotation
52# in the X direction (left/right) - since the nose angle reduces when
53# turning your head left/right.
54faceYAngleXRotCorrection 0.15
55
56# This is the multiplication factor to reduce by when smiling or laughing -
57# the nose angle increases in such cases.
58faceYAngleSmileCorrection 0.075
59
60
af96b559 61# Section 1.2: Eye control
830d0ba4
AIL
62# This is mainly calculated based on the eye aspect ratio (eye height
63# divided by eye width). Note that currently an average of the values
64# of both eyes is applied - mainly due to two reasons: (1) the dlib
65# dataset I'm using fails to detect winks for me, and (2) if this is
66# not done, I frequently get asynchronous blinks which just looks ugly.
67
68# Maximum eye aspect ratio when the eye is closed
69eyeClosedThreshold 0.2
70
71# Minimum eye aspect ratio when the eye is open
72eyeOpenThreshold 0.25
73
74# Max eye aspect ratio to switch to a closed "smiley eye"
75eyeSmileEyeOpenThreshold 0.6
76
77# Min "mouth form" value to switch to a closed "smiley eye"
78# "Mouth form" is 1 when fully smiling / laughing, and 0 when normal
79eyeSmileMouthFormThreshold 0.75
80
81# Min "mouth open" value to switch to a closed "smiley eye"
82# "Mouth open" is 1 when fully open, and 0 when closed
83eyeSmileMouthOpenThreshold 0.5
84
85
af96b559 86# Section 1.3: Mouth control
830d0ba4
AIL
87# Two parameters are passed to Cubism to control the mouth:
88# - mouth form: Controls smiles / laughs
89# - mouth openness: How widely open the mouth is
90# Mouth form is calculated by the ratio between the mouth width
91# and the eye separation (distance between the two eyes).
92# Mouth openness is calculated by the ratio between the lip separation
93# (distance between upper and lower lips) and the mouth width.
94
95# Max mouth-width-to-eye-separation ratio to have a normal resting mouth
96mouthNormalThreshold 0.75
97
98# Min mouth-width-to-eye-separation ratio to have a fully smiling
99# or laughing mouth
100mouthSmileThreshold 1.0
101
102# Max lip-separation-to-mouth-width ratio to have a closed mouth
103mouthClosedThreshold 0.1
104
105# Min lip-separation-to-mouth-width ratio to have a fully opened mouth
106mouthOpenThreshold 0.4
107
108# Additional multiplication factor applied to the mouth openness parameter
109# when the mouth is fully smiling / laughing, since doing so increases
110# the mouth width
111mouthOpenLaughCorrection 0.2
112
113
af96b559 114## Section 2: Filtering parameters
830d0ba4
AIL
115# The facial landmark coordinates can be quite noisy, so I've applied
116# a simple moving average filter to reduce noise. More taps would mean
117# more samples to average over, hence smoother movements with less noise,
118# but it will also cause more lag between your movement and the movement
119# of the avatar, and quick movements (e.g. blinks) may be completely missed.
120
121faceXAngleNumTaps 11
122faceYAngleNumTaps 11
123faceZAngleNumTaps 11
124mouthFormNumTaps 3
125mouthOpenNumTaps 3
126leftEyeOpenNumTaps 3
127rightEyeOpenNumTaps 3
128