@mauriciobenjamin700/ort-vision-sdk-web 0.6.0 → 0.6.1

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/CHANGELOG.md CHANGED
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.1] - 2026-08-08
11
+
12
+ ### Fixed
13
+
14
+ - **The threshold quoted in a `NoDetectionsError` now reads the same in both
15
+ SDKs.** This side rendered a whole threshold as `confThreshold=1` where the
16
+ Python SDK rendered `conf_threshold=1.0`, and wrote `0.0000001` where Python
17
+ switched to `1e-07`. A fused pipeline is built once and runs under both
18
+ runtimes from the same file, so the two SDKs were describing one run with two
19
+ different numbers. Both sides now render six decimals with the trailing zeros
20
+ trimmed, and the same table in both test suites fails if either side drifts.
21
+
22
+ - **The changelog's link table is no longer stuck at 0.2.0.** `[Unreleased]`
23
+ compared against `web-v0.2.0`, so following it showed four releases of shipped
24
+ history as unreleased work, and `[0.3.0]` through `[0.6.0]` had no link
25
+ definition at all — they rendered as literal `[0.6.0]` text. The table is
26
+ rebuilt through 0.6.1. `[0.1.0]` loses its definition on purpose: no
27
+ `web-v0.1.0` tag was ever pushed, so that link was a 404.
28
+
10
29
  ## [0.6.0] - 2026-08-07
11
30
 
12
31
  ### Added
@@ -444,6 +463,13 @@ console.log(r.boxes.xyxy, r.boxes.cls, r.boxes.conf, r.names);
444
463
  - Execution-provider resolution defaulting to `["webgpu", "wasm"]`.
445
464
  - Public types mirroring the Python SDK: `BoundingBox`, `ClassProbability`, `ClassificationResult`, `DetectionResult`, `RGBImage`.
446
465
 
447
- [Unreleased]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.2.0...HEAD
466
+ [Unreleased]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.6.1...HEAD
467
+ [0.6.1]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.6.0...web-v0.6.1
468
+ [0.6.0]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.5.1...web-v0.6.0
469
+ [0.5.1]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.5.0...web-v0.5.1
470
+ [0.5.0]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.4.0...web-v0.5.0
471
+ [0.4.0]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.3.0...web-v0.4.0
472
+ [0.3.0]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.2.2...web-v0.3.0
473
+ [0.2.2]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.2.1...web-v0.2.2
474
+ [0.2.1]: https://github.com/mauriciobenjamin700/ort-vision-sdk/compare/web-v0.2.0...web-v0.2.1
448
475
  [0.2.0]: https://github.com/mauriciobenjamin700/ort-vision-sdk/releases/tag/web-v0.2.0
449
- [0.1.0]: https://github.com/mauriciobenjamin700/ort-vision-sdk/releases/tag/web-v0.1.0
package/dist/index.js CHANGED
@@ -23,5 +23,5 @@ export { Classifier, } from "./tasks/classifier.js";
23
23
  export { DetectClassify, } from "./tasks/detectClassify.js";
24
24
  export { Detector, } from "./tasks/detector.js";
25
25
  export { Segmenter, } from "./tasks/segmenter.js";
26
- export const VERSION = "0.6.0";
26
+ export const VERSION = "0.6.1";
27
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/tasks/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,8BAAsB,UAAU;IACR,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU;IAA7D,SAAS,aAAgC,QAAQ,EAAE,UAAU;IAE7D,+DAA+D;IAC/D,IAAI,OAAO,IAAI,UAAU,CAExB;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE;IACP,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,GACA,IAAI,CAUN"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/tasks/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,8BAAsB,UAAU;IACR,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU;IAA7D,SAAS,aAAgC,QAAQ,EAAE,UAAU;IAE7D,+DAA+D;IAC/D,IAAI,OAAO,IAAI,UAAU,CAExB;CACF;AAwBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE;IACP,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,GACA,IAAI,CAUN"}
@@ -15,6 +15,27 @@ export class VisionTask {
15
15
  return this._session;
16
16
  }
17
17
  }
18
+ /**
19
+ * Render a confidence threshold the way the Python SDK renders it.
20
+ *
21
+ * JavaScript and Python disagree on how a number becomes text. A whole
22
+ * threshold is `1` here and `1.0` there; JavaScript holds off on exponent
23
+ * notation until `1e-7` while Python switches at `1e-5`. A fused pipeline is
24
+ * built once and runs under both runtimes from the same file, so a message that
25
+ * quotes the threshold has to quote it identically — otherwise the two SDKs
26
+ * describe the same run with two different numbers.
27
+ *
28
+ * Six decimals with the trailing zeros trimmed covers every threshold a caller
29
+ * can meaningfully set and agrees byte for byte with `_format_threshold` in the
30
+ * Python SDK's `tasks/base.py`. The pairing is fixed by a shared table in both
31
+ * test suites, so a change on one side that is not mirrored on the other fails.
32
+ *
33
+ * @param value The threshold to render.
34
+ * @returns The threshold as text, without trailing zeros or a trailing dot.
35
+ */
36
+ function formatThreshold(value) {
37
+ return value.toFixed(6).replace(/0+$/, "").replace(/\.$/, "");
38
+ }
18
39
  /**
19
40
  * Turn an empty result into an error, when the caller asked for that.
20
41
  *
@@ -37,6 +58,6 @@ export function requireDetections(count, options) {
37
58
  const narrowed = options.classes === undefined
38
59
  ? ""
39
60
  : ` among classes [${[...options.classes].sort((a, b) => a - b).join(", ")}]`;
40
- throw new NoDetectionsError(`No detections${where}${narrowed}: nothing cleared confThreshold=${options.confThreshold}.`);
61
+ throw new NoDetectionsError(`No detections${where}${narrowed}: nothing cleared confThreshold=${formatThreshold(options.confThreshold)}.`);
41
62
  }
42
63
  //# sourceMappingURL=base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/tasks/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,MAAM,OAAgB,UAAU;IACW;IAAzC,YAAyC,QAAoB;QAApB,aAAQ,GAAR,QAAQ,CAAY;IAAG,CAAC;IAEjE,+DAA+D;IAC/D,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAa,EACb,OAKC;IAED,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO;IAC/C,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC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C,CAAC,CAAC,EAAE,CAAC;IACxD,MAAM,QAAQ,GACZ,OAAO,CAAC,OAAO,KAAK,SAAS;QAC3B,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IAClF,MAAM,IAAI,iBAAiB,CACzB,gBAAgB,KAAK,GAAG,QAAQ,mCAAmC,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAC7G,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mauriciobenjamin700/ort-vision-sdk-web",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "High-level TypeScript SDK for browser computer vision inference with ONNX Runtime Web.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",