@camstack/addon-pipeline 1.2.621 → 1.2.623

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.
Files changed (49) hide show
  1. package/dist/audio-analyzer/index.js +3 -3
  2. package/dist/audio-analyzer/index.mjs +3 -3
  3. package/dist/{custom-model-catalog-Il8UY4D4.js → custom-model-catalog-BTBdgN2p.js} +29 -16
  4. package/dist/{custom-model-catalog-0_SnSXzN.mjs → custom-model-catalog-D5zTw1LU.mjs} +29 -10
  5. package/dist/detection-pipeline/index.js +67 -416
  6. package/dist/detection-pipeline/index.mjs +91 -440
  7. package/dist/{dist-ClkumZgv.js → dist-BVo3wa7s.js} +711 -302
  8. package/dist/{dist-DHqkQhTQ.mjs → dist-opSx6v5i.mjs} +651 -296
  9. package/dist/{model-catalogs-BagalaYp.js → model-catalogs-CQytR2AN.js} +1 -1
  10. package/dist/{model-catalogs-Z1GZAhSb.mjs → model-catalogs-rIvLUVlw.mjs} +1 -1
  11. package/dist/motion-wasm/index.js +1 -1
  12. package/dist/motion-wasm/index.mjs +1 -1
  13. package/dist/{node-CkJLxlWI.mjs → node-CGIYuJMN.mjs} +1 -1
  14. package/dist/{node-0O_61WVW.js → node-DqLsuN_A.js} +1 -1
  15. package/dist/pipeline-runner/index.js +115 -460
  16. package/dist/pipeline-runner/index.mjs +108 -453
  17. package/dist/{process-memory-Dj3UgL1e.mjs → process-memory-Bd-TuWfM.mjs} +1 -1
  18. package/dist/{process-memory-DdIOhjYB.js → process-memory-DyxG-0mG.js} +1 -1
  19. package/dist/recorder/index.js +2 -2
  20. package/dist/recorder/index.mjs +2 -2
  21. package/dist/{segment-demux-js-BePzacki.js → segment-demux-js-B4bfTQpK.js} +1 -1
  22. package/dist/{segment-demux-js-Bv0t0-tQ.mjs → segment-demux-js-CdVRzwSd.mjs} +1 -1
  23. package/dist/session-decode/decode-worker-main.js +12 -21
  24. package/dist/session-decode/decode-worker-main.mjs +12 -21
  25. package/dist/stream-broker/_stub.js +2 -2
  26. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-dNk74ahz.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DF3FGCR8.mjs} +2 -2
  27. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-oUZNn2Kr.mjs +26 -0
  28. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Bb-ETNGC.mjs +26 -0
  29. package/dist/stream-broker/demux-worker-child.js +1 -1
  30. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  31. package/dist/stream-broker/{hostInit-CH5g78CJ.mjs → hostInit-BiyFzSqq.mjs} +2 -2
  32. package/dist/stream-broker/index.js +3 -3
  33. package/dist/stream-broker/index.mjs +3 -3
  34. package/dist/stream-broker/remoteEntry.js +1 -1
  35. package/dist/{worker-protocol-D_NzPcnh.mjs → worker-protocol-DngGEAT2.js} +102 -2
  36. package/dist/{worker-protocol-C-G8qmye.js → worker-protocol-_avq7y8O.mjs} +67 -25
  37. package/package.json +1 -1
  38. package/python/accelerator_facts.py +275 -0
  39. package/python/coreml_load_probe.py +105 -15
  40. package/python/inference_pool.py +19 -2
  41. package/python/openvino_compile_probe.py +72 -18
  42. package/python/postprocessors/ssd.py +12 -4
  43. package/python/postprocessors/test_ssd.py +64 -0
  44. package/python/test_accelerator_facts.py +105 -0
  45. package/python/test_coreml_load_probe.py +83 -0
  46. package/python/test_openvino_compile_probe.py +114 -0
  47. package/python/webgpu_isolated.py +19 -0
  48. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-2KkGoQ55.mjs +0 -26
  49. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Dx-WrMx0.mjs +0 -26
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-emK7D4bc.js");
6
- const require_dist = require("../dist-ClkumZgv.js");
7
- const require_model_catalogs = require("../model-catalogs-BagalaYp.js");
8
- const require_process_memory = require("../process-memory-DdIOhjYB.js");
6
+ const require_dist = require("../dist-BVo3wa7s.js");
7
+ const require_model_catalogs = require("../model-catalogs-CQytR2AN.js");
8
+ const require_process_memory = require("../process-memory-DyxG-0mG.js");
9
9
  let node_fs = require("node:fs");
