apps.interactive_cd_face_tracking
interactive_cd_face_tracking(msh_file=None, Wp=None, bI=0, Ws=None, l=None, mu=10000.0, rho=1000.0, num_modes=16, num_clusters=100, constraint_enforcement='optimal', results_dir=None, read_cache=False, texture_png=None, texture_obj=None, draw_landmarks=False)
Runs a standard interactive fast CD simulation, where the user can manipulate a single affine handle with a mediapipe face tracker in real time.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msh_file |
str
|
path to Tet mesh .msh file (usually generated by TetWild) If default=None, calls the cd_fish.msh included with the package |
None
|
Wp |
float numpy array
|
n x m primary rig skinning weights used for control (default single handle full of ones) |
None
|
bI |
int
|
index in primary rig that we are controlling with our face |
0
|
Ws |
float numpy array
|
n x m skinning weights used for simulation. If None, recomputed on the fly |
None
|
l |
int numpy array
|
T x 1 per-tet cluster indices. if None, recomputed on the fly. |
None
|
num_modes |
int
|
if Ws is None, number of skinning modes to compute |
16
|
num_clusters |
int
|
if l is None, number of skinning clusters to compute. |
100
|
constraint_enforcement |
str
|
{"project", "optimal"}. if "optimal", performs the full constrained GEVP described in the paper. |
'optimal'
|
results_dir |
str
|
directory where results are stored and where cache is stored. if None, then |
None
|
read_cache |
bool
|
whether to read skinning modes from cache or not |
False
|
texture_obj |
str
|
directory pointing towards a .obj file of the surface mesh containing the UV map required for texture mapping. if None and if texture_png is None, then no texturing is applied. (default=None) |
None
|
texture_png |
str
|
directory pointing towards a .png file of the surface texture. if None and if texture_obj is None, then no texturing is applied. (default=None) |
None
|
draw_landmarks |
bool
|
whether to draw the face landmarks on the screen (default=False). This slows down the app if true |
False
|
Examples:
>>> import fast_cody as fcd
>>> fcd.apps.interactive_cd_face_tracking()
Source code in src\fast_cody\apps\interactive_cd_face_tracking.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
|