@ultralytics/yolo 0.0.27 → 0.0.29
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/index.d.ts +19 -0
- package/dist/index.js +24 -12
- package/package.json +1 -1
- package/pkg/package.json +1 -1
- package/pkg/ultralytics_inference_web.d.ts +11 -11
- package/pkg/ultralytics_inference_web.js +43 -25
- package/pkg/ultralytics_inference_web_bg.wasm +0 -0
- package/pkg/ultralytics_inference_web_bg.wasm.d.ts +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -60,6 +60,14 @@ export interface Results {
|
|
|
60
60
|
* class-filtered pixels. The `masks` overlay is its renderable form.
|
|
61
61
|
*/
|
|
62
62
|
semantic_mask?: Uint16Array;
|
|
63
|
+
/**
|
|
64
|
+
* Depth map as an opaque colorized RGBA image (`width*height*4`), using the
|
|
65
|
+
* colormap from {@link PredictOptions.colormap}; empty for other tasks.
|
|
66
|
+
* Drawable straight onto a canvas via `ImageData`.
|
|
67
|
+
*/
|
|
68
|
+
depth: Uint8Array;
|
|
69
|
+
/** Depth range `[min, max]` in meters over valid pixels, for depth models. */
|
|
70
|
+
depth_range?: [number, number];
|
|
63
71
|
speed: Speed;
|
|
64
72
|
}
|
|
65
73
|
/** Options for {@link YOLO.load}. */
|
|
@@ -105,6 +113,17 @@ export interface PredictOptions {
|
|
|
105
113
|
* detect/segment/pose/obb, and for semantic marks other pixels as background.
|
|
106
114
|
*/
|
|
107
115
|
classes?: number[];
|
|
116
|
+
/**
|
|
117
|
+
* Depth colormap for the `depth` overlay: `"jet"` (default, classic rainbow),
|
|
118
|
+
* `"inferno"`, `"spectral"` (`Spectral_r`, DepthAnything-style), or `"gray"` (raw
|
|
119
|
+
* grayscale). Ignored by every other task.
|
|
120
|
+
*/
|
|
121
|
+
colormap?: "inferno" | "jet" | "spectral" | "gray";
|
|
122
|
+
/**
|
|
123
|
+
* Depth normalization: `"disparity"` (default, inverse depth + percentile clip, the
|
|
124
|
+
* DepthAnything look) or `"metric"` (min/max). Ignored by every other task.
|
|
125
|
+
*/
|
|
126
|
+
depthViz?: "metric" | "disparity";
|
|
108
127
|
}
|
|
109
128
|
/** Options for {@link annotate}. */
|
|
110
129
|
export interface AnnotateOptions {
|
package/dist/index.js
CHANGED
|
@@ -269,11 +269,11 @@ class OrtEngine {
|
|
|
269
269
|
get names() {
|
|
270
270
|
return this.model.names;
|
|
271
271
|
}
|
|
272
|
-
predictDrawable(data, width, height, conf, iou, classes) {
|
|
273
|
-
return this.model.predict_rgba(data, width, height, conf, iou, classes);
|
|
272
|
+
predictDrawable(data, width, height, conf, iou, classes, colormap, depthViz) {
|
|
273
|
+
return this.model.predict_rgba(data, width, height, conf, iou, classes, colormap, depthViz);
|
|
274
274
|
}
|
|
275
|
-
predictEncoded(bytes, conf, iou, classes) {
|
|
276
|
-
return this.model.predict(bytes, conf, iou, classes);
|
|
275
|
+
predictEncoded(bytes, conf, iou, classes, colormap, depthViz) {
|
|
276
|
+
return this.model.predict(bytes, conf, iou, classes, colormap, depthViz);
|
|
277
277
|
}
|
|
278
278
|
free() {
|
|
279
279
|
this.model.free();
|
|
@@ -300,30 +300,30 @@ class LiteRtEngine {
|
|
|
300
300
|
get names() {
|
|
301
301
|
return this.pipeline.names;
|
|
302
302
|
}
|
|
303
|
-
predictDrawable(data, width, height, conf, iou, classes) {
|
|
304
|
-
return this.serialize(() => this.runDrawable(data, width, height, conf, iou, classes));
|
|
303
|
+
predictDrawable(data, width, height, conf, iou, classes, colormap, depthViz) {
|
|
304
|
+
return this.serialize(() => this.runDrawable(data, width, height, conf, iou, classes, colormap, depthViz));
|
|
305
305
|
}
|
|
306
306
|
/** LiteRT takes raw pixels, so decode encoded inputs to RGBA in JS first. */
|
|
307
|
-
predictEncoded(bytes, conf, iou, classes) {
|
|
307
|
+
predictEncoded(bytes, conf, iou, classes, colormap, depthViz) {
|
|
308
308
|
return this.serialize(async () => {
|
|
309
309
|
const bitmap = await createImageBitmap(new Blob([bytes]));
|
|
310
310
|
try {
|
|
311
311
|
const { data, width, height } = toImageData(bitmap);
|
|
312
|
-
return await this.runDrawable(data, width, height, conf, iou, classes);
|
|
312
|
+
return await this.runDrawable(data, width, height, conf, iou, classes, colormap, depthViz);
|
|
313
313
|
}
|
|
314
314
|
finally {
|
|
315
315
|
bitmap.close();
|
|
316
316
|
}
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
|
-
async runDrawable(data, width, height, conf, iou, classes) {
|
|
319
|
+
async runDrawable(data, width, height, conf, iou, classes, colormap, depthViz) {
|
|
320
320
|
const input = this.pipeline.preprocess_rgba(data, width, height);
|
|
321
321
|
const { outputs, shapes, inferenceMs } = await this.backend.run(input, Array.from(this.pipeline.inputShape));
|
|
322
322
|
// Flatten shapes as [rank, dims..., rank, dims...] for the wasm boundary.
|
|
323
323
|
const flatShapes = [];
|
|
324
324
|
for (const s of shapes)
|
|
325
325
|
flatShapes.push(s.length, ...s);
|
|
326
|
-
return this.pipeline.postprocess(outputs, new Uint32Array(flatShapes), inferenceMs, conf, iou, classes);
|
|
326
|
+
return this.pipeline.postprocess(outputs, new Uint32Array(flatShapes), inferenceMs, conf, iou, classes, colormap, depthViz);
|
|
327
327
|
}
|
|
328
328
|
/** Chain `fn` after any in-flight prediction so wasm frame state is never shared. */
|
|
329
329
|
serialize(fn) {
|
|
@@ -422,12 +422,16 @@ export class YOLO {
|
|
|
422
422
|
const conf = options?.conf ?? DEFAULT_CONF;
|
|
423
423
|
const iou = options?.iou ?? DEFAULT_IOU;
|
|
424
424
|
const classes = options?.classes ? new Uint32Array(options.classes) : undefined;
|
|
425
|
+
// Empty means "unset": the wasm side falls back to the Rust `Colormap`/`DepthViz`
|
|
426
|
+
// defaults, so the default lives in exactly one place.
|
|
427
|
+
const colormap = options?.colormap ?? "";
|
|
428
|
+
const depthViz = options?.depthViz ?? "";
|
|
425
429
|
if (isDrawable(image)) {
|
|
426
430
|
const { data, width, height } = toImageData(image);
|
|
427
|
-
return decodeResults(await this.engine.predictDrawable(data, width, height, conf, iou, classes));
|
|
431
|
+
return decodeResults(await this.engine.predictDrawable(data, width, height, conf, iou, classes, colormap, depthViz));
|
|
428
432
|
}
|
|
429
433
|
const bytes = await toEncodedBytes(image);
|
|
430
|
-
return decodeResults(await this.engine.predictEncoded(bytes, conf, iou, classes));
|
|
434
|
+
return decodeResults(await this.engine.predictEncoded(bytes, conf, iou, classes, colormap, depthViz));
|
|
431
435
|
}
|
|
432
436
|
/** Release the underlying wasm model/engine. Call when you are done with it. */
|
|
433
437
|
free() {
|
|
@@ -476,6 +480,14 @@ export async function annotate(canvas, image, results, options) {
|
|
|
476
480
|
get2d(tmp).putImageData(new ImageData(new Uint8ClampedArray(overlay), width, height), 0, 0);
|
|
477
481
|
ctx.drawImage(tmp, 0, 0, width, height);
|
|
478
482
|
}
|
|
483
|
+
// Depth: the engine returns an opaque colorized depth image; draw it over the
|
|
484
|
+
// frame so the canvas shows the depth map.
|
|
485
|
+
const depth = results.depth;
|
|
486
|
+
if (depth && depth.length === width * height * 4) {
|
|
487
|
+
const tmp = makeCanvas(width, height);
|
|
488
|
+
get2d(tmp).putImageData(new ImageData(new Uint8ClampedArray(depth), width, height), 0, 0);
|
|
489
|
+
ctx.drawImage(tmp, 0, 0, width, height);
|
|
490
|
+
}
|
|
479
491
|
const lineWidth = options?.lineWidth ?? Math.max(2, Math.round(width / 320));
|
|
480
492
|
const fontSize = Math.max(12, Math.round(width / 40));
|
|
481
493
|
const font = options?.font ?? `${fontSize}px sans-serif`;
|
package/package.json
CHANGED
package/pkg/package.json
CHANGED
|
@@ -41,7 +41,7 @@ export class YoloModel {
|
|
|
41
41
|
* # Errors
|
|
42
42
|
* Returns a JS error if the image cannot be decoded or inference fails.
|
|
43
43
|
*/
|
|
44
|
-
predict(image: Uint8Array, conf: number, iou: number, classes
|
|
44
|
+
predict(image: Uint8Array, conf: number, iou: number, classes: Uint32Array | null | undefined, colormap: string, depth_viz: string): Promise<any>;
|
|
45
45
|
/**
|
|
46
46
|
* Run inference on raw `RGBA` pixels (e.g. a canvas/webcam `ImageData`).
|
|
47
47
|
*
|
|
@@ -51,7 +51,7 @@ export class YoloModel {
|
|
|
51
51
|
* # Errors
|
|
52
52
|
* Returns a JS error if the buffer size is wrong or inference fails.
|
|
53
53
|
*/
|
|
54
|
-
predict_rgba(rgba: Uint8Array, width: number, height: number, conf: number, iou: number, classes
|
|
54
|
+
predict_rgba(rgba: Uint8Array, width: number, height: number, conf: number, iou: number, classes: Uint32Array | null | undefined, colormap: string, depth_viz: string): Promise<any>;
|
|
55
55
|
/**
|
|
56
56
|
* The active device: `"webgpu"` or `"cpu"` (the fallback when WebGPU is
|
|
57
57
|
* unavailable). Mirrors the native `Device` display.
|
|
@@ -66,7 +66,7 @@ export class YoloModel {
|
|
|
66
66
|
readonly names: any;
|
|
67
67
|
/**
|
|
68
68
|
* The model's task (`"detect"`, `"segment"`, `"pose"`, `"classify"`,
|
|
69
|
-
* `"obb"`, or `"
|
|
69
|
+
* `"obb"`, `"semantic"`, or `"depth"`).
|
|
70
70
|
*/
|
|
71
71
|
readonly task: string;
|
|
72
72
|
}
|
|
@@ -110,7 +110,7 @@ export class YoloPipeline {
|
|
|
110
110
|
* Returns a JS error if called before `preprocess_rgba`, if `shapes` is
|
|
111
111
|
* malformed, or on serialization failure.
|
|
112
112
|
*/
|
|
113
|
-
postprocess(outputs: Float32Array[], shapes: Uint32Array, inference_ms: number, conf: number, iou: number, classes
|
|
113
|
+
postprocess(outputs: Float32Array[], shapes: Uint32Array, inference_ms: number, conf: number, iou: number, classes: Uint32Array | null | undefined, colormap: string, depth_viz: string): any;
|
|
114
114
|
/**
|
|
115
115
|
* Preprocess raw RGBA pixels (e.g. a webcam `ImageData`) into the NCHW f32
|
|
116
116
|
* input tensor an Ultralytics LiteRT/TFLite model expects, normalized to
|
|
@@ -173,21 +173,21 @@ export interface InitOutput {
|
|
|
173
173
|
readonly yolomodel_device: (a: number, b: number) => void;
|
|
174
174
|
readonly yolomodel_load_bytes: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
175
175
|
readonly yolomodel_names: (a: number, b: number) => void;
|
|
176
|
-
readonly yolomodel_predict: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
177
|
-
readonly yolomodel_predict_rgba: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
176
|
+
readonly yolomodel_predict: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number;
|
|
177
|
+
readonly yolomodel_predict_rgba: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => number;
|
|
178
178
|
readonly yolomodel_task: (a: number, b: number) => void;
|
|
179
179
|
readonly yolopipeline_end2end: (a: number) => number;
|
|
180
180
|
readonly yolopipeline_inputShape: (a: number, b: number) => void;
|
|
181
181
|
readonly yolopipeline_names: (a: number, b: number) => void;
|
|
182
182
|
readonly yolopipeline_new: (a: number, b: number, c: number) => void;
|
|
183
|
-
readonly yolopipeline_postprocess: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
183
|
+
readonly yolopipeline_postprocess: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => void;
|
|
184
184
|
readonly yolopipeline_preprocess_rgba: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
185
185
|
readonly yolopipeline_task: (a: number, b: number) => void;
|
|
186
186
|
readonly start: () => void;
|
|
187
|
-
readonly
|
|
188
|
-
readonly
|
|
189
|
-
readonly
|
|
190
|
-
readonly
|
|
187
|
+
readonly __wasm_bindgen_func_elem_1945: (a: number, b: number, c: number, d: number) => void;
|
|
188
|
+
readonly __wasm_bindgen_func_elem_2542: (a: number, b: number, c: number, d: number) => void;
|
|
189
|
+
readonly __wasm_bindgen_func_elem_1945_2: (a: number, b: number, c: number, d: number) => void;
|
|
190
|
+
readonly __wasm_bindgen_func_elem_2566: (a: number, b: number, c: number, d: number) => void;
|
|
191
191
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
192
192
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
193
193
|
readonly __wbindgen_export3: (a: number) => void;
|
|
@@ -114,15 +114,21 @@ export class YoloModel {
|
|
|
114
114
|
* @param {Uint8Array} image
|
|
115
115
|
* @param {number} conf
|
|
116
116
|
* @param {number} iou
|
|
117
|
-
* @param {Uint32Array | null}
|
|
117
|
+
* @param {Uint32Array | null | undefined} classes
|
|
118
|
+
* @param {string} colormap
|
|
119
|
+
* @param {string} depth_viz
|
|
118
120
|
* @returns {Promise<any>}
|
|
119
121
|
*/
|
|
120
|
-
predict(image, conf, iou, classes) {
|
|
122
|
+
predict(image, conf, iou, classes, colormap, depth_viz) {
|
|
121
123
|
const ptr0 = passArray8ToWasm0(image, wasm.__wbindgen_export);
|
|
122
124
|
const len0 = WASM_VECTOR_LEN;
|
|
123
125
|
var ptr1 = isLikeNone(classes) ? 0 : passArray32ToWasm0(classes, wasm.__wbindgen_export);
|
|
124
126
|
var len1 = WASM_VECTOR_LEN;
|
|
125
|
-
const
|
|
127
|
+
const ptr2 = passStringToWasm0(colormap, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
128
|
+
const len2 = WASM_VECTOR_LEN;
|
|
129
|
+
const ptr3 = passStringToWasm0(depth_viz, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
130
|
+
const len3 = WASM_VECTOR_LEN;
|
|
131
|
+
const ret = wasm.yolomodel_predict(this.__wbg_ptr, ptr0, len0, conf, iou, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
126
132
|
return takeObject(ret);
|
|
127
133
|
}
|
|
128
134
|
/**
|
|
@@ -138,20 +144,26 @@ export class YoloModel {
|
|
|
138
144
|
* @param {number} height
|
|
139
145
|
* @param {number} conf
|
|
140
146
|
* @param {number} iou
|
|
141
|
-
* @param {Uint32Array | null}
|
|
147
|
+
* @param {Uint32Array | null | undefined} classes
|
|
148
|
+
* @param {string} colormap
|
|
149
|
+
* @param {string} depth_viz
|
|
142
150
|
* @returns {Promise<any>}
|
|
143
151
|
*/
|
|
144
|
-
predict_rgba(rgba, width, height, conf, iou, classes) {
|
|
152
|
+
predict_rgba(rgba, width, height, conf, iou, classes, colormap, depth_viz) {
|
|
145
153
|
const ptr0 = passArray8ToWasm0(rgba, wasm.__wbindgen_export);
|
|
146
154
|
const len0 = WASM_VECTOR_LEN;
|
|
147
155
|
var ptr1 = isLikeNone(classes) ? 0 : passArray32ToWasm0(classes, wasm.__wbindgen_export);
|
|
148
156
|
var len1 = WASM_VECTOR_LEN;
|
|
149
|
-
const
|
|
157
|
+
const ptr2 = passStringToWasm0(colormap, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
158
|
+
const len2 = WASM_VECTOR_LEN;
|
|
159
|
+
const ptr3 = passStringToWasm0(depth_viz, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
160
|
+
const len3 = WASM_VECTOR_LEN;
|
|
161
|
+
const ret = wasm.yolomodel_predict_rgba(this.__wbg_ptr, ptr0, len0, width, height, conf, iou, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
150
162
|
return takeObject(ret);
|
|
151
163
|
}
|
|
152
164
|
/**
|
|
153
165
|
* The model's task (`"detect"`, `"segment"`, `"pose"`, `"classify"`,
|
|
154
|
-
* `"obb"`, or `"
|
|
166
|
+
* `"obb"`, `"semantic"`, or `"depth"`).
|
|
155
167
|
* @returns {string}
|
|
156
168
|
*/
|
|
157
169
|
get task() {
|
|
@@ -294,10 +306,12 @@ export class YoloPipeline {
|
|
|
294
306
|
* @param {number} inference_ms
|
|
295
307
|
* @param {number} conf
|
|
296
308
|
* @param {number} iou
|
|
297
|
-
* @param {Uint32Array | null}
|
|
309
|
+
* @param {Uint32Array | null | undefined} classes
|
|
310
|
+
* @param {string} colormap
|
|
311
|
+
* @param {string} depth_viz
|
|
298
312
|
* @returns {any}
|
|
299
313
|
*/
|
|
300
|
-
postprocess(outputs, shapes, inference_ms, conf, iou, classes) {
|
|
314
|
+
postprocess(outputs, shapes, inference_ms, conf, iou, classes, colormap, depth_viz) {
|
|
301
315
|
try {
|
|
302
316
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
303
317
|
const ptr0 = passArrayJsValueToWasm0(outputs, wasm.__wbindgen_export);
|
|
@@ -306,7 +320,11 @@ export class YoloPipeline {
|
|
|
306
320
|
const len1 = WASM_VECTOR_LEN;
|
|
307
321
|
var ptr2 = isLikeNone(classes) ? 0 : passArray32ToWasm0(classes, wasm.__wbindgen_export);
|
|
308
322
|
var len2 = WASM_VECTOR_LEN;
|
|
309
|
-
|
|
323
|
+
const ptr3 = passStringToWasm0(colormap, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
324
|
+
const len3 = WASM_VECTOR_LEN;
|
|
325
|
+
const ptr4 = passStringToWasm0(depth_viz, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
326
|
+
const len4 = WASM_VECTOR_LEN;
|
|
327
|
+
wasm.yolopipeline_postprocess(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, inference_ms, conf, iou, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
310
328
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
311
329
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
312
330
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -696,7 +714,7 @@ function __wbg_get_imports() {
|
|
|
696
714
|
const a = state0.a;
|
|
697
715
|
state0.a = 0;
|
|
698
716
|
try {
|
|
699
|
-
return
|
|
717
|
+
return __wasm_bindgen_func_elem_2566(a, state0.b, arg0, arg1);
|
|
700
718
|
} finally {
|
|
701
719
|
state0.a = a;
|
|
702
720
|
}
|
|
@@ -886,18 +904,18 @@ function __wbg_get_imports() {
|
|
|
886
904
|
return addHeapObject(ret);
|
|
887
905
|
},
|
|
888
906
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
889
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
890
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
907
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 690, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
908
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1945);
|
|
891
909
|
return addHeapObject(ret);
|
|
892
910
|
},
|
|
893
911
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
894
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
895
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
912
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 910, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
913
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2542);
|
|
896
914
|
return addHeapObject(ret);
|
|
897
915
|
},
|
|
898
916
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
899
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("boolean")], shim_idx:
|
|
900
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
917
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("boolean")], shim_idx: 690, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
918
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1945_2);
|
|
901
919
|
return addHeapObject(ret);
|
|
902
920
|
},
|
|
903
921
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -984,10 +1002,10 @@ function __wbg_get_imports() {
|
|
|
984
1002
|
};
|
|
985
1003
|
}
|
|
986
1004
|
|
|
987
|
-
function
|
|
1005
|
+
function __wasm_bindgen_func_elem_1945(arg0, arg1, arg2) {
|
|
988
1006
|
try {
|
|
989
1007
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
990
|
-
wasm.
|
|
1008
|
+
wasm.__wasm_bindgen_func_elem_1945(retptr, arg0, arg1, addHeapObject(arg2));
|
|
991
1009
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
992
1010
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
993
1011
|
if (r1) {
|
|
@@ -998,10 +1016,10 @@ function __wasm_bindgen_func_elem_1971(arg0, arg1, arg2) {
|
|
|
998
1016
|
}
|
|
999
1017
|
}
|
|
1000
1018
|
|
|
1001
|
-
function
|
|
1019
|
+
function __wasm_bindgen_func_elem_2542(arg0, arg1, arg2) {
|
|
1002
1020
|
try {
|
|
1003
1021
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1004
|
-
wasm.
|
|
1022
|
+
wasm.__wasm_bindgen_func_elem_2542(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1005
1023
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1006
1024
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1007
1025
|
if (r1) {
|
|
@@ -1012,10 +1030,10 @@ function __wasm_bindgen_func_elem_2580(arg0, arg1, arg2) {
|
|
|
1012
1030
|
}
|
|
1013
1031
|
}
|
|
1014
1032
|
|
|
1015
|
-
function
|
|
1033
|
+
function __wasm_bindgen_func_elem_1945_2(arg0, arg1, arg2) {
|
|
1016
1034
|
try {
|
|
1017
1035
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1018
|
-
wasm.
|
|
1036
|
+
wasm.__wasm_bindgen_func_elem_1945_2(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1019
1037
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1020
1038
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1021
1039
|
if (r1) {
|
|
@@ -1026,8 +1044,8 @@ function __wasm_bindgen_func_elem_1971_2(arg0, arg1, arg2) {
|
|
|
1026
1044
|
}
|
|
1027
1045
|
}
|
|
1028
1046
|
|
|
1029
|
-
function
|
|
1030
|
-
wasm.
|
|
1047
|
+
function __wasm_bindgen_func_elem_2566(arg0, arg1, arg2, arg3) {
|
|
1048
|
+
wasm.__wasm_bindgen_func_elem_2566(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1031
1049
|
}
|
|
1032
1050
|
|
|
1033
1051
|
|
|
Binary file
|
|
@@ -7,21 +7,21 @@ export const pose_palette: (a: number) => void;
|
|
|
7
7
|
export const yolomodel_device: (a: number, b: number) => void;
|
|
8
8
|
export const yolomodel_load_bytes: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
9
9
|
export const yolomodel_names: (a: number, b: number) => void;
|
|
10
|
-
export const yolomodel_predict: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
11
|
-
export const yolomodel_predict_rgba: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
10
|
+
export const yolomodel_predict: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number;
|
|
11
|
+
export const yolomodel_predict_rgba: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => number;
|
|
12
12
|
export const yolomodel_task: (a: number, b: number) => void;
|
|
13
13
|
export const yolopipeline_end2end: (a: number) => number;
|
|
14
14
|
export const yolopipeline_inputShape: (a: number, b: number) => void;
|
|
15
15
|
export const yolopipeline_names: (a: number, b: number) => void;
|
|
16
16
|
export const yolopipeline_new: (a: number, b: number, c: number) => void;
|
|
17
|
-
export const yolopipeline_postprocess: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
17
|
+
export const yolopipeline_postprocess: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => void;
|
|
18
18
|
export const yolopipeline_preprocess_rgba: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
19
19
|
export const yolopipeline_task: (a: number, b: number) => void;
|
|
20
20
|
export const start: () => void;
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
21
|
+
export const __wasm_bindgen_func_elem_1945: (a: number, b: number, c: number, d: number) => void;
|
|
22
|
+
export const __wasm_bindgen_func_elem_2542: (a: number, b: number, c: number, d: number) => void;
|
|
23
|
+
export const __wasm_bindgen_func_elem_1945_2: (a: number, b: number, c: number, d: number) => void;
|
|
24
|
+
export const __wasm_bindgen_func_elem_2566: (a: number, b: number, c: number, d: number) => void;
|
|
25
25
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
26
26
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
27
27
|
export const __wbindgen_export3: (a: number) => void;
|