10
10
  node_fs = require_chunk.__toESM(node_fs);
11
11
  let node_path = require("node:path");
@@ -1,7 +1,7 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { $ as audioAnalyzerCapability, Bt as mapAudioLabelToMacro, F as PoolMemoryWatchdog, In as BaseAddon, Jn as hydrateSchema, Kn as expandAudioChunkToF32le, Pn as errMsg, Q as audioAnalysisCapability, Vn as audioChunkBytesPerSample, _r as EventCategory, dn as resolvePoolMemoryPolicy, er as nodePin, h as DEFAULT_AUDIO_ANALYZER_CONFIG, r as AUDIO_BACKEND_CHOICES } from "../dist-DHqkQhTQ.mjs";
3
- import { n as AUDIO_CLASSIFIER_MODELS } from "../model-catalogs-Z1GZAhSb.mjs";
4
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-Dj3UgL1e.mjs";
2
+ import { Er as EventCategory, Gn as BaseAddon, Gt as mapAudioLabelToMacro, I as PoolMemoryWatchdog, Un as errMsg, Xn as audioChunkBytesPerSample, h as DEFAULT_AUDIO_ANALYZER_CONFIG, lr as nodePin, nt as audioAnalyzerCapability, r as AUDIO_BACKEND_CHOICES, rr as hydrateSchema, tr as expandAudioChunkToF32le, tt as audioAnalysisCapability, yn as resolvePoolMemoryPolicy } from "../dist-opSx6v5i.mjs";
3
+ import { n as AUDIO_CLASSIFIER_MODELS } from "../model-catalogs-rIvLUVlw.mjs";
4
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-Bd-TuWfM.mjs";
5
5
  import * as fs from "node:fs";
6
6
  import * as path$1 from "node:path";
7
7
  import { ensureModel } from "@camstack/system/addon-utils";
@@ -1,6 +1,6 @@
1
- const require_dist = require("./dist-ClkumZgv.js");
2
- const require_model_catalogs = require("./model-catalogs-BagalaYp.js");
3
- const require_worker_protocol = require("./worker-protocol-C-G8qmye.js");
1
+ const require_dist = require("./dist-BVo3wa7s.js");
2
+ const require_model_catalogs = require("./model-catalogs-CQytR2AN.js");
3
+ const require_worker_protocol = require("./worker-protocol-DngGEAT2.js");
4
4
  let node_crypto = require("node:crypto");
5
5
  //#region src/detection-pipeline/registry/effective-confidence.ts
6
6
  /** The default in force: the model's own floor, else the step's. */
@@ -466,7 +466,6 @@ var STEP_CLIP_EMBEDDING = new PipelineStepBase({
466
466
  defaultModelId: "siglip2-b16-224",
467
467
  modelScope: "cluster",
468
468
  enabledByDefault: true,
469
- backfillIntoExistingOverrides: true,
470
469
  defaultConfidence: 0,
471
470
  defaultMinParentScore: .4,
472
471
  group: "CLIP",
@@ -938,12 +937,13 @@ var SessionDecodeSession = class {
938
937
  this.child.on("message", (m) => this.handleMessage(m));
939
938
  this.child.on("exit", (m) => this.handleExit(toWorkerExitInfo(m)));
940
939
  }
941
- start(source, opts, lease) {
940
+ start(source, opts, lease, hwaccel) {
942
941
  this.trySend({
943
942
  kind: "start",
944
943
  source,
945
944
  opts,
946
- lease
945
+ lease,
946
+ hwaccel
947
947
  });
948
948
  }
949
949
  /**
@@ -1566,7 +1566,7 @@ function createSessionDecodeCoordinator(deps) {
1566
1566
  ...deps.onPreRollSettled ? { onPreRollSettled: deps.onPreRollSettled } : {},
1567
1567
  ...deps.onWorkerExit ? { onWorkerExit: deps.onWorkerExit } : {}
1568
1568
  });
1569
- session.start(source, opts, deps.lease());
1569
+ session.start(source, opts, deps.lease(), deps.hwaccel());
1570
1570
  deps.onSessionTeardown?.((mode) => session.teardown(mode));
1571
1571
  let failed = false;
1572
1572
  try {
@@ -1834,8 +1834,27 @@ function rootObjectGate(steps) {
1834
1834
  }
1835
1835
  //#endregion
1836
1836
  //#region src/detection-pipeline/default-detection-model.ts
1837
- /** The object-detection step id — the only slot this resolver applies to. */
1838
- var OBJECT_DETECTION_STEP_ID = "object-detection";
1837
+ /**
1838
+ * Hardware-aware default object-detection model.
1839
+ *
1840
+ * When no operator has chosen a model, the object-detection step's default
1841
+ * should match the NODE's accelerator rather than a single flat id. This
1842
+ * module maps a node's resolved engine (`backend` + `device`) to a
1843
+ * measured-COCO-val2017 balanced default, keyed on the REAL runtime
1844
+ * vocabulary this codebase uses:
1845
+ *
1846
+ * - `backend` ∈ { 'onnx' | 'openvino' | 'coreml' } (`RuntimeId`)
1847
+ * - `device` — CoreML: cpu/gpu/ane/all · OpenVINO: auto/cpu/gpu/npu ·
1848
+ * ONNX: cpu/cuda/coreml (see `PoolModelConfig.device` doc)
1849
+ *
1850
+ * Only the OBJECT-DETECTION slot uses this; every other step keeps its flat
1851
+ * per-format default. The resolver is called on the hot default-tree path,
1852
+ * so it NEVER throws and NEVER returns a model id without a build for the
1853
+ * requested format — any unmapped/unknown backend (e.g. `edgetpu`), or a
1854
+ * mapped id that lacks a build for the node's format, falls back to the
1855
+ * step's PER-FORMAT default (tflite → the Coral SSD build), never to a bare
1856
+ * `defaultModelId` that may not ship the format at all.
1857
+ */
1839
1858
  /**
1840
1859
  * Balanced default object-detection model per accelerator class. `'cpu'` maps to
1841
1860
  * `null` → the caller substitutes the step's own `defaultModelId` (`yolo26n`).
@@ -1910,7 +1929,7 @@ function classifyAccelerator(backend, device) {
1910
1929
  function resolveDefaultDetectionModel(backend, device, format, getStepDef = getStepDefinition) {
1911
1930
  let def;
1912
1931
  try {
1913
- def = getStepDef(OBJECT_DETECTION_STEP_ID);
1932
+ def = getStepDef(require_dist.OBJECT_DETECTION_STEP_ID);
1914
1933
  } catch {
1915
1934
  return "yolo26n";
1916
1935
  }
@@ -2281,12 +2300,6 @@ Object.defineProperty(exports, "CustomModelCatalog", {
2281
2300
  return CustomModelCatalog;
2282
2301
  }
2283
2302
  });
2284
- Object.defineProperty(exports, "OBJECT_DETECTION_STEP_ID", {
2285
- enumerable: true,
2286
- get: function() {
2287
- return OBJECT_DETECTION_STEP_ID;
2288
- }
2289
- });
2290
2303
  Object.defineProperty(exports, "buildSubtreeCanRun", {
2291
2304
  enumerable: true,
2292
2305
  get: function() {
@@ -1,6 +1,6 @@
1
- import { Pt as inferModelProvider, _n as stepModelRunsOnFormat, b as DEVICE_BACKEND_TO_FORMAT, et as audioKindId, f as COCO_80_LABELS, i as AUDIO_MACRO_LABELS, k as LABEL_SUPPLY_VOCABULARIES, p as COCO_TO_MACRO } from "./dist-DHqkQhTQ.mjs";
2
- import { a as FACE_DETECTION_MODELS, c as OBJECT_DETECTION_MODELS, d as PLATE_OCR_MODELS, f as SEGMENTATION_REFINER_MODELS, i as CLIP_EMBEDDING_MODELS, l as PACKAGE_DETECTION_MODELS, n as AUDIO_CLASSIFIER_MODELS, o as FACE_EMBEDDING_MODELS, p as VEHICLE_CLASSIFIER_MODELS, r as BIRD_CLASSIFIER_MODELS, s as INSTANCE_SEGMENTATION_MODELS, t as ANIMAL_CLASSIFIER_MODELS, u as PLATE_DETECTION_MODELS } from "./model-catalogs-Z1GZAhSb.mjs";
3
- import { t as isWorkerReply } from "./worker-protocol-D_NzPcnh.mjs";
1
+ import { En as stepModelRunsOnFormat, N as OBJECT_DETECTION_STEP_ID, b as DEVICE_BACKEND_TO_FORMAT, f as COCO_80_LABELS, i as AUDIO_MACRO_LABELS, k as LABEL_SUPPLY_VOCABULARIES, p as COCO_TO_MACRO, rt as audioKindId, zt as inferModelProvider } from "./dist-opSx6v5i.mjs";
2
+ import { a as FACE_DETECTION_MODELS, c as OBJECT_DETECTION_MODELS, d as PLATE_OCR_MODELS, f as SEGMENTATION_REFINER_MODELS, i as CLIP_EMBEDDING_MODELS, l as PACKAGE_DETECTION_MODELS, n as AUDIO_CLASSIFIER_MODELS, o as FACE_EMBEDDING_MODELS, p as VEHICLE_CLASSIFIER_MODELS, r as BIRD_CLASSIFIER_MODELS, s as INSTANCE_SEGMENTATION_MODELS, t as ANIMAL_CLASSIFIER_MODELS, u as PLATE_DETECTION_MODELS } from "./model-catalogs-rIvLUVlw.mjs";
3
+ import { t as isWorkerReply } from "./worker-protocol-_avq7y8O.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  //#region src/detection-pipeline/registry/effective-confidence.ts
6
6
  /** The default in force: the model's own floor, else the step's. */
@@ -466,7 +466,6 @@ var STEP_CLIP_EMBEDDING = new PipelineStepBase({
466
466
  defaultModelId: "siglip2-b16-224",
467
467
  modelScope: "cluster",
468
468
  enabledByDefault: true,
469
- backfillIntoExistingOverrides: true,
470
469
  defaultConfidence: 0,
471
470
  defaultMinParentScore: .4,
472
471
  group: "CLIP",
@@ -938,12 +937,13 @@ var SessionDecodeSession = class {
938
937
  this.child.on("message", (m) => this.handleMessage(m));
939
938
  this.child.on("exit", (m) => this.handleExit(toWorkerExitInfo(m)));
940
939
  }
941
- start(source, opts, lease) {
940
+ start(source, opts, lease, hwaccel) {
942
941
  this.trySend({
943
942
  kind: "start",
944
943
  source,
945
944
  opts,
946
- lease
945
+ lease,
946
+ hwaccel
947
947
  });
948
948
  }
949
949
  /**
@@ -1566,7 +1566,7 @@ function createSessionDecodeCoordinator(deps) {
1566
1566
  ...deps.onPreRollSettled ? { onPreRollSettled: deps.onPreRollSettled } : {},
1567
1567
  ...deps.onWorkerExit ? { onWorkerExit: deps.onWorkerExit } : {}
1568
1568
  });
1569
- session.start(source, opts, deps.lease());
1569
+ session.start(source, opts, deps.lease(), deps.hwaccel());
1570
1570
  deps.onSessionTeardown?.((mode) => session.teardown(mode));
1571
1571
  let failed = false;
1572
1572
  try {
@@ -1834,8 +1834,27 @@ function rootObjectGate(steps) {
1834
1834
  }
1835
1835
  //#endregion
1836
1836
  //#region src/detection-pipeline/default-detection-model.ts
1837
- /** The object-detection step id — the only slot this resolver applies to. */
1838
- var OBJECT_DETECTION_STEP_ID = "object-detection";
1837
+ /**
1838
+ * Hardware-aware default object-detection model.
1839
+ *
1840
+ * When no operator has chosen a model, the object-detection step's default
1841
+ * should match the NODE's accelerator rather than a single flat id. This
1842
+ * module maps a node's resolved engine (`backend` + `device`) to a
1843
+ * measured-COCO-val2017 balanced default, keyed on the REAL runtime
1844
+ * vocabulary this codebase uses:
1845
+ *
1846
+ * - `backend` ∈ { 'onnx' | 'openvino' | 'coreml' } (`RuntimeId`)
1847
+ * - `device` — CoreML: cpu/gpu/ane/all · OpenVINO: auto/cpu/gpu/npu ·
1848
+ * ONNX: cpu/cuda/coreml (see `PoolModelConfig.device` doc)
1849
+ *
1850
+ * Only the OBJECT-DETECTION slot uses this; every other step keeps its flat
1851
+ * per-format default. The resolver is called on the hot default-tree path,
1852
+ * so it NEVER throws and NEVER returns a model id without a build for the
1853
+ * requested format — any unmapped/unknown backend (e.g. `edgetpu`), or a
1854
+ * mapped id that lacks a build for the node's format, falls back to the
1855
+ * step's PER-FORMAT default (tflite → the Coral SSD build), never to a bare
1856
+ * `defaultModelId` that may not ship the format at all.
1857
+ */
1839
1858
  /**
1840
1859
  * Balanced default object-detection model per accelerator class. `'cpu'` maps to
1841
1860
  * `null` → the caller substitutes the step's own `defaultModelId` (`yolo26n`).
@@ -2263,4 +2282,4 @@ var CustomModelCatalog = class {
2263
2282
  stepDefinition = (stepId) => mergedStepDefinition(stepId, this.byStep);
2264
2283
  };
2265
2284
  //#endregion
2266
- export { resolveModelDefaultConfidence as C, landmarkPrecisionVerdict as S, ALL_STEPS as _, stepsForElectedPool as a, getStepDefinition as b, OBJECT_DETECTION_STEP_ID as c, rootObjectGate as d, localFrameRegistry as f, ALL_PIPELINE_STEPS as g, resolveFrameViewGeometry as h, placeDetailStep as i, resolveDefaultDetectionModel as l, createSessionDecodeCoordinator as m, mergeCustomModels as n, deviceKeyOf as o, isSessionDecodeReadGone as p, buildSubtreeCanRun as r, resolveDeviceEngine as s, CustomModelCatalog as t, macroGateVerdict as u, getDefaultModelForFormat as v, resolveModelForFormat as x, getStep as y };
2285
+ export { resolveModelDefaultConfidence as S, getDefaultModelForFormat as _, stepsForElectedPool as a, resolveModelForFormat as b, resolveDefaultDetectionModel as c, localFrameRegistry as d, isSessionDecodeReadGone as f, ALL_STEPS as g, ALL_PIPELINE_STEPS as h, placeDetailStep as i, macroGateVerdict as l, resolveFrameViewGeometry as m, mergeCustomModels as n, deviceKeyOf as o, createSessionDecodeCoordinator as p, buildSubtreeCanRun as r, resolveDeviceEngine as s, CustomModelCatalog as t, rootObjectGate as u, getStep as v, landmarkPrecisionVerdict as x, getStepDefinition as y };