@workglow/ai 0.0.72 → 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 +875 -87
- package/dist/browser.js.map +8 -3
- package/dist/bun.js +875 -87
- package/dist/bun.js.map +8 -3
- package/dist/node.js +875 -87
- package/dist/node.js.map +8 -3
- 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/PoseLandmarkerTask.d.ts +637 -0
- package/dist/task/PoseLandmarkerTask.d.ts.map +1 -0
- package/dist/task/index.d.ts +5 -0
- package/dist/task/index.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,520 @@
|
|
|
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 FaceDetectorInputSchema: {
|
|
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 minDetectionConfidence: {
|
|
292
|
+
readonly type: "number";
|
|
293
|
+
readonly minimum: 0;
|
|
294
|
+
readonly maximum: 1;
|
|
295
|
+
readonly default: 0.5;
|
|
296
|
+
readonly title: "Min Detection Confidence";
|
|
297
|
+
readonly description: "Minimum confidence score for face detection";
|
|
298
|
+
readonly "x-ui-group": "Configuration";
|
|
299
|
+
};
|
|
300
|
+
readonly minSuppressionThreshold: {
|
|
301
|
+
readonly type: "number";
|
|
302
|
+
readonly minimum: 0;
|
|
303
|
+
readonly maximum: 1;
|
|
304
|
+
readonly default: 0.3;
|
|
305
|
+
readonly title: "Min Suppression Threshold";
|
|
306
|
+
readonly description: "Minimum non-maximum-suppression threshold for overlapping detections";
|
|
307
|
+
readonly "x-ui-group": "Configuration";
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
readonly required: readonly ["image", "model"];
|
|
311
|
+
readonly additionalProperties: false;
|
|
312
|
+
};
|
|
313
|
+
export declare const FaceDetectorOutputSchema: {
|
|
314
|
+
readonly type: "object";
|
|
315
|
+
readonly properties: {
|
|
316
|
+
readonly faces: {
|
|
317
|
+
readonly oneOf: readonly [{
|
|
318
|
+
readonly type: "array";
|
|
319
|
+
readonly items: {
|
|
320
|
+
readonly type: "object";
|
|
321
|
+
readonly properties: {
|
|
322
|
+
readonly box: {
|
|
323
|
+
readonly type: "object";
|
|
324
|
+
readonly properties: {
|
|
325
|
+
readonly x: {
|
|
326
|
+
readonly type: "number";
|
|
327
|
+
readonly title: "X Coordinate";
|
|
328
|
+
readonly description: "X coordinate of the top-left corner";
|
|
329
|
+
};
|
|
330
|
+
readonly y: {
|
|
331
|
+
readonly type: "number";
|
|
332
|
+
readonly title: "Y Coordinate";
|
|
333
|
+
readonly description: "Y coordinate of the top-left corner";
|
|
334
|
+
};
|
|
335
|
+
readonly width: {
|
|
336
|
+
readonly type: "number";
|
|
337
|
+
readonly title: "Width";
|
|
338
|
+
readonly description: "Width of the bounding box";
|
|
339
|
+
};
|
|
340
|
+
readonly height: {
|
|
341
|
+
readonly type: "number";
|
|
342
|
+
readonly title: "Height";
|
|
343
|
+
readonly description: "Height of the bounding box";
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
readonly required: readonly ["x", "y", "width", "height"];
|
|
347
|
+
readonly additionalProperties: false;
|
|
348
|
+
};
|
|
349
|
+
readonly keypoints: {
|
|
350
|
+
readonly type: "array";
|
|
351
|
+
readonly items: {
|
|
352
|
+
readonly type: "object";
|
|
353
|
+
readonly properties: {
|
|
354
|
+
readonly x: {
|
|
355
|
+
readonly type: "number";
|
|
356
|
+
readonly title: "X Coordinate";
|
|
357
|
+
readonly description: "X coordinate normalized to [0.0, 1.0]";
|
|
358
|
+
};
|
|
359
|
+
readonly y: {
|
|
360
|
+
readonly type: "number";
|
|
361
|
+
readonly title: "Y Coordinate";
|
|
362
|
+
readonly description: "Y coordinate normalized to [0.0, 1.0]";
|
|
363
|
+
};
|
|
364
|
+
readonly label: {
|
|
365
|
+
readonly type: "string";
|
|
366
|
+
readonly title: "Keypoint Label";
|
|
367
|
+
readonly description: "Label for the keypoint (e.g., 'leftEye', 'rightEye', 'noseTip', etc.)";
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
readonly required: readonly ["x", "y"];
|
|
371
|
+
readonly additionalProperties: false;
|
|
372
|
+
};
|
|
373
|
+
readonly title: "Keypoints";
|
|
374
|
+
readonly description: "Facial keypoints (left eye, right eye, nose tip, mouth, left/right tragion)";
|
|
375
|
+
};
|
|
376
|
+
readonly score: {
|
|
377
|
+
readonly type: "number";
|
|
378
|
+
readonly title: "Confidence Score";
|
|
379
|
+
readonly description: "Confidence score for the face detection";
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
readonly required: readonly ["box", "keypoints", "score"];
|
|
383
|
+
readonly additionalProperties: false;
|
|
384
|
+
};
|
|
385
|
+
}, {
|
|
386
|
+
readonly type: "array";
|
|
387
|
+
readonly items: {
|
|
388
|
+
readonly type: "array";
|
|
389
|
+
readonly items: {
|
|
390
|
+
readonly type: "object";
|
|
391
|
+
readonly properties: {
|
|
392
|
+
readonly box: {
|
|
393
|
+
readonly type: "object";
|
|
394
|
+
readonly properties: {
|
|
395
|
+
readonly x: {
|
|
396
|
+
readonly type: "number";
|
|
397
|
+
readonly title: "X Coordinate";
|
|
398
|
+
readonly description: "X coordinate of the top-left corner";
|
|
399
|
+
};
|
|
400
|
+
readonly y: {
|
|
401
|
+
readonly type: "number";
|
|
402
|
+
readonly title: "Y Coordinate";
|
|
403
|
+
readonly description: "Y coordinate of the top-left corner";
|
|
404
|
+
};
|
|
405
|
+
readonly width: {
|
|
406
|
+
readonly type: "number";
|
|
407
|
+
readonly title: "Width";
|
|
408
|
+
readonly description: "Width of the bounding box";
|
|
409
|
+
};
|
|
410
|
+
readonly height: {
|
|
411
|
+
readonly type: "number";
|
|
412
|
+
readonly title: "Height";
|
|
413
|
+
readonly description: "Height of the bounding box";
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
readonly required: readonly ["x", "y", "width", "height"];
|
|
417
|
+
readonly additionalProperties: false;
|
|
418
|
+
};
|
|
419
|
+
readonly keypoints: {
|
|
420
|
+
readonly type: "array";
|
|
421
|
+
readonly items: {
|
|
422
|
+
readonly type: "object";
|
|
423
|
+
readonly properties: {
|
|
424
|
+
readonly x: {
|
|
425
|
+
readonly type: "number";
|
|
426
|
+
readonly title: "X Coordinate";
|
|
427
|
+
readonly description: "X coordinate normalized to [0.0, 1.0]";
|
|
428
|
+
};
|
|
429
|
+
readonly y: {
|
|
430
|
+
readonly type: "number";
|
|
431
|
+
readonly title: "Y Coordinate";
|
|
432
|
+
readonly description: "Y coordinate normalized to [0.0, 1.0]";
|
|
433
|
+
};
|
|
434
|
+
readonly label: {
|
|
435
|
+
readonly type: "string";
|
|
436
|
+
readonly title: "Keypoint Label";
|
|
437
|
+
readonly description: "Label for the keypoint (e.g., 'leftEye', 'rightEye', 'noseTip', etc.)";
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
readonly required: readonly ["x", "y"];
|
|
441
|
+
readonly additionalProperties: false;
|
|
442
|
+
};
|
|
443
|
+
readonly title: "Keypoints";
|
|
444
|
+
readonly description: "Facial keypoints (left eye, right eye, nose tip, mouth, left/right tragion)";
|
|
445
|
+
};
|
|
446
|
+
readonly score: {
|
|
447
|
+
readonly type: "number";
|
|
448
|
+
readonly title: "Confidence Score";
|
|
449
|
+
readonly description: "Confidence score for the face detection";
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
readonly required: readonly ["box", "keypoints", "score"];
|
|
453
|
+
readonly additionalProperties: false;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
}];
|
|
457
|
+
readonly title: "Face Detections";
|
|
458
|
+
readonly description: "Detected faces with bounding boxes, keypoints, and confidence scores";
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
readonly required: readonly ["faces"];
|
|
462
|
+
readonly additionalProperties: false;
|
|
463
|
+
};
|
|
464
|
+
export type FaceDetectorTaskInput = FromSchema<typeof FaceDetectorInputSchema>;
|
|
465
|
+
export type FaceDetectorTaskOutput = FromSchema<typeof FaceDetectorOutputSchema>;
|
|
466
|
+
export type FaceDetectorTaskExecuteInput = DeReplicateFromSchema<typeof FaceDetectorInputSchema>;
|
|
467
|
+
export type FaceDetectorTaskExecuteOutput = DeReplicateFromSchema<typeof FaceDetectorOutputSchema>;
|
|
468
|
+
/**
|
|
469
|
+
* Detects faces in images using MediaPipe Face Detector.
|
|
470
|
+
* Locates faces and identifies facial keypoints like eyes, nose, and mouth.
|
|
471
|
+
*/
|
|
472
|
+
export declare class FaceDetectorTask extends AiVisionTask<FaceDetectorTaskInput, FaceDetectorTaskOutput, JobQueueTaskConfig> {
|
|
473
|
+
static type: string;
|
|
474
|
+
static category: string;
|
|
475
|
+
static title: string;
|
|
476
|
+
static description: string;
|
|
477
|
+
static inputSchema(): DataPortSchema;
|
|
478
|
+
static outputSchema(): DataPortSchema;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Convenience function to run face detection tasks.
|
|
482
|
+
* Creates and executes a FaceDetectorTask with the provided input.
|
|
483
|
+
* @param input The input parameters for face detection (image, model, and optional configuration)
|
|
484
|
+
* @returns Promise resolving to the detected faces with bounding boxes and keypoints
|
|
485
|
+
*/
|
|
486
|
+
export declare const FaceDetector: (input: FaceDetectorTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
487
|
+
faces: {
|
|
488
|
+
score: number;
|
|
489
|
+
box: {
|
|
490
|
+
width: number;
|
|
491
|
+
height: number;
|
|
492
|
+
x: number;
|
|
493
|
+
y: number;
|
|
494
|
+
};
|
|
495
|
+
keypoints: {
|
|
496
|
+
label?: string | undefined;
|
|
497
|
+
x: number;
|
|
498
|
+
y: number;
|
|
499
|
+
}[];
|
|
500
|
+
}[] | {
|
|
501
|
+
score: number;
|
|
502
|
+
box: {
|
|
503
|
+
width: number;
|
|
504
|
+
height: number;
|
|
505
|
+
x: number;
|
|
506
|
+
y: number;
|
|
507
|
+
};
|
|
508
|
+
keypoints: {
|
|
509
|
+
label?: string | undefined;
|
|
510
|
+
x: number;
|
|
511
|
+
y: number;
|
|
512
|
+
}[];
|
|
513
|
+
}[][];
|
|
514
|
+
}>;
|
|
515
|
+
declare module "@workglow/task-graph" {
|
|
516
|
+
interface Workflow {
|
|
517
|
+
FaceDetector: CreateWorkflow<FaceDetectorTaskInput, FaceDetectorTaskOutput, JobQueueTaskConfig>;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
//# sourceMappingURL=FaceDetectorTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FaceDetectorTask.d.ts","sourceRoot":"","sources":["../../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