@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,637 @@
|
|
|
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 PoseLandmarkerInputSchema: {
|
|
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 numPoses: {
|
|
292
|
+
readonly type: "number";
|
|
293
|
+
readonly minimum: 1;
|
|
294
|
+
readonly maximum: 10;
|
|
295
|
+
readonly default: 1;
|
|
296
|
+
readonly title: "Number of Poses";
|
|
297
|
+
readonly description: "The maximum number of poses to detect";
|
|
298
|
+
readonly "x-ui-group": "Configuration";
|
|
299
|
+
};
|
|
300
|
+
readonly minPoseDetectionConfidence: {
|
|
301
|
+
readonly type: "number";
|
|
302
|
+
readonly minimum: 0;
|
|
303
|
+
readonly maximum: 1;
|
|
304
|
+
readonly default: 0.5;
|
|
305
|
+
readonly title: "Min Pose Detection Confidence";
|
|
306
|
+
readonly description: "Minimum confidence score for pose detection";
|
|
307
|
+
readonly "x-ui-group": "Configuration";
|
|
308
|
+
};
|
|
309
|
+
readonly minPosePresenceConfidence: {
|
|
310
|
+
readonly type: "number";
|
|
311
|
+
readonly minimum: 0;
|
|
312
|
+
readonly maximum: 1;
|
|
313
|
+
readonly default: 0.5;
|
|
314
|
+
readonly title: "Min Pose Presence Confidence";
|
|
315
|
+
readonly description: "Minimum confidence score for pose 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 pose tracking";
|
|
325
|
+
readonly "x-ui-group": "Configuration";
|
|
326
|
+
};
|
|
327
|
+
readonly outputSegmentationMasks: {
|
|
328
|
+
readonly type: "boolean";
|
|
329
|
+
readonly default: false;
|
|
330
|
+
readonly title: "Output Segmentation Masks";
|
|
331
|
+
readonly description: "Whether to output segmentation masks for detected poses";
|
|
332
|
+
readonly "x-ui-group": "Configuration";
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
readonly required: readonly ["image", "model"];
|
|
336
|
+
readonly additionalProperties: false;
|
|
337
|
+
};
|
|
338
|
+
export declare const PoseLandmarkerOutputSchema: {
|
|
339
|
+
readonly type: "object";
|
|
340
|
+
readonly properties: {
|
|
341
|
+
readonly poses: {
|
|
342
|
+
readonly oneOf: readonly [{
|
|
343
|
+
readonly type: "array";
|
|
344
|
+
readonly items: {
|
|
345
|
+
readonly type: "object";
|
|
346
|
+
readonly properties: {
|
|
347
|
+
readonly landmarks: {
|
|
348
|
+
readonly type: "array";
|
|
349
|
+
readonly items: {
|
|
350
|
+
readonly type: "object";
|
|
351
|
+
readonly properties: {
|
|
352
|
+
readonly x: {
|
|
353
|
+
readonly type: "number";
|
|
354
|
+
readonly title: "X Coordinate";
|
|
355
|
+
readonly description: "X coordinate normalized to [0.0, 1.0]";
|
|
356
|
+
};
|
|
357
|
+
readonly y: {
|
|
358
|
+
readonly type: "number";
|
|
359
|
+
readonly title: "Y Coordinate";
|
|
360
|
+
readonly description: "Y coordinate normalized to [0.0, 1.0]";
|
|
361
|
+
};
|
|
362
|
+
readonly z: {
|
|
363
|
+
readonly type: "number";
|
|
364
|
+
readonly title: "Z Coordinate";
|
|
365
|
+
readonly description: "Z coordinate (depth)";
|
|
366
|
+
};
|
|
367
|
+
readonly visibility: {
|
|
368
|
+
readonly type: "number";
|
|
369
|
+
readonly title: "Visibility";
|
|
370
|
+
readonly description: "Likelihood of the landmark being visible within the image";
|
|
371
|
+
};
|
|
372
|
+
readonly presence: {
|
|
373
|
+
readonly type: "number";
|
|
374
|
+
readonly title: "Presence";
|
|
375
|
+
readonly description: "Likelihood of the landmark being present in the image";
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
readonly required: readonly ["x", "y", "z"];
|
|
379
|
+
readonly additionalProperties: false;
|
|
380
|
+
};
|
|
381
|
+
readonly title: "Landmarks";
|
|
382
|
+
readonly description: "33 pose landmarks in image coordinates";
|
|
383
|
+
};
|
|
384
|
+
readonly worldLandmarks: {
|
|
385
|
+
readonly type: "array";
|
|
386
|
+
readonly items: {
|
|
387
|
+
readonly type: "object";
|
|
388
|
+
readonly properties: {
|
|
389
|
+
readonly x: {
|
|
390
|
+
readonly type: "number";
|
|
391
|
+
readonly title: "X Coordinate";
|
|
392
|
+
readonly description: "X coordinate normalized to [0.0, 1.0]";
|
|
393
|
+
};
|
|
394
|
+
readonly y: {
|
|
395
|
+
readonly type: "number";
|
|
396
|
+
readonly title: "Y Coordinate";
|
|
397
|
+
readonly description: "Y coordinate normalized to [0.0, 1.0]";
|
|
398
|
+
};
|
|
399
|
+
readonly z: {
|
|
400
|
+
readonly type: "number";
|
|
401
|
+
readonly title: "Z Coordinate";
|
|
402
|
+
readonly description: "Z coordinate (depth)";
|
|
403
|
+
};
|
|
404
|
+
readonly visibility: {
|
|
405
|
+
readonly type: "number";
|
|
406
|
+
readonly title: "Visibility";
|
|
407
|
+
readonly description: "Likelihood of the landmark being visible within the image";
|
|
408
|
+
};
|
|
409
|
+
readonly presence: {
|
|
410
|
+
readonly type: "number";
|
|
411
|
+
readonly title: "Presence";
|
|
412
|
+
readonly description: "Likelihood of the landmark being present in the image";
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
readonly required: readonly ["x", "y", "z"];
|
|
416
|
+
readonly additionalProperties: false;
|
|
417
|
+
};
|
|
418
|
+
readonly title: "World Landmarks";
|
|
419
|
+
readonly description: "33 pose landmarks in 3D world coordinates (meters)";
|
|
420
|
+
};
|
|
421
|
+
readonly segmentationMask: {
|
|
422
|
+
readonly type: "object";
|
|
423
|
+
readonly properties: {
|
|
424
|
+
readonly data: {
|
|
425
|
+
readonly type: "object";
|
|
426
|
+
readonly title: "Mask Data";
|
|
427
|
+
readonly description: "Canvas or image data containing the segmentation mask";
|
|
428
|
+
};
|
|
429
|
+
readonly width: {
|
|
430
|
+
readonly type: "number";
|
|
431
|
+
readonly title: "Width";
|
|
432
|
+
readonly description: "Width of the segmentation mask";
|
|
433
|
+
};
|
|
434
|
+
readonly height: {
|
|
435
|
+
readonly type: "number";
|
|
436
|
+
readonly title: "Height";
|
|
437
|
+
readonly description: "Height of the segmentation mask";
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
readonly required: readonly ["data", "width", "height"];
|
|
441
|
+
readonly additionalProperties: false;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
readonly required: readonly ["landmarks", "worldLandmarks"];
|
|
445
|
+
readonly additionalProperties: false;
|
|
446
|
+
};
|
|
447
|
+
}, {
|
|
448
|
+
readonly type: "array";
|
|
449
|
+
readonly items: {
|
|
450
|
+
readonly type: "array";
|
|
451
|
+
readonly items: {
|
|
452
|
+
readonly type: "object";
|
|
453
|
+
readonly properties: {
|
|
454
|
+
readonly landmarks: {
|
|
455
|
+
readonly type: "array";
|
|
456
|
+
readonly items: {
|
|
457
|
+
readonly type: "object";
|
|
458
|
+
readonly properties: {
|
|
459
|
+
readonly x: {
|
|
460
|
+
readonly type: "number";
|
|
461
|
+
readonly title: "X Coordinate";
|
|
462
|
+
readonly description: "X coordinate normalized to [0.0, 1.0]";
|
|
463
|
+
};
|
|
464
|
+
readonly y: {
|
|
465
|
+
readonly type: "number";
|
|
466
|
+
readonly title: "Y Coordinate";
|
|
467
|
+
readonly description: "Y coordinate normalized to [0.0, 1.0]";
|
|
468
|
+
};
|
|
469
|
+
readonly z: {
|
|
470
|
+
readonly type: "number";
|
|
471
|
+
readonly title: "Z Coordinate";
|
|
472
|
+
readonly description: "Z coordinate (depth)";
|
|
473
|
+
};
|
|
474
|
+
readonly visibility: {
|
|
475
|
+
readonly type: "number";
|
|
476
|
+
readonly title: "Visibility";
|
|
477
|
+
readonly description: "Likelihood of the landmark being visible within the image";
|
|
478
|
+
};
|
|
479
|
+
readonly presence: {
|
|
480
|
+
readonly type: "number";
|
|
481
|
+
readonly title: "Presence";
|
|
482
|
+
readonly description: "Likelihood of the landmark being present in the image";
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
readonly required: readonly ["x", "y", "z"];
|
|
486
|
+
readonly additionalProperties: false;
|
|
487
|
+
};
|
|
488
|
+
readonly title: "Landmarks";
|
|
489
|
+
readonly description: "33 pose landmarks in image coordinates";
|
|
490
|
+
};
|
|
491
|
+
readonly worldLandmarks: {
|
|
492
|
+
readonly type: "array";
|
|
493
|
+
readonly items: {
|
|
494
|
+
readonly type: "object";
|
|
495
|
+
readonly properties: {
|
|
496
|
+
readonly x: {
|
|
497
|
+
readonly type: "number";
|
|
498
|
+
readonly title: "X Coordinate";
|
|
499
|
+
readonly description: "X coordinate normalized to [0.0, 1.0]";
|
|
500
|
+
};
|
|
501
|
+
readonly y: {
|
|
502
|
+
readonly type: "number";
|
|
503
|
+
readonly title: "Y Coordinate";
|
|
504
|
+
readonly description: "Y coordinate normalized to [0.0, 1.0]";
|
|
505
|
+
};
|
|
506
|
+
readonly z: {
|
|
507
|
+
readonly type: "number";
|
|
508
|
+
readonly title: "Z Coordinate";
|
|
509
|
+
readonly description: "Z coordinate (depth)";
|
|
510
|
+
};
|
|
511
|
+
readonly visibility: {
|
|
512
|
+
readonly type: "number";
|
|
513
|
+
readonly title: "Visibility";
|
|
514
|
+
readonly description: "Likelihood of the landmark being visible within the image";
|
|
515
|
+
};
|
|
516
|
+
readonly presence: {
|
|
517
|
+
readonly type: "number";
|
|
518
|
+
readonly title: "Presence";
|
|
519
|
+
readonly description: "Likelihood of the landmark being present in the image";
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
readonly required: readonly ["x", "y", "z"];
|
|
523
|
+
readonly additionalProperties: false;
|
|
524
|
+
};
|
|
525
|
+
readonly title: "World Landmarks";
|
|
526
|
+
readonly description: "33 pose landmarks in 3D world coordinates (meters)";
|
|
527
|
+
};
|
|
528
|
+
readonly segmentationMask: {
|
|
529
|
+
readonly type: "object";
|
|
530
|
+
readonly properties: {
|
|
531
|
+
readonly data: {
|
|
532
|
+
readonly type: "object";
|
|
533
|
+
readonly title: "Mask Data";
|
|
534
|
+
readonly description: "Canvas or image data containing the segmentation mask";
|
|
535
|
+
};
|
|
536
|
+
readonly width: {
|
|
537
|
+
readonly type: "number";
|
|
538
|
+
readonly title: "Width";
|
|
539
|
+
readonly description: "Width of the segmentation mask";
|
|
540
|
+
};
|
|
541
|
+
readonly height: {
|
|
542
|
+
readonly type: "number";
|
|
543
|
+
readonly title: "Height";
|
|
544
|
+
readonly description: "Height of the segmentation mask";
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
readonly required: readonly ["data", "width", "height"];
|
|
548
|
+
readonly additionalProperties: false;
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
readonly required: readonly ["landmarks", "worldLandmarks"];
|
|
552
|
+
readonly additionalProperties: false;
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
}];
|
|
556
|
+
readonly title: "Pose Detections";
|
|
557
|
+
readonly description: "Detected poses with landmarks and optional segmentation masks";
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
readonly required: readonly ["poses"];
|
|
561
|
+
readonly additionalProperties: false;
|
|
562
|
+
};
|
|
563
|
+
export type PoseLandmarkerTaskInput = FromSchema<typeof PoseLandmarkerInputSchema>;
|
|
564
|
+
export type PoseLandmarkerTaskOutput = FromSchema<typeof PoseLandmarkerOutputSchema>;
|
|
565
|
+
export type PoseLandmarkerTaskExecuteInput = DeReplicateFromSchema<typeof PoseLandmarkerInputSchema>;
|
|
566
|
+
export type PoseLandmarkerTaskExecuteOutput = DeReplicateFromSchema<typeof PoseLandmarkerOutputSchema>;
|
|
567
|
+
/**
|
|
568
|
+
* Detects pose landmarks in images using MediaPipe Pose Landmarker.
|
|
569
|
+
* Identifies 33 body landmarks for pose estimation and optional segmentation.
|
|
570
|
+
*/
|
|
571
|
+
export declare class PoseLandmarkerTask extends AiVisionTask<PoseLandmarkerTaskInput, PoseLandmarkerTaskOutput, JobQueueTaskConfig> {
|
|
572
|
+
static type: string;
|
|
573
|
+
static category: string;
|
|
574
|
+
static title: string;
|
|
575
|
+
static description: string;
|
|
576
|
+
static inputSchema(): DataPortSchema;
|
|
577
|
+
static outputSchema(): DataPortSchema;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Convenience function to run pose landmark detection tasks.
|
|
581
|
+
* Creates and executes a PoseLandmarkerTask with the provided input.
|
|
582
|
+
* @param input The input parameters for pose landmark detection (image, model, and optional configuration)
|
|
583
|
+
* @returns Promise resolving to the detected pose landmarks and optional segmentation masks
|
|
584
|
+
*/
|
|
585
|
+
export declare const PoseLandmarker: (input: PoseLandmarkerTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
586
|
+
poses: {
|
|
587
|
+
segmentationMask?: {
|
|
588
|
+
data: {
|
|
589
|
+
[x: string]: unknown;
|
|
590
|
+
};
|
|
591
|
+
width: number;
|
|
592
|
+
height: number;
|
|
593
|
+
} | undefined;
|
|
594
|
+
landmarks: {
|
|
595
|
+
visibility?: number | undefined;
|
|
596
|
+
presence?: number | undefined;
|
|
597
|
+
x: number;
|
|
598
|
+
y: number;
|
|
599
|
+
z: number;
|
|
600
|
+
}[];
|
|
601
|
+
worldLandmarks: {
|
|
602
|
+
visibility?: number | undefined;
|
|
603
|
+
presence?: number | undefined;
|
|
604
|
+
x: number;
|
|
605
|
+
y: number;
|
|
606
|
+
z: number;
|
|
607
|
+
}[];
|
|
608
|
+
}[] | {
|
|
609
|
+
segmentationMask?: {
|
|
610
|
+
data: {
|
|
611
|
+
[x: string]: unknown;
|
|
612
|
+
};
|
|
613
|
+
width: number;
|
|
614
|
+
height: number;
|
|
615
|
+
} | undefined;
|
|
616
|
+
landmarks: {
|
|
617
|
+
visibility?: number | undefined;
|
|
618
|
+
presence?: number | undefined;
|
|
619
|
+
x: number;
|
|
620
|
+
y: number;
|
|
621
|
+
z: number;
|
|
622
|
+
}[];
|
|
623
|
+
worldLandmarks: {
|
|
624
|
+
visibility?: number | undefined;
|
|
625
|
+
presence?: number | undefined;
|
|
626
|
+
x: number;
|
|
627
|
+
y: number;
|
|
628
|
+
z: number;
|
|
629
|
+
}[];
|
|
630
|
+
}[][];
|
|
631
|
+
}>;
|
|
632
|
+
declare module "@workglow/task-graph" {
|
|
633
|
+
interface Workflow {
|
|
634
|
+
PoseLandmarker: CreateWorkflow<PoseLandmarkerTaskInput, PoseLandmarkerTaskOutput, JobQueueTaskConfig>;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
//# sourceMappingURL=PoseLandmarkerTask.d.ts.map
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