@ultralytics/yolo 0.0.31 → 0.0.32
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/README.md +15 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -1
- package/package.json +2 -2
- package/pkg/package.json +1 -1
- package/pkg/snippets/{ort-web-c7b42e3e9fb58316 → ort-web-74be4d1a4544c8bc}/_loader.js +13 -13
- package/pkg/snippets/{ort-web-c7b42e3e9fb58316 → ort-web-74be4d1a4544c8bc}/_telemetry.js +8 -4
- package/pkg/ultralytics_inference_web.d.ts +20 -4
- package/pkg/ultralytics_inference_web.js +53 -33
- package/pkg/ultralytics_inference_web_bg.wasm +0 -0
- package/pkg/ultralytics_inference_web_bg.wasm.d.ts +5 -4
package/README.md
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
Run [Ultralytics](https://www.ultralytics.com/) YOLO models directly in the browser,
|
|
18
18
|
with no server and no Python. It runs on **WebGPU** (with an automatic CPU/wasm
|
|
19
|
-
fallback) and covers detection, segmentation, pose, classification, OBB,
|
|
20
|
-
semantic segmentation, behind a small TypeScript API with a built-in
|
|
19
|
+
fallback) and covers detection, segmentation, pose, classification, OBB,
|
|
20
|
+
semantic segmentation, and depth estimation, behind a small TypeScript API with a built-in
|
|
21
21
|
`annotate()` that draws results straight to a canvas.
|
|
22
22
|
|
|
23
23
|
```ts
|
|
@@ -107,8 +107,14 @@ async function frame() {
|
|
|
107
107
|
|
|
108
108
|
Runs [Ultralytics YOLOv8](https://docs.ultralytics.com/models/yolov8),
|
|
109
109
|
[Ultralytics YOLO11](https://docs.ultralytics.com/models/yolo11), and
|
|
110
|
-
[Ultralytics YOLO26](https://docs.ultralytics.com/models/yolo26) ONNX exports for
|
|
111
|
-
|
|
110
|
+
[Ultralytics YOLO26](https://docs.ultralytics.com/models/yolo26) ONNX exports for
|
|
111
|
+
[detection](https://docs.ultralytics.com/tasks/detect),
|
|
112
|
+
[segmentation](https://docs.ultralytics.com/tasks/segment),
|
|
113
|
+
[pose](https://docs.ultralytics.com/tasks/pose),
|
|
114
|
+
[OBB](https://docs.ultralytics.com/tasks/obb),
|
|
115
|
+
[classification](https://docs.ultralytics.com/tasks/classify),
|
|
116
|
+
[semantic segmentation](https://docs.ultralytics.com/tasks/semantic), and
|
|
117
|
+
[depth estimation](https://docs.ultralytics.com/tasks/depth).
|
|
112
118
|
|
|
113
119
|
Pass a bare ONNX name and it is **auto-downloaded** from the
|
|
114
120
|
[Ultralytics assets release](https://github.com/ultralytics/assets/releases) (the
|
|
@@ -119,8 +125,9 @@ await YOLO.load("yolo26n.onnx"); // auto-downloads from the release: .../downloa
|
|
|
119
125
|
```
|
|
120
126
|
|
|
121
127
|
Auto-download covers **Ultralytics YOLO26**, **Ultralytics YOLO11**, and **Ultralytics YOLOv8** in sizes `n/s/m/l/x`
|
|
122
|
-
with task suffixes `-seg`, `-pose`, `-cls`, `-obb`,
|
|
123
|
-
only
|
|
128
|
+
with task suffixes `-seg`, `-pose`, `-cls`, `-obb`, `-sem` (semantic), and `-depth` (depth
|
|
129
|
+
estimation) — the last two Ultralytics YOLO26 only. A value containing a `/` or a scheme is
|
|
130
|
+
used as a URL/path as-is.
|
|
124
131
|
|
|
125
132
|
> **CORS note:** GitHub release assets do not send `Access-Control-Allow-Origin`,
|
|
126
133
|
> so a browser cannot fetch them cross-origin. Host the `.onnx` **same-origin**
|
|
@@ -130,10 +137,8 @@ only). A value containing a `/` or a scheme is used as a URL/path as-is.
|
|
|
130
137
|
|
|
131
138
|
## 📐 Results Shape
|
|
132
139
|
|
|
133
|
-
`predict()` resolves to a `Results` object
|
|
134
|
-
`Results
|
|
135
|
-
|
|
136
|
-
Field names match the Rust/Ultralytics `Results` API 1-1:
|
|
140
|
+
`predict()` resolves to a `Results` object whose field names match the
|
|
141
|
+
Rust/Ultralytics `Results` API 1-1:
|
|
137
142
|
|
|
138
143
|
| Field | Type | Tasks |
|
|
139
144
|
| ------------------ | -------------------------------------------------------------------- | --------------------- |
|
package/dist/index.d.ts
CHANGED
|
@@ -167,7 +167,7 @@ export declare class YOLO {
|
|
|
167
167
|
/** Load the LiteRT (`.tflite`) backend. Metadata (task, class names, `imgsz`)
|
|
168
168
|
* is read from the single `.tflite` file, the same as the `.onnx` path. */
|
|
169
169
|
private static loadLiteRt;
|
|
170
|
-
/** The model's task (`detect`, `segment`, `pose`, `classify`, `obb`, `semantic`). */
|
|
170
|
+
/** The model's task (`detect`, `segment`, `pose`, `classify`, `obb`, `semantic`, `depth`). */
|
|
171
171
|
get task(): string;
|
|
172
172
|
/** The active device that ran inference (`"webgpu"`, `"wasm"`, or `"cpu"`). */
|
|
173
173
|
get device(): string;
|
package/dist/index.js
CHANGED
|
@@ -205,6 +205,11 @@ class LiteRtBackend {
|
|
|
205
205
|
this.model = model;
|
|
206
206
|
this.device = device;
|
|
207
207
|
}
|
|
208
|
+
/** Input shape the compiled model actually expects, when LiteRT reports it. */
|
|
209
|
+
get inputShape() {
|
|
210
|
+
const shape = this.model.getInputDetails?.()[0]?.shape;
|
|
211
|
+
return shape && Array.from(shape);
|
|
212
|
+
}
|
|
208
213
|
/** Import LiteRT.js, init its wasm, and compile the model, falling back from
|
|
209
214
|
* WebGPU to wasm (CPU) if the GPU accelerator cannot compile. */
|
|
210
215
|
static async load(tflite, wasmUrl, accelerator) {
|
|
@@ -393,9 +398,16 @@ export class YOLO {
|
|
|
393
398
|
console.warn("LiteRT: this is an end2end (NMS-free) model; its WebGPU delegate can't run the int64 ops, so it runs on CPU/wasm. Re-export with `end2end=False` for WebGPU.");
|
|
394
399
|
}
|
|
395
400
|
const backend = await LiteRtBackend.load(tflite, wasmUrl, accelerator);
|
|
401
|
+
// The compiled model outranks the metadata: `pipeline.inputShape` is what sizes the
|
|
402
|
+
// input tensor below, so a stale `imgsz` would build one the model rejects.
|
|
403
|
+
// Signed on purpose: the engine reports a dynamic axis as a negative number, and wasm
|
|
404
|
+
// rejects those rather than reading one as a huge unsigned size.
|
|
405
|
+
const shape = backend.inputShape;
|
|
406
|
+
if (shape)
|
|
407
|
+
pipeline.setInputShape(new Int32Array(shape));
|
|
396
408
|
return new YOLO(new LiteRtEngine(pipeline, backend));
|
|
397
409
|
}
|
|
398
|
-
/** The model's task (`detect`, `segment`, `pose`, `classify`, `obb`, `semantic`). */
|
|
410
|
+
/** The model's task (`detect`, `segment`, `pose`, `classify`, `obb`, `semantic`, `depth`). */
|
|
399
411
|
get task() {
|
|
400
412
|
return this.engine.task;
|
|
401
413
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultralytics/yolo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
4
4
|
"description": "Run Ultralytics YOLO models in the browser on WebGPU (WebAssembly, ONNX Runtime Web via ort-web).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@litertjs/core": "^2.5.
|
|
69
|
+
"@litertjs/core": "^2.5.3",
|
|
70
70
|
"typescript": "^5.4.0"
|
|
71
71
|
}
|
|
72
72
|
}
|
package/pkg/package.json
CHANGED
|
@@ -14,7 +14,7 @@ const FEATURES_ALL = FEATURES_WEBGL | FEATURES_WEBGPU;
|
|
|
14
14
|
* @property {Record<'main' | 'wrapper' | 'binary', string> | null} integrities
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const DEFAULT_DIST_BASE = 'https://cdn.pyke.io/0/pyke:ort-rs/web@1.
|
|
17
|
+
const DEFAULT_DIST_BASE = 'https://cdn.pyke.io/0/pyke:ort-rs/web@1.27.0/';
|
|
18
18
|
|
|
19
19
|
/** @type {Record<number, Dist>} */
|
|
20
20
|
const DEFAULT_DIST = {
|
|
@@ -23,9 +23,9 @@ const DEFAULT_DIST = {
|
|
|
23
23
|
scriptName: 'ort.wasm.min.js',
|
|
24
24
|
binaryName: 'ort-wasm-simd-threaded.wasm',
|
|
25
25
|
integrities: {
|
|
26
|
-
main: '
|
|
27
|
-
wrapper: '/
|
|
28
|
-
binary: '
|
|
26
|
+
main: 'tfUvHgp9/GSRWo8HC27M+k72kO9DXscoOHJVFMMo17my+b613YTj9vpom0og1Cwe',
|
|
27
|
+
wrapper: 'QwBuCPwkZ1hn48SSG/YP1rd25hKczDIg103x2AtlotnwUzVF919IZz1uRnLp9IOw',
|
|
28
|
+
binary: 'ZBv2MGQL3EUHCYbVm9I410F+QZX7GWFj9a556jISGqlE2TiRaeEWLu6jxd8ZYMGC'
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
[FEATURES_WEBGL]: {
|
|
@@ -33,9 +33,9 @@ const DEFAULT_DIST = {
|
|
|
33
33
|
scriptName: 'ort.webgl.min.js',
|
|
34
34
|
binaryName: 'ort-wasm-simd-threaded.wasm',
|
|
35
35
|
integrities: {
|
|
36
|
-
main: '
|
|
37
|
-
wrapper: '/
|
|
38
|
-
binary: '
|
|
36
|
+
main: 'LXzScLvNEhm413eMpAqQVWHzPW+FRbGjfJ+u33IO6bHCV8rfBfd2eGdAwpKAdvIQ',
|
|
37
|
+
wrapper: 'QwBuCPwkZ1hn48SSG/YP1rd25hKczDIg103x2AtlotnwUzVF919IZz1uRnLp9IOw',
|
|
38
|
+
binary: 'ZBv2MGQL3EUHCYbVm9I410F+QZX7GWFj9a556jISGqlE2TiRaeEWLu6jxd8ZYMGC'
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
[FEATURES_WEBGPU]: {
|
|
@@ -43,9 +43,9 @@ const DEFAULT_DIST = {
|
|
|
43
43
|
scriptName: 'ort.webgpu.min.js',
|
|
44
44
|
binaryName: 'ort-wasm-simd-threaded.jsep.wasm',
|
|
45
45
|
integrities: {
|
|
46
|
-
main: '
|
|
47
|
-
wrapper: '
|
|
48
|
-
binary: '
|
|
46
|
+
main: 'vRrDQHAbl9gWevu3ErZ/gXohErGlZmJy4wyowACQUyuTXCTWAgX8fpBBg70OGWVv',
|
|
47
|
+
wrapper: 'UnMnZc4hekoMygc89hIyX3b7KuuNwqJTMOZJdeAQjuvGC/WVdTT+w+HmwWCANfli',
|
|
48
|
+
binary: 'NRkAqXy32zY6LuDA4go2FTF1Cy85jvEfSu6DPTevOmSu441+7WhVZocyqdhT1kNB'
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
[FEATURES_ALL]: {
|
|
@@ -53,9 +53,9 @@ const DEFAULT_DIST = {
|
|
|
53
53
|
scriptName: 'ort.all.min.js',
|
|
54
54
|
binaryName: 'ort-wasm-simd-threaded.jsep.wasm',
|
|
55
55
|
integrities: {
|
|
56
|
-
main: '
|
|
57
|
-
wrapper: '
|
|
58
|
-
binary: '
|
|
56
|
+
main: 'PbfZfzjTjLQV5yWsBfBwAOzKd0qqPbvuTgfGZfgg+7lQQM8HvS3E0M4mYM1kD4zq',
|
|
57
|
+
wrapper: 'UnMnZc4hekoMygc89hIyX3b7KuuNwqJTMOZJdeAQjuvGC/WVdTT+w+HmwWCANfli',
|
|
58
|
+
binary: 'NRkAqXy32zY6LuDA4go2FTF1Cy85jvEfSu6DPTevOmSu441+7WhVZocyqdhT1kNB'
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
};
|
|
@@ -9,7 +9,7 @@ function track(payload) {
|
|
|
9
9
|
}
|
|
10
10
|
if (navigator.webdriver || 'Cypress' in window) {
|
|
11
11
|
return false;
|
|
12
|
-
|
|
12
|
+
}
|
|
13
13
|
|
|
14
14
|
return navigator.sendBeacon(EVENT_URL, payload.buffer);
|
|
15
15
|
}
|
|
@@ -35,7 +35,8 @@ function asUint32(x) {
|
|
|
35
35
|
const encoder = new TextEncoder();
|
|
36
36
|
|
|
37
37
|
let hasInitializedSession = false;
|
|
38
|
-
|
|
38
|
+
/** @param {string} version */
|
|
39
|
+
export function trackSessionInit(version) {
|
|
39
40
|
if (hasInitializedSession) {
|
|
40
41
|
return true;
|
|
41
42
|
}
|
|
@@ -43,10 +44,13 @@ export function trackSessionInit() {
|
|
|
43
44
|
hasInitializedSession = true;
|
|
44
45
|
|
|
45
46
|
const encodedHostname = encoder.encode(location.hostname);
|
|
47
|
+
const encodedVersion = encoder.encode(version);
|
|
46
48
|
return track(concat(
|
|
47
49
|
new Uint8Array([ 0x01 ]),
|
|
48
|
-
new Uint8Array([ 0x90,
|
|
50
|
+
new Uint8Array([ 0x90, 0x61, 0x8A, 0xE7 ]),
|
|
49
51
|
asUint32(encodedHostname.byteLength),
|
|
50
|
-
encodedHostname
|
|
52
|
+
encodedHostname,
|
|
53
|
+
asUint32(encodedVersion.byteLength),
|
|
54
|
+
encodedVersion
|
|
51
55
|
));
|
|
52
56
|
}
|
|
@@ -124,6 +124,21 @@ export class YoloPipeline {
|
|
|
124
124
|
* Returns a JS error if the buffer size is not `width * height * 4`.
|
|
125
125
|
*/
|
|
126
126
|
preprocess_rgba(rgba: Uint8Array, width: number, height: number): Float32Array;
|
|
127
|
+
/**
|
|
128
|
+
* Adopt the input shape the engine reports for the compiled model.
|
|
129
|
+
*
|
|
130
|
+
* Without it the size comes from the metadata, which the graph itself never has to
|
|
131
|
+
* agree with, and [`input_shape`](Self::input_shape) is what the caller sizes its
|
|
132
|
+
* input tensor from - so a stale `imgsz` would feed the model a tensor it rejects.
|
|
133
|
+
* The ONNX path reads the same fact off its session; this is the LiteRT equivalent,
|
|
134
|
+
* which only the JS engine can see.
|
|
135
|
+
*
|
|
136
|
+
* Expects NCHW `[N, 3, H, W]`, what `ai_edge_torch` emits, with the signed dimensions
|
|
137
|
+
* the engine reports. Any other rank or layout (a channels-last `[N, H, W, 3]`) and any
|
|
138
|
+
* non-positive axis, which is how a dynamic dimension is reported, is ignored and leaves
|
|
139
|
+
* the metadata size in place.
|
|
140
|
+
*/
|
|
141
|
+
setInputShape(shape: Int32Array): void;
|
|
127
142
|
/**
|
|
128
143
|
* Whether this is an end-to-end (NMS-free) export, e.g. YOLO26. Its head runs
|
|
129
144
|
* the NMS/top-k with `int64`/`gather_nd` ops that the LiteRT WebGPU delegate
|
|
@@ -182,12 +197,13 @@ export interface InitOutput {
|
|
|
182
197
|
readonly yolopipeline_new: (a: number, b: number, c: number) => void;
|
|
183
198
|
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
199
|
readonly yolopipeline_preprocess_rgba: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
200
|
+
readonly yolopipeline_setInputShape: (a: number, b: number, c: number) => void;
|
|
185
201
|
readonly yolopipeline_task: (a: number, b: number) => void;
|
|
186
202
|
readonly start: () => void;
|
|
187
|
-
readonly
|
|
188
|
-
readonly
|
|
189
|
-
readonly
|
|
190
|
-
readonly
|
|
203
|
+
readonly __wasm_bindgen_func_elem_1956: (a: number, b: number, c: number, d: number) => void;
|
|
204
|
+
readonly __wasm_bindgen_func_elem_2558: (a: number, b: number, c: number, d: number) => void;
|
|
205
|
+
readonly __wasm_bindgen_func_elem_1956_2: (a: number, b: number, c: number, d: number) => void;
|
|
206
|
+
readonly __wasm_bindgen_func_elem_2582: (a: number, b: number, c: number, d: number) => void;
|
|
191
207
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
192
208
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
193
209
|
readonly __wbindgen_export3: (a: number) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @ts-self-types="./ultralytics_inference_web.d.ts" */
|
|
2
|
-
import { initRuntime } from './snippets/ort-web-
|
|
3
|
-
import { trackSessionInit } from './snippets/ort-web-
|
|
2
|
+
import { initRuntime } from './snippets/ort-web-74be4d1a4544c8bc/_loader.js';
|
|
3
|
+
import { trackSessionInit } from './snippets/ort-web-74be4d1a4544c8bc/_telemetry.js';
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -369,6 +369,26 @@ export class YoloPipeline {
|
|
|
369
369
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
+
/**
|
|
373
|
+
* Adopt the input shape the engine reports for the compiled model.
|
|
374
|
+
*
|
|
375
|
+
* Without it the size comes from the metadata, which the graph itself never has to
|
|
376
|
+
* agree with, and [`input_shape`](Self::input_shape) is what the caller sizes its
|
|
377
|
+
* input tensor from - so a stale `imgsz` would feed the model a tensor it rejects.
|
|
378
|
+
* The ONNX path reads the same fact off its session; this is the LiteRT equivalent,
|
|
379
|
+
* which only the JS engine can see.
|
|
380
|
+
*
|
|
381
|
+
* Expects NCHW `[N, 3, H, W]`, what `ai_edge_torch` emits, with the signed dimensions
|
|
382
|
+
* the engine reports. Any other rank or layout (a channels-last `[N, H, W, 3]`) and any
|
|
383
|
+
* non-positive axis, which is how a dynamic dimension is reported, is ignored and leaves
|
|
384
|
+
* the metadata size in place.
|
|
385
|
+
* @param {Int32Array} shape
|
|
386
|
+
*/
|
|
387
|
+
setInputShape(shape) {
|
|
388
|
+
const ptr0 = passArray32ToWasm0(shape, wasm.__wbindgen_export);
|
|
389
|
+
const len0 = WASM_VECTOR_LEN;
|
|
390
|
+
wasm.yolopipeline_setInputShape(this.__wbg_ptr, ptr0, len0);
|
|
391
|
+
}
|
|
372
392
|
/**
|
|
373
393
|
* The model's task (`"detect"`, `"segment"`, ...).
|
|
374
394
|
* @returns {string}
|
|
@@ -527,19 +547,19 @@ function __wbg_get_imports() {
|
|
|
527
547
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
528
548
|
return addHeapObject(ret);
|
|
529
549
|
}, arguments); },
|
|
530
|
-
|
|
550
|
+
__wbg_create_8f5a33c6bfe341e8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
531
551
|
const ret = ort.InferenceSession.create(getStringFromWasm0(arg0, arg1), takeObject(arg2));
|
|
532
552
|
return addHeapObject(ret);
|
|
533
553
|
}, arguments); },
|
|
534
|
-
|
|
554
|
+
__wbg_create_ab62f00735deac66: function() { return handleError(function (arg0, arg1) {
|
|
535
555
|
const ret = ort.InferenceSession.create(getObject(arg0), takeObject(arg1));
|
|
536
556
|
return addHeapObject(ret);
|
|
537
557
|
}, arguments); },
|
|
538
|
-
|
|
558
|
+
__wbg_data_926466624da78512: function() { return handleError(function (arg0) {
|
|
539
559
|
const ret = getObject(arg0).data;
|
|
540
560
|
return addHeapObject(ret);
|
|
541
561
|
}, arguments); },
|
|
542
|
-
|
|
562
|
+
__wbg_dims_9f13b995a90df835: function(arg0, arg1) {
|
|
543
563
|
const ret = getObject(arg1).dims;
|
|
544
564
|
const ptr1 = passArray32ToWasm0(ret, wasm.__wbindgen_export);
|
|
545
565
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -569,7 +589,7 @@ function __wbg_get_imports() {
|
|
|
569
589
|
const ret = Array.from(getObject(arg0));
|
|
570
590
|
return addHeapObject(ret);
|
|
571
591
|
},
|
|
572
|
-
|
|
592
|
+
__wbg_getData_1b8044301ffc7d79: function() { return handleError(function (arg0) {
|
|
573
593
|
const ret = getObject(arg0).getData();
|
|
574
594
|
return addHeapObject(ret);
|
|
575
595
|
}, arguments); },
|
|
@@ -593,18 +613,18 @@ function __wbg_get_imports() {
|
|
|
593
613
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
594
614
|
return addHeapObject(ret);
|
|
595
615
|
},
|
|
596
|
-
|
|
616
|
+
__wbg_initRuntime_461bceccb341c20d: function() { return handleError(function (arg0, arg1) {
|
|
597
617
|
const ret = initRuntime(arg0, takeObject(arg1));
|
|
598
618
|
return addHeapObject(ret);
|
|
599
619
|
}, arguments); },
|
|
600
|
-
|
|
620
|
+
__wbg_inputMetadata_5ab975ce7a9db793: function(arg0, arg1) {
|
|
601
621
|
const ret = getObject(arg1).inputMetadata;
|
|
602
622
|
const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
|
|
603
623
|
const len1 = WASM_VECTOR_LEN;
|
|
604
624
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
605
625
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
606
626
|
},
|
|
607
|
-
|
|
627
|
+
__wbg_inputNames_379bb0f6b0bbddb0: function(arg0, arg1) {
|
|
608
628
|
const ret = getObject(arg1).inputNames;
|
|
609
629
|
const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
|
|
610
630
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -675,7 +695,7 @@ function __wbg_get_imports() {
|
|
|
675
695
|
const ret = getObject(arg0).length;
|
|
676
696
|
return ret;
|
|
677
697
|
},
|
|
678
|
-
|
|
698
|
+
__wbg_location_b0c2e70b6a815475: function(arg0) {
|
|
679
699
|
const ret = getObject(arg0).location;
|
|
680
700
|
return (__wbindgen_enum_DataLocation.indexOf(ret) + 1 || 7) - 1;
|
|
681
701
|
},
|
|
@@ -699,7 +719,7 @@ function __wbg_get_imports() {
|
|
|
699
719
|
const ret = new Object();
|
|
700
720
|
return addHeapObject(ret);
|
|
701
721
|
},
|
|
702
|
-
|
|
722
|
+
__wbg_new_from_buffer_raw_913772a28563e085: function() { return handleError(function (arg0, arg1, arg2) {
|
|
703
723
|
const ret = new ort.Tensor(__wbindgen_enum_DataType[arg0], takeObject(arg1), takeObject(arg2));
|
|
704
724
|
return addHeapObject(ret);
|
|
705
725
|
}, arguments); },
|
|
@@ -714,7 +734,7 @@ function __wbg_get_imports() {
|
|
|
714
734
|
const a = state0.a;
|
|
715
735
|
state0.a = 0;
|
|
716
736
|
try {
|
|
717
|
-
return
|
|
737
|
+
return __wasm_bindgen_func_elem_2582(a, state0.b, arg0, arg1);
|
|
718
738
|
} finally {
|
|
719
739
|
state0.a = a;
|
|
720
740
|
}
|
|
@@ -781,14 +801,14 @@ function __wbg_get_imports() {
|
|
|
781
801
|
const ret = getObject(arg0).now();
|
|
782
802
|
return ret;
|
|
783
803
|
},
|
|
784
|
-
|
|
804
|
+
__wbg_outputMetadata_7800f416aa5ef49d: function(arg0, arg1) {
|
|
785
805
|
const ret = getObject(arg1).outputMetadata;
|
|
786
806
|
const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
|
|
787
807
|
const len1 = WASM_VECTOR_LEN;
|
|
788
808
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
789
809
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
790
810
|
},
|
|
791
|
-
|
|
811
|
+
__wbg_outputNames_e4fd207c684625a6: function(arg0, arg1) {
|
|
792
812
|
const ret = getObject(arg1).outputNames;
|
|
793
813
|
const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
|
|
794
814
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -824,7 +844,7 @@ function __wbg_get_imports() {
|
|
|
824
844
|
const ret = Promise.resolve(getObject(arg0));
|
|
825
845
|
return addHeapObject(ret);
|
|
826
846
|
},
|
|
827
|
-
|
|
847
|
+
__wbg_run_00a506dcbf8e4bb0: function() { return handleError(function (arg0, arg1) {
|
|
828
848
|
const ret = getObject(arg0).run(takeObject(arg1));
|
|
829
849
|
return addHeapObject(ret);
|
|
830
850
|
}, arguments); },
|
|
@@ -887,11 +907,11 @@ function __wbg_get_imports() {
|
|
|
887
907
|
const ret = getObject(arg0).toString();
|
|
888
908
|
return addHeapObject(ret);
|
|
889
909
|
},
|
|
890
|
-
|
|
891
|
-
const ret = trackSessionInit();
|
|
910
|
+
__wbg_trackSessionInit_a492d3a59889a1ae: function() { return handleError(function (arg0, arg1) {
|
|
911
|
+
const ret = trackSessionInit(getStringFromWasm0(arg0, arg1));
|
|
892
912
|
return addHeapObject(ret);
|
|
893
913
|
}, arguments); },
|
|
894
|
-
|
|
914
|
+
__wbg_type_36ea46c1a40b10d2: function(arg0) {
|
|
895
915
|
const ret = getObject(arg0).type;
|
|
896
916
|
return (__wbindgen_enum_DataType.indexOf(ret) + 1 || 16) - 1;
|
|
897
917
|
},
|
|
@@ -904,18 +924,18 @@ function __wbg_get_imports() {
|
|
|
904
924
|
return addHeapObject(ret);
|
|
905
925
|
},
|
|
906
926
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
907
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
908
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
927
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 689, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
928
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1956);
|
|
909
929
|
return addHeapObject(ret);
|
|
910
930
|
},
|
|
911
931
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
912
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
913
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
932
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 914, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
933
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2558);
|
|
914
934
|
return addHeapObject(ret);
|
|
915
935
|
},
|
|
916
936
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
917
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("boolean")], shim_idx:
|
|
918
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
937
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("boolean")], shim_idx: 689, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
938
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1956_2);
|
|
919
939
|
return addHeapObject(ret);
|
|
920
940
|
},
|
|
921
941
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -1002,10 +1022,10 @@ function __wbg_get_imports() {
|
|
|
1002
1022
|
};
|
|
1003
1023
|
}
|
|
1004
1024
|
|
|
1005
|
-
function
|
|
1025
|
+
function __wasm_bindgen_func_elem_1956(arg0, arg1, arg2) {
|
|
1006
1026
|
try {
|
|
1007
1027
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1008
|
-
wasm.
|
|
1028
|
+
wasm.__wasm_bindgen_func_elem_1956(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1009
1029
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1010
1030
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1011
1031
|
if (r1) {
|
|
@@ -1016,10 +1036,10 @@ function __wasm_bindgen_func_elem_1941(arg0, arg1, arg2) {
|
|
|
1016
1036
|
}
|
|
1017
1037
|
}
|
|
1018
1038
|
|
|
1019
|
-
function
|
|
1039
|
+
function __wasm_bindgen_func_elem_2558(arg0, arg1, arg2) {
|
|
1020
1040
|
try {
|
|
1021
1041
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1022
|
-
wasm.
|
|
1042
|
+
wasm.__wasm_bindgen_func_elem_2558(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1023
1043
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1024
1044
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1025
1045
|
if (r1) {
|
|
@@ -1030,10 +1050,10 @@ function __wasm_bindgen_func_elem_2540(arg0, arg1, arg2) {
|
|
|
1030
1050
|
}
|
|
1031
1051
|
}
|
|
1032
1052
|
|
|
1033
|
-
function
|
|
1053
|
+
function __wasm_bindgen_func_elem_1956_2(arg0, arg1, arg2) {
|
|
1034
1054
|
try {
|
|
1035
1055
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1036
|
-
wasm.
|
|
1056
|
+
wasm.__wasm_bindgen_func_elem_1956_2(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1037
1057
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1038
1058
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1039
1059
|
if (r1) {
|
|
@@ -1044,8 +1064,8 @@ function __wasm_bindgen_func_elem_1941_2(arg0, arg1, arg2) {
|
|
|
1044
1064
|
}
|
|
1045
1065
|
}
|
|
1046
1066
|
|
|
1047
|
-
function
|
|
1048
|
-
wasm.
|
|
1067
|
+
function __wasm_bindgen_func_elem_2582(arg0, arg1, arg2, arg3) {
|
|
1068
|
+
wasm.__wasm_bindgen_func_elem_2582(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1049
1069
|
}
|
|
1050
1070
|
|
|
1051
1071
|
|
|
Binary file
|
|
@@ -16,12 +16,13 @@ export const yolopipeline_names: (a: number, b: number) => void;
|
|
|
16
16
|
export const yolopipeline_new: (a: number, b: number, c: number) => void;
|
|
17
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
|
+
export const yolopipeline_setInputShape: (a: number, b: number, c: number) => void;
|
|
19
20
|
export const yolopipeline_task: (a: number, b: number) => void;
|
|
20
21
|
export const start: () => void;
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
22
|
+
export const __wasm_bindgen_func_elem_1956: (a: number, b: number, c: number, d: number) => void;
|
|
23
|
+
export const __wasm_bindgen_func_elem_2558: (a: number, b: number, c: number, d: number) => void;
|
|
24
|
+
export const __wasm_bindgen_func_elem_1956_2: (a: number, b: number, c: number, d: number) => void;
|
|
25
|
+
export const __wasm_bindgen_func_elem_2582: (a: number, b: number, c: number, d: number) => void;
|
|
25
26
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
26
27
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
27
28
|
export const __wbindgen_export3: (a: number) => void;
|