@ultralytics/yolo 0.0.28 → 0.0.30

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 CHANGED
@@ -114,14 +114,14 @@ export interface PredictOptions {
114
114
  */
115
115
  classes?: number[];
116
116
  /**
117
- * Depth colormap for the `depth` overlay: `"inferno"` (default), `"jet"`,
118
- * `"spectral"` (`Spectral_r`, DepthAnything-style), or `"gray"` (raw grayscale).
119
- * Ignored by every other task.
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
120
  */
121
121
  colormap?: "inferno" | "jet" | "spectral" | "gray";
122
122
  /**
123
- * Depth normalization: `"metric"` (default, min/max) or `"disparity"` (inverse depth +
124
- * percentile clip, the DepthAnything look). Ignored by every other task.
123
+ * Depth normalization: `"disparity"` (default, inverse depth + percentile clip, the
124
+ * DepthAnything look) or `"metric"` (min/max). Ignored by every other task.
125
125
  */
126
126
  depthViz?: "metric" | "disparity";
127
127
  }
package/dist/index.js CHANGED
@@ -422,8 +422,10 @@ 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
- const colormap = options?.colormap ?? "inferno";
426
- const depthViz = options?.depthViz ?? "metric";
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 ?? "";
427
429
  if (isDrawable(image)) {
428
430
  const { data, width, height } = toImageData(image);
429
431
  return decodeResults(await this.engine.predictDrawable(data, width, height, conf, iou, classes, colormap, depthViz));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultralytics/yolo",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
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",
package/pkg/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ultralytics-inference-web",
3
3
  "type": "module",
4
4
  "description": "Browser/WebAssembly bindings for ultralytics-inference (WebGPU via ort-web)",
5
- "version": "0.0.28",
5
+ "version": "0.0.30",
6
6
  "license": "AGPL-3.0",
7
7
  "repository": {
8
8
  "type": "git",
@@ -184,10 +184,10 @@ export interface InitOutput {
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 __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;
187
+ readonly __wasm_bindgen_func_elem_1941: (a: number, b: number, c: number, d: number) => void;
188
+ readonly __wasm_bindgen_func_elem_2540: (a: number, b: number, c: number, d: number) => void;
189
+ readonly __wasm_bindgen_func_elem_1941_2: (a: number, b: number, c: number, d: number) => void;
190
+ readonly __wasm_bindgen_func_elem_2564: (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;
@@ -714,7 +714,7 @@ function __wbg_get_imports() {
714
714
  const a = state0.a;
715
715
  state0.a = 0;
716
716
  try {
717
- return __wasm_bindgen_func_elem_2566(a, state0.b, arg0, arg1);
717
+ return __wasm_bindgen_func_elem_2564(a, state0.b, arg0, arg1);
718
718
  } finally {
719
719
  state0.a = a;
720
720
  }
@@ -905,17 +905,17 @@ function __wbg_get_imports() {
905
905
  },
906
906
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
907
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);
908
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1941);
909
909
  return addHeapObject(ret);
910
910
  },
911
911
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
912
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);
913
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2540);
914
914
  return addHeapObject(ret);
915
915
  },
916
916
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
917
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);
918
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1941_2);
919
919
  return addHeapObject(ret);
920
920
  },
921
921
  __wbindgen_cast_0000000000000004: function(arg0) {
@@ -1002,10 +1002,10 @@ function __wbg_get_imports() {
1002
1002
  };
1003
1003
  }
1004
1004
 
1005
- function __wasm_bindgen_func_elem_1945(arg0, arg1, arg2) {
1005
+ function __wasm_bindgen_func_elem_1941(arg0, arg1, arg2) {
1006
1006
  try {
1007
1007
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1008
- wasm.__wasm_bindgen_func_elem_1945(retptr, arg0, arg1, addHeapObject(arg2));
1008
+ wasm.__wasm_bindgen_func_elem_1941(retptr, arg0, arg1, addHeapObject(arg2));
1009
1009
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1010
1010
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1011
1011
  if (r1) {
@@ -1016,10 +1016,10 @@ function __wasm_bindgen_func_elem_1945(arg0, arg1, arg2) {
1016
1016
  }
1017
1017
  }
1018
1018
 
1019
- function __wasm_bindgen_func_elem_2542(arg0, arg1, arg2) {
1019
+ function __wasm_bindgen_func_elem_2540(arg0, arg1, arg2) {
1020
1020
  try {
1021
1021
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1022
- wasm.__wasm_bindgen_func_elem_2542(retptr, arg0, arg1, addHeapObject(arg2));
1022
+ wasm.__wasm_bindgen_func_elem_2540(retptr, arg0, arg1, addHeapObject(arg2));
1023
1023
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1024
1024
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1025
1025
  if (r1) {
@@ -1030,10 +1030,10 @@ function __wasm_bindgen_func_elem_2542(arg0, arg1, arg2) {
1030
1030
  }
1031
1031
  }
1032
1032
 
1033
- function __wasm_bindgen_func_elem_1945_2(arg0, arg1, arg2) {
1033
+ function __wasm_bindgen_func_elem_1941_2(arg0, arg1, arg2) {
1034
1034
  try {
1035
1035
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1036
- wasm.__wasm_bindgen_func_elem_1945_2(retptr, arg0, arg1, addHeapObject(arg2));
1036
+ wasm.__wasm_bindgen_func_elem_1941_2(retptr, arg0, arg1, addHeapObject(arg2));
1037
1037
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1038
1038
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1039
1039
  if (r1) {
@@ -1044,8 +1044,8 @@ function __wasm_bindgen_func_elem_1945_2(arg0, arg1, arg2) {
1044
1044
  }
1045
1045
  }
1046
1046
 
1047
- function __wasm_bindgen_func_elem_2566(arg0, arg1, arg2, arg3) {
1048
- wasm.__wasm_bindgen_func_elem_2566(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1047
+ function __wasm_bindgen_func_elem_2564(arg0, arg1, arg2, arg3) {
1048
+ wasm.__wasm_bindgen_func_elem_2564(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1049
1049
  }
1050
1050
 
1051
1051
 
@@ -18,10 +18,10 @@ export const yolopipeline_postprocess: (a: number, b: number, c: number, d: numb
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 __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;
21
+ export const __wasm_bindgen_func_elem_1941: (a: number, b: number, c: number, d: number) => void;
22
+ export const __wasm_bindgen_func_elem_2540: (a: number, b: number, c: number, d: number) => void;
23
+ export const __wasm_bindgen_func_elem_1941_2: (a: number, b: number, c: number, d: number) => void;
24
+ export const __wasm_bindgen_func_elem_2564: (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;