@workglow/ai 0.0.71 → 0.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +1632 -283
- package/dist/browser.js.map +20 -8
- package/dist/bun.js +1632 -283
- package/dist/bun.js.map +20 -8
- package/dist/node.js +1632 -283
- package/dist/node.js.map +20 -8
- package/dist/task/BackgroundRemovalTask.d.ts +351 -0
- package/dist/task/BackgroundRemovalTask.d.ts.map +1 -0
- package/dist/task/FaceDetectorTask.d.ts +520 -0
- package/dist/task/FaceDetectorTask.d.ts.map +1 -0
- package/dist/task/FaceLandmarkerTask.d.ts +549 -0
- package/dist/task/FaceLandmarkerTask.d.ts.map +1 -0
- package/dist/task/GestureRecognizerTask.d.ts +629 -0
- package/dist/task/GestureRecognizerTask.d.ts.map +1 -0
- package/dist/task/HandLandmarkerTask.d.ts +576 -0
- package/dist/task/HandLandmarkerTask.d.ts.map +1 -0
- package/dist/task/ImageClassificationTask.d.ts +410 -0
- package/dist/task/ImageClassificationTask.d.ts.map +1 -0
- package/dist/task/ImageEmbeddingTask.d.ts +503 -0
- package/dist/task/ImageEmbeddingTask.d.ts.map +1 -0
- package/dist/task/ImageSegmentationTask.d.ts +423 -0
- package/dist/task/ImageSegmentationTask.d.ts.map +1 -0
- package/dist/task/ImageToTextTask.d.ts +355 -0
- package/dist/task/ImageToTextTask.d.ts.map +1 -0
- package/dist/task/ObjectDetectionTask.d.ts +476 -0
- package/dist/task/ObjectDetectionTask.d.ts.map +1 -0
- package/dist/task/PoseLandmarkerTask.d.ts +637 -0
- package/dist/task/PoseLandmarkerTask.d.ts.map +1 -0
- package/dist/task/{TextClassifierTask.d.ts → TextClassificationTask.d.ts} +23 -12
- package/dist/task/TextClassificationTask.d.ts.map +1 -0
- package/dist/task/TextFillMaskTask.d.ts.map +1 -1
- package/dist/task/TextNamedEntityRecognitionTask.d.ts.map +1 -1
- package/dist/task/base/AiTask.d.ts.map +1 -1
- package/dist/task/base/AiTaskSchemas.d.ts +153 -0
- package/dist/task/base/AiTaskSchemas.d.ts.map +1 -1
- package/dist/task/base/AiVisionTask.d.ts +33 -0
- package/dist/task/base/AiVisionTask.d.ts.map +1 -0
- package/dist/task/index.d.ts +12 -1
- package/dist/task/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/task/TextClassifierTask.d.ts.map +0 -1
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CreateWorkflow, JobQueueTaskConfig } from "@workglow/task-graph";
|
|
7
|
+
import { DataPortSchema, FromSchema } from "@workglow/util";
|
|
8
|
+
import { DeReplicateFromSchema } from "./base/AiTaskSchemas";
|
|
9
|
+
import { AiVisionTask } from "./base/AiVisionTask";
|
|
10
|
+
export declare const FaceLandmarkerInputSchema: {
|
|
11
|
+
readonly type: "object";
|
|
12
|
+
readonly properties: {
|
|
13
|
+
readonly image: {
|
|
14
|
+
readonly "x-replicate": true;
|
|
15
|
+
readonly format?: string | undefined;
|
|
16
|
+
readonly oneOf: readonly [{
|
|
17
|
+
readonly oneOf: readonly [{
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
readonly title: "Image Data";
|
|
20
|
+
readonly description: "Image as data-uri";
|
|
21
|
+
}, {
|
|
22
|
+
readonly type: "object";
|
|
23
|
+
readonly additionalProperties: false;
|
|
24
|
+
readonly properties: {
|
|
25
|
+
readonly data: {
|
|
26
|
+
readonly oneOf: readonly [{
|
|
27
|
+
readonly type: "object";
|
|
28
|
+
readonly format: "image:ImageBitmap";
|
|
29
|
+
readonly title: "ImageBitmap";
|
|
30
|
+
}, {
|
|
31
|
+
readonly type: "object";
|
|
32
|
+
readonly format: "image:OffscreenCanvas";
|
|
33
|
+
readonly title: "OffscreenCanvas";
|
|
34
|
+
}, {
|
|
35
|
+
readonly type: "object";
|
|
36
|
+
readonly format: "image:VideoFrame";
|
|
37
|
+
readonly title: "VideoFrame";
|
|
38
|
+
}, {
|
|
39
|
+
readonly type: "object";
|
|
40
|
+
readonly properties: {
|
|
41
|
+
readonly data: {
|
|
42
|
+
readonly type: "array";
|
|
43
|
+
readonly items: {
|
|
44
|
+
readonly type: "number";
|
|
45
|
+
readonly format: "Uint8Clamped";
|
|
46
|
+
};
|
|
47
|
+
readonly format: "Uint8ClampedArray";
|
|
48
|
+
readonly title: "Data";
|
|
49
|
+
readonly description: "Data of the image";
|
|
50
|
+
};
|
|
51
|
+
readonly width: {
|
|
52
|
+
readonly type: "number";
|
|
53
|
+
readonly title: "Width";
|
|
54
|
+
readonly description: "Width of the image";
|
|
55
|
+
};
|
|
56
|
+
readonly height: {
|
|
57
|
+
readonly type: "number";
|
|
58
|
+
readonly title: "Height";
|
|
59
|
+
readonly description: "Height of the image";
|
|
60
|
+
};
|
|
61
|
+
readonly channels: {
|
|
62
|
+
readonly type: "number";
|
|
63
|
+
readonly title: "Channels";
|
|
64
|
+
readonly description: "Channels of the image";
|
|
65
|
+
};
|
|
66
|
+
readonly rawChannels: {
|
|
67
|
+
readonly type: "number";
|
|
68
|
+
readonly title: "Raw Channels";
|
|
69
|
+
readonly description: "Raw channels of the image";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
readonly additionalProperties: false;
|
|
73
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
74
|
+
readonly format: "image:ImageBinary";
|
|
75
|
+
readonly title: "ImageBinary";
|
|
76
|
+
}];
|
|
77
|
+
};
|
|
78
|
+
readonly width: {
|
|
79
|
+
readonly type: "number";
|
|
80
|
+
readonly title: "Width";
|
|
81
|
+
readonly description: "Width of the image";
|
|
82
|
+
};
|
|
83
|
+
readonly height: {
|
|
84
|
+
readonly type: "number";
|
|
85
|
+
readonly title: "Height";
|
|
86
|
+
readonly description: "Height of the image";
|
|
87
|
+
};
|
|
88
|
+
readonly channels: {
|
|
89
|
+
readonly type: "number";
|
|
90
|
+
readonly title: "Channels";
|
|
91
|
+
readonly description: "Channels of the image";
|
|
92
|
+
readonly minimum: 1;
|
|
93
|
+
readonly maximum: 4;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
97
|
+
}];
|
|
98
|
+
readonly title: "Image";
|
|
99
|
+
readonly description: "Image as URL or base64-encoded data";
|
|
100
|
+
}, {
|
|
101
|
+
readonly type: "array";
|
|
102
|
+
readonly items: {
|
|
103
|
+
readonly oneOf: readonly [{
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
readonly title: "Image Data";
|
|
106
|
+
readonly description: "Image as data-uri";
|
|
107
|
+
}, {
|
|
108
|
+
readonly type: "object";
|
|
109
|
+
readonly additionalProperties: false;
|
|
110
|
+
readonly properties: {
|
|
111
|
+
readonly data: {
|
|
112
|
+
readonly oneOf: readonly [{
|
|
113
|
+
readonly type: "object";
|
|
114
|
+
readonly format: "image:ImageBitmap";
|
|
115
|
+
readonly title: "ImageBitmap";
|
|
116
|
+
}, {
|
|
117
|
+
readonly type: "object";
|
|
118
|
+
readonly format: "image:OffscreenCanvas";
|
|
119
|
+
readonly title: "OffscreenCanvas";
|
|
120
|
+
}, {
|
|
121
|
+
readonly type: "object";
|
|
122
|
+
readonly format: "image:VideoFrame";
|
|
123
|
+
readonly title: "VideoFrame";
|
|
124
|
+
}, {
|
|
125
|
+
readonly type: "object";
|
|
126
|
+
readonly properties: {
|
|
127
|
+
readonly data: {
|
|
128
|
+
readonly type: "array";
|
|
129
|
+
readonly items: {
|
|
130
|
+
readonly type: "number";
|
|
131
|
+
readonly format: "Uint8Clamped";
|
|
132
|
+
};
|
|
133
|
+
readonly format: "Uint8ClampedArray";
|
|
134
|
+
readonly title: "Data";
|
|
135
|
+
readonly description: "Data of the image";
|
|
136
|
+
};
|
|
137
|
+
readonly width: {
|
|
138
|
+
readonly type: "number";
|
|
139
|
+
readonly title: "Width";
|
|
140
|
+
readonly description: "Width of the image";
|
|
141
|
+
};
|
|
142
|
+
readonly height: {
|
|
143
|
+
readonly type: "number";
|
|
144
|
+
readonly title: "Height";
|
|
145
|
+
readonly description: "Height of the image";
|
|
146
|
+
};
|
|
147
|
+
readonly channels: {
|
|
148
|
+
readonly type: "number";
|
|
149
|
+
readonly title: "Channels";
|
|
150
|
+
readonly description: "Channels of the image";
|
|
151
|
+
};
|
|
152
|
+
readonly rawChannels: {
|
|
153
|
+
readonly type: "number";
|
|
154
|
+
readonly title: "Raw Channels";
|
|
155
|
+
readonly description: "Raw channels of the image";
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
readonly additionalProperties: false;
|
|
159
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
160
|
+
readonly format: "image:ImageBinary";
|
|
161
|
+
readonly title: "ImageBinary";
|
|
162
|
+
}];
|
|
163
|
+
};
|
|
164
|
+
readonly width: {
|
|
165
|
+
readonly type: "number";
|
|
166
|
+
readonly title: "Width";
|
|
167
|
+
readonly description: "Width of the image";
|
|
168
|
+
};
|
|
169
|
+
readonly height: {
|
|
170
|
+
readonly type: "number";
|
|
171
|
+
readonly title: "Height";
|
|
172
|
+
readonly description: "Height of the image";
|
|
173
|
+
};
|
|
174
|
+
readonly channels: {
|
|
175
|
+
readonly type: "number";
|
|
176
|
+
readonly title: "Channels";
|
|
177
|
+
readonly description: "Channels of the image";
|
|
178
|
+
readonly minimum: 1;
|
|
179
|
+
readonly maximum: 4;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
183
|
+
}];
|
|
184
|
+
readonly title: "Image";
|
|
185
|
+
readonly description: "Image as URL or base64-encoded data";
|
|
186
|
+
};
|
|
187
|
+
}];
|
|
188
|
+
readonly title: string | undefined;
|
|
189
|
+
readonly description: string | undefined;
|
|
190
|
+
};
|
|
191
|
+
readonly model: {
|
|
192
|
+
readonly "x-replicate": true;
|
|
193
|
+
readonly format?: string | undefined;
|
|
194
|
+
readonly oneOf: readonly [{
|
|
195
|
+
readonly oneOf: readonly [{
|
|
196
|
+
readonly title: "Model";
|
|
197
|
+
readonly description: `The model ${string}`;
|
|
198
|
+
} & {
|
|
199
|
+
readonly format: import(".").TypeModelSemantic;
|
|
200
|
+
readonly type: "string";
|
|
201
|
+
}, {
|
|
202
|
+
readonly type: "object";
|
|
203
|
+
readonly properties: {
|
|
204
|
+
readonly model_id: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
};
|
|
207
|
+
readonly tasks: {
|
|
208
|
+
readonly type: "array";
|
|
209
|
+
readonly items: {
|
|
210
|
+
readonly type: "string";
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
readonly title: {
|
|
214
|
+
readonly type: "string";
|
|
215
|
+
};
|
|
216
|
+
readonly description: {
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
};
|
|
219
|
+
readonly provider: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
};
|
|
222
|
+
readonly providerConfig: {
|
|
223
|
+
readonly type: "object";
|
|
224
|
+
readonly default: {};
|
|
225
|
+
};
|
|
226
|
+
readonly metadata: {
|
|
227
|
+
readonly type: "object";
|
|
228
|
+
readonly default: {};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
readonly required: readonly ["model_id", "tasks", "provider", "title", "description", "providerConfig", "metadata"];
|
|
232
|
+
readonly format: "model";
|
|
233
|
+
readonly additionalProperties: false;
|
|
234
|
+
} & {
|
|
235
|
+
readonly format: import(".").TypeModelSemantic;
|
|
236
|
+
}];
|
|
237
|
+
} & {
|
|
238
|
+
readonly format: import(".").TypeModelSemantic;
|
|
239
|
+
}, {
|
|
240
|
+
readonly type: "array";
|
|
241
|
+
readonly items: {
|
|
242
|
+
readonly oneOf: readonly [{
|
|
243
|
+
readonly title: "Model";
|
|
244
|
+
readonly description: `The model ${string}`;
|
|
245
|
+
} & {
|
|
246
|
+
readonly format: import(".").TypeModelSemantic;
|
|
247
|
+
readonly type: "string";
|
|
248
|
+
}, {
|
|
249
|
+
readonly type: "object";
|
|
250
|
+
readonly properties: {
|
|
251
|
+
readonly model_id: {
|
|
252
|
+
readonly type: "string";
|
|
253
|
+
};
|
|
254
|
+
readonly tasks: {
|
|
255
|
+
readonly type: "array";
|
|
256
|
+
readonly items: {
|
|
257
|
+
readonly type: "string";
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
readonly title: {
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
};
|
|
263
|
+
readonly description: {
|
|
264
|
+
readonly type: "string";
|
|
265
|
+
};
|
|
266
|
+
readonly provider: {
|
|
267
|
+
readonly type: "string";
|
|
268
|
+
};
|
|
269
|
+
readonly providerConfig: {
|
|
270
|
+
readonly type: "object";
|
|
271
|
+
readonly default: {};
|
|
272
|
+
};
|
|
273
|
+
readonly metadata: {
|
|
274
|
+
readonly type: "object";
|
|
275
|
+
readonly default: {};
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
readonly required: readonly ["model_id", "tasks", "provider", "title", "description", "providerConfig", "metadata"];
|
|
279
|
+
readonly format: "model";
|
|
280
|
+
readonly additionalProperties: false;
|
|
281
|
+
} & {
|
|
282
|
+
readonly format: import(".").TypeModelSemantic;
|
|
283
|
+
}];
|
|
284
|
+
} & {
|
|
285
|
+
readonly format: import(".").TypeModelSemantic;
|
|
286
|
+
};
|
|
287
|
+
}];
|
|
288
|
+
readonly title: string | undefined;
|
|
289
|
+
readonly description: string | undefined;
|
|
290
|
+
};
|
|
291
|
+
readonly numFaces: {
|
|
292
|
+
readonly type: "number";
|
|
293
|
+
readonly minimum: 1;
|
|
294
|
+
readonly maximum: 10;
|
|
295
|
+
readonly default: 1;
|
|
296
|
+
readonly title: "Number of Faces";
|
|
297
|
+
readonly description: "The maximum number of faces to detect";
|
|
298
|
+
readonly "x-ui-group": "Configuration";
|
|
299
|
+
};
|
|
300
|
+
readonly minFaceDetectionConfidence: {
|
|
301
|
+
readonly type: "number";
|
|
302
|
+
readonly minimum: 0;
|
|
303
|
+
readonly maximum: 1;
|
|
304
|
+
readonly default: 0.5;
|
|
305
|
+
readonly title: "Min Face Detection Confidence";
|
|
306
|
+
readonly description: "Minimum confidence score for face detection";
|
|
307
|
+
readonly "x-ui-group": "Configuration";
|
|
308
|
+
};
|
|
309
|
+
readonly minFacePresenceConfidence: {
|
|
310
|
+
readonly type: "number";
|
|
311
|
+
readonly minimum: 0;
|
|
312
|
+
readonly maximum: 1;
|
|
313
|
+
readonly default: 0.5;
|
|
314
|
+
readonly title: "Min Face Presence Confidence";
|
|
315
|
+
readonly description: "Minimum confidence score for face presence";
|
|
316
|
+
readonly "x-ui-group": "Configuration";
|
|
317
|
+
};
|
|
318
|
+
readonly minTrackingConfidence: {
|
|
319
|
+
readonly type: "number";
|
|
320
|
+
readonly minimum: 0;
|
|
321
|
+
readonly maximum: 1;
|
|
322
|
+
readonly default: 0.5;
|
|
323
|
+
readonly title: "Min Tracking Confidence";
|
|
324
|
+
readonly description: "Minimum confidence score for face tracking";
|
|
325
|
+
readonly "x-ui-group": "Configuration";
|
|
326
|
+
};
|
|
327
|
+
readonly outputFaceBlendshapes: {
|
|
328
|
+
readonly type: "boolean";
|
|
329
|
+
readonly default: false;
|
|
330
|
+
readonly title: "Output Face Blendshapes";
|
|
331
|
+
readonly description: "Whether to output blendshape coefficients for facial expressions";
|
|
332
|
+
readonly "x-ui-group": "Configuration";
|
|
333
|
+
};
|
|
334
|
+
readonly outputFacialTransformationMatrixes: {
|
|
335
|
+
readonly type: "boolean";
|
|
336
|
+
readonly default: false;
|
|
337
|
+
readonly title: "Output Facial Transformation Matrix";
|
|
338
|
+
readonly description: "Whether to output transformation matrix for effects rendering";
|
|
339
|
+
readonly "x-ui-group": "Configuration";
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
readonly required: readonly ["image", "model"];
|
|
343
|
+
readonly additionalProperties: false;
|
|
344
|
+
};
|
|
345
|
+
export declare const FaceLandmarkerOutputSchema: {
|
|
346
|
+
readonly type: "object";
|
|
347
|
+
readonly properties: {
|
|
348
|
+
readonly faces: {
|
|
349
|
+
readonly oneOf: readonly [{
|
|
350
|
+
readonly type: "array";
|
|
351
|
+
readonly items: {
|
|
352
|
+
readonly type: "object";
|
|
353
|
+
readonly properties: {
|
|
354
|
+
readonly landmarks: {
|
|
355
|
+
readonly type: "array";
|
|
356
|
+
readonly items: {
|
|
357
|
+
readonly type: "object";
|
|
358
|
+
readonly properties: {
|
|
359
|
+
readonly x: {
|
|
360
|
+
readonly type: "number";
|
|
361
|
+
readonly title: "X Coordinate";
|
|
362
|
+
readonly description: "X coordinate normalized to [0.0, 1.0]";
|
|
363
|
+
};
|
|
364
|
+
readonly y: {
|
|
365
|
+
readonly type: "number";
|
|
366
|
+
readonly title: "Y Coordinate";
|
|
367
|
+
readonly description: "Y coordinate normalized to [0.0, 1.0]";
|
|
368
|
+
};
|
|
369
|
+
readonly z: {
|
|
370
|
+
readonly type: "number";
|
|
371
|
+
readonly title: "Z Coordinate";
|
|
372
|
+
readonly description: "Z coordinate (depth)";
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
readonly required: readonly ["x", "y", "z"];
|
|
376
|
+
readonly additionalProperties: false;
|
|
377
|
+
};
|
|
378
|
+
readonly title: "Landmarks";
|
|
379
|
+
readonly description: "478 facial landmarks in image coordinates";
|
|
380
|
+
};
|
|
381
|
+
readonly blendshapes: {
|
|
382
|
+
readonly type: "array";
|
|
383
|
+
readonly items: {
|
|
384
|
+
readonly type: "object";
|
|
385
|
+
readonly properties: {
|
|
386
|
+
readonly label: {
|
|
387
|
+
readonly type: "string";
|
|
388
|
+
readonly title: "Blendshape Label";
|
|
389
|
+
readonly description: "Name of the blendshape (e.g., 'browDownLeft', 'eyeBlinkRight', etc.)";
|
|
390
|
+
};
|
|
391
|
+
readonly score: {
|
|
392
|
+
readonly type: "number";
|
|
393
|
+
readonly title: "Coefficient Value";
|
|
394
|
+
readonly description: "Coefficient value for this blendshape";
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
readonly required: readonly ["label", "score"];
|
|
398
|
+
readonly additionalProperties: false;
|
|
399
|
+
};
|
|
400
|
+
readonly title: "Blendshapes";
|
|
401
|
+
readonly description: "52 blendshape coefficients representing facial expressions";
|
|
402
|
+
};
|
|
403
|
+
readonly transformationMatrix: {
|
|
404
|
+
readonly type: "array";
|
|
405
|
+
readonly items: {
|
|
406
|
+
readonly type: "number";
|
|
407
|
+
};
|
|
408
|
+
readonly minItems: 16;
|
|
409
|
+
readonly maxItems: 16;
|
|
410
|
+
readonly title: "Transformation Matrix";
|
|
411
|
+
readonly description: "4x4 transformation matrix for face effects rendering";
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
readonly required: readonly ["landmarks"];
|
|
415
|
+
readonly additionalProperties: false;
|
|
416
|
+
};
|
|
417
|
+
}, {
|
|
418
|
+
readonly type: "array";
|
|
419
|
+
readonly items: {
|
|
420
|
+
readonly type: "array";
|
|
421
|
+
readonly items: {
|
|
422
|
+
readonly type: "object";
|
|
423
|
+
readonly properties: {
|
|
424
|
+
readonly landmarks: {
|
|
425
|
+
readonly type: "array";
|
|
426
|
+
readonly items: {
|
|
427
|
+
readonly type: "object";
|
|
428
|
+
readonly properties: {
|
|
429
|
+
readonly x: {
|
|
430
|
+
readonly type: "number";
|
|
431
|
+
readonly title: "X Coordinate";
|
|
432
|
+
readonly description: "X coordinate normalized to [0.0, 1.0]";
|
|
433
|
+
};
|
|
434
|
+
readonly y: {
|
|
435
|
+
readonly type: "number";
|
|
436
|
+
readonly title: "Y Coordinate";
|
|
437
|
+
readonly description: "Y coordinate normalized to [0.0, 1.0]";
|
|
438
|
+
};
|
|
439
|
+
readonly z: {
|
|
440
|
+
readonly type: "number";
|
|
441
|
+
readonly title: "Z Coordinate";
|
|
442
|
+
readonly description: "Z coordinate (depth)";
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
readonly required: readonly ["x", "y", "z"];
|
|
446
|
+
readonly additionalProperties: false;
|
|
447
|
+
};
|
|
448
|
+
readonly title: "Landmarks";
|
|
449
|
+
readonly description: "478 facial landmarks in image coordinates";
|
|
450
|
+
};
|
|
451
|
+
readonly blendshapes: {
|
|
452
|
+
readonly type: "array";
|
|
453
|
+
readonly items: {
|
|
454
|
+
readonly type: "object";
|
|
455
|
+
readonly properties: {
|
|
456
|
+
readonly label: {
|
|
457
|
+
readonly type: "string";
|
|
458
|
+
readonly title: "Blendshape Label";
|
|
459
|
+
readonly description: "Name of the blendshape (e.g., 'browDownLeft', 'eyeBlinkRight', etc.)";
|
|
460
|
+
};
|
|
461
|
+
readonly score: {
|
|
462
|
+
readonly type: "number";
|
|
463
|
+
readonly title: "Coefficient Value";
|
|
464
|
+
readonly description: "Coefficient value for this blendshape";
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
readonly required: readonly ["label", "score"];
|
|
468
|
+
readonly additionalProperties: false;
|
|
469
|
+
};
|
|
470
|
+
readonly title: "Blendshapes";
|
|
471
|
+
readonly description: "52 blendshape coefficients representing facial expressions";
|
|
472
|
+
};
|
|
473
|
+
readonly transformationMatrix: {
|
|
474
|
+
readonly type: "array";
|
|
475
|
+
readonly items: {
|
|
476
|
+
readonly type: "number";
|
|
477
|
+
};
|
|
478
|
+
readonly minItems: 16;
|
|
479
|
+
readonly maxItems: 16;
|
|
480
|
+
readonly title: "Transformation Matrix";
|
|
481
|
+
readonly description: "4x4 transformation matrix for face effects rendering";
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
readonly required: readonly ["landmarks"];
|
|
485
|
+
readonly additionalProperties: false;
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
}];
|
|
489
|
+
readonly title: "Face Detections";
|
|
490
|
+
readonly description: "Detected faces with landmarks, blendshapes, and transformation matrices";
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
readonly required: readonly ["faces"];
|
|
494
|
+
readonly additionalProperties: false;
|
|
495
|
+
};
|
|
496
|
+
export type FaceLandmarkerTaskInput = FromSchema<typeof FaceLandmarkerInputSchema>;
|
|
497
|
+
export type FaceLandmarkerTaskOutput = FromSchema<typeof FaceLandmarkerOutputSchema>;
|
|
498
|
+
export type FaceLandmarkerTaskExecuteInput = DeReplicateFromSchema<typeof FaceLandmarkerInputSchema>;
|
|
499
|
+
export type FaceLandmarkerTaskExecuteOutput = DeReplicateFromSchema<typeof FaceLandmarkerOutputSchema>;
|
|
500
|
+
/**
|
|
501
|
+
* Detects facial landmarks and expressions in images using MediaPipe Face Landmarker.
|
|
502
|
+
* Identifies 478 facial landmarks, 52 blendshape coefficients for expressions,
|
|
503
|
+
* and provides transformation matrices for AR effects.
|
|
504
|
+
*/
|
|
505
|
+
export declare class FaceLandmarkerTask extends AiVisionTask<FaceLandmarkerTaskInput, FaceLandmarkerTaskOutput, JobQueueTaskConfig> {
|
|
506
|
+
static type: string;
|
|
507
|
+
static category: string;
|
|
508
|
+
static title: string;
|
|
509
|
+
static description: string;
|
|
510
|
+
static inputSchema(): DataPortSchema;
|
|
511
|
+
static outputSchema(): DataPortSchema;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Convenience function to run face landmark detection tasks.
|
|
515
|
+
* Creates and executes a FaceLandmarkerTask with the provided input.
|
|
516
|
+
* @param input The input parameters for face landmark detection (image, model, and optional configuration)
|
|
517
|
+
* @returns Promise resolving to the detected facial landmarks, blendshapes, and transformation matrices
|
|
518
|
+
*/
|
|
519
|
+
export declare const FaceLandmarker: (input: FaceLandmarkerTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
520
|
+
faces: {
|
|
521
|
+
blendshapes?: {
|
|
522
|
+
score: number;
|
|
523
|
+
label: string;
|
|
524
|
+
}[] | undefined;
|
|
525
|
+
transformationMatrix?: number[] | undefined;
|
|
526
|
+
landmarks: {
|
|
527
|
+
x: number;
|
|
528
|
+
y: number;
|
|
529
|
+
z: number;
|
|
530
|
+
}[];
|
|
531
|
+
}[] | {
|
|
532
|
+
blendshapes?: {
|
|
533
|
+
score: number;
|
|
534
|
+
label: string;
|
|
535
|
+
}[] | undefined;
|
|
536
|
+
transformationMatrix?: number[] | undefined;
|
|
537
|
+
landmarks: {
|
|
538
|
+
x: number;
|
|
539
|
+
y: number;
|
|
540
|
+
z: number;
|
|
541
|
+
}[];
|
|
542
|
+
}[][];
|
|
543
|
+
}>;
|
|
544
|
+
declare module "@workglow/task-graph" {
|
|
545
|
+
interface Workflow {
|
|
546
|
+
FaceLandmarker: CreateWorkflow<FaceLandmarkerTaskInput, FaceLandmarkerTaskOutput, JobQueueTaskConfig>;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
//# sourceMappingURL=FaceLandmarkerTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FaceLandmarkerTask.d.ts","sourceRoot":"","sources":["../../src/task/FaceLandmarkerTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAA0B,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EACL,qBAAqB,EAItB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAuFnD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DH,CAAC;AAEpC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcJ,CAAC;AAEpC,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACnF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACrF,MAAM,MAAM,8BAA8B,GAAG,qBAAqB,CAChE,OAAO,yBAAyB,CACjC,CAAC;AACF,MAAM,MAAM,+BAA+B,GAAG,qBAAqB,CACjE,OAAO,0BAA0B,CAClC,CAAC;AAEF;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,YAAY,CAClD,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,CACnB;IACC,OAAc,IAAI,SAAwB;IAC1C,OAAc,QAAQ,SAAqB;IAC3C,OAAc,KAAK,SAAqB;IACxC,OAAc,WAAW,SACyI;WACpJ,WAAW,IAAI,cAAc;WAG7B,YAAY,IAAI,cAAc;CAG7C;AAID;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,uBAAuB,EAAE,SAAS,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EAEzF,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,cAAc,EAAE,cAAc,CAC5B,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,CACnB,CAAC;KACH;CACF"}
|