@camstack/addon-pipeline 1.2.622 → 1.2.624

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 (41) 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-CKCK-QcT.js → custom-model-catalog-6zwaRe6H.js} +24 -11
  4. package/dist/{custom-model-catalog-wpMi2U7e.mjs → custom-model-catalog-Dx6W1kAo.mjs} +24 -5
  5. package/dist/detection-pipeline/index.js +16 -6
  6. package/dist/detection-pipeline/index.mjs +16 -6
  7. package/dist/{dist-DUFGDd_2.js → dist-63VVVhpw.js} +1371 -240
  8. package/dist/{dist-BF60SjmI.mjs → dist-BK3z-nti.mjs} +1311 -240
  9. package/dist/{model-catalogs-CqFDhb0B.mjs → model-catalogs-CllYj2Q2.mjs} +1 -1
  10. package/dist/{model-catalogs-CjTm_0O-.js → model-catalogs-DyOMg-xZ.js} +1 -1
  11. package/dist/motion-wasm/index.js +1 -1
  12. package/dist/motion-wasm/index.mjs +1 -1
  13. package/dist/{node-DkphOOM2.mjs → node-BAcWHimZ.mjs} +2 -2
  14. package/dist/{node-DzGVn7bD.js → node-DdaBnHEq.js} +2 -2
  15. package/dist/pipeline-runner/index.js +101 -460
  16. package/dist/pipeline-runner/index.mjs +94 -453
  17. package/dist/{process-memory-8kKexHYR.js → process-memory-CUlknrLl.js} +1 -1
  18. package/dist/{process-memory-CBzfdSvC.mjs → process-memory-OZwib1pK.mjs} +1 -1
  19. package/dist/recorder/index.js +21 -2
  20. package/dist/recorder/index.mjs +21 -2
  21. package/dist/{segment-demux-js-DQNoNSJt.mjs → segment-demux-js-C3rhCLCG.mjs} +1 -1
  22. package/dist/{segment-demux-js-DRLQb1pc.js → segment-demux-js-WNlg0SXP.js} +1 -1
  23. package/dist/stream-broker/_stub.js +2 -2
  24. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BmANAxAe.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Di7t7N3r.mjs} +2 -2
  25. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DDRGMoJ1.mjs +26 -0
  26. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CPQe09h1.mjs +26 -0
  27. package/dist/stream-broker/demux-worker-child.js +1 -1
  28. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  29. package/dist/stream-broker/{hostInit-B3hXAfr1.mjs → hostInit-CMDvBrqv.mjs} +2 -2
  30. package/dist/stream-broker/index.js +4 -4
  31. package/dist/stream-broker/index.mjs +4 -4
  32. package/dist/stream-broker/remoteEntry.js +1 -1
  33. package/package.json +1 -1
  34. package/python/accelerator_facts.py +275 -0
  35. package/python/inference_pool.py +19 -2
  36. package/python/postprocessors/ssd.py +12 -4
  37. package/python/postprocessors/test_ssd.py +64 -0
  38. package/python/test_accelerator_facts.py +105 -0
  39. package/python/webgpu_isolated.py +19 -0
  40. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-H6RKsaiZ.mjs +0 -26
  41. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CNoWeZHH.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-DUFGDd_2.js");
7
- const require_model_catalogs = require("../model-catalogs-CjTm_0O-.js");
8
- const require_process_memory = require("../process-memory-8kKexHYR.js");
6
+ const require_dist = require("../dist-63VVVhpw.js");
7
+ const require_model_catalogs = require("../model-catalogs-DyOMg-xZ.js");
8
+ const require_process_memory = require("../process-memory-CUlknrLl.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, $n as nodePin, Bn as audioChunkBytesPerSample, Bt as mapAudioLabelToMacro, F as PoolMemoryWatchdog, Fn as BaseAddon, Gn as expandAudioChunkToF32le, Nn as errMsg, Q as audioAnalysisCapability, gr as EventCategory, h as DEFAULT_AUDIO_ANALYZER_CONFIG, qn as hydrateSchema, r as AUDIO_BACKEND_CHOICES, un as resolvePoolMemoryPolicy } from "../dist-BF60SjmI.mjs";
3
- import { n as AUDIO_CLASSIFIER_MODELS } from "../model-catalogs-CqFDhb0B.mjs";
4
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-CBzfdSvC.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-BK3z-nti.mjs";
3
+ import { n as AUDIO_CLASSIFIER_MODELS } from "../model-catalogs-CllYj2Q2.mjs";
4
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-OZwib1pK.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,5 +1,5 @@
1
- const require_dist = require("./dist-DUFGDd_2.js");
2
- const require_model_catalogs = require("./model-catalogs-CjTm_0O-.js");
1
+ const require_dist = require("./dist-63VVVhpw.js");
2
+ const require_model_catalogs = require("./model-catalogs-DyOMg-xZ.js");
3
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
@@ -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,5 +1,5 @@
1
- import { Pt as inferModelProvider, b as DEVICE_BACKEND_TO_FORMAT, et as audioKindId, f as COCO_80_LABELS, gn as stepModelRunsOnFormat, i as AUDIO_MACRO_LABELS, k as LABEL_SUPPLY_VOCABULARIES, p as COCO_TO_MACRO } from "./dist-BF60SjmI.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-CqFDhb0B.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-BK3z-nti.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-CllYj2Q2.mjs";
3
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
@@ -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 };
@@ -3,11 +3,11 @@ 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-DUFGDd_2.js");
7
- const require_node = require("../node-DzGVn7bD.js");
8
- const require_custom_model_catalog = require("../custom-model-catalog-CKCK-QcT.js");
6
+ const require_dist = require("../dist-63VVVhpw.js");
7
+ const require_node = require("../node-DdaBnHEq.js");
8
+ const require_custom_model_catalog = require("../custom-model-catalog-6zwaRe6H.js");
9
9
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
10
- const require_process_memory = require("../process-memory-8kKexHYR.js");
10
+ const require_process_memory = require("../process-memory-CUlknrLl.js");
11
11
  let node_os = require("node:os");
12
12
  node_os = require_chunk.__toESM(node_os);
13
13
  let node_fs = require("node:fs");
@@ -3075,6 +3075,14 @@ var PipelineModelManager = class {
3075
3075
  }
3076
3076
  };
3077
3077
  //#endregion
3078
+ //#region src/detection-pipeline/engine/labels-for-decoder.ts
3079
+ /** Labels forwarded to the Python pool — SSD stock Coral keeps COCO-90 in Python. */
3080
+ function labelsForDecoder(postprocessor, modelLabels, stepLabels) {
3081
+ if (modelLabels !== void 0 && modelLabels.length > 0) return modelLabels;
3082
+ if (postprocessor === "ssd") return;
3083
+ return stepLabels;
3084
+ }
3085
+ //#endregion
3078
3086
  //#region src/detection-pipeline/engine/coral-cocompiled-set.ts
3079
3087
  var ROOT_DETECTOR_STEP_ID = "object-detection";
3080
3088
  /** The models a dispatch places on the pool that runs it: every enabled video step. */
@@ -3759,7 +3767,9 @@ function buildPoolModelConfigForStep(inputs) {
3759
3767
  const inputSize = Math.max(inputWidth, inputHeight);
3760
3768
  const inputChannels = modelEntry.inputChannels ?? 3;
3761
3769
  const entryLabels = modelEntry.labels.length > 0 ? modelEntry.labels.map((l) => l.id) : void 0;
3762
- const labels = readModelLabels(modelsDir, modelEntry) ?? entryLabels ?? def.labels;
3770
+ const modelLabels = readModelLabels(modelsDir, modelEntry) ?? entryLabels;
3771
+ const effectivePostprocessor = resolveEffectivePostprocessorForEntry(def, modelEntry);
3772
+ const labels = labelsForDecoder(effectivePostprocessor, modelLabels, def.labels);
3763
3773
  return {
3764
3774
  path: modelPath,
3765
3775
  inputSize,
@@ -3770,7 +3780,7 @@ function buildPoolModelConfigForStep(inputs) {
3770
3780
  inputNormalization: modelEntry.inputNormalization,
3771
3781
  outputProbabilities: modelEntry.outputProbabilities,
3772
3782
  ...modelEntry.gpuInferencePrecision !== void 0 ? { gpuInferencePrecision: modelEntry.gpuInferencePrecision } : {},
3773
- postprocessor: resolveEffectivePostprocessorForEntry(def, modelEntry),
3783
+ postprocessor: effectivePostprocessor,
3774
3784
  confidence: resolvePoolConfidenceFloor(stepId, require_custom_model_catalog.resolveModelDefaultConfidence(def, modelEntry)),
3775
3785
  nmsIouThreshold: resolvePoolDecodeSettings({
3776
3786
  def,
@@ -1,9 +1,9 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { $n as nodePin, Ct as enumerateInferenceDevices, F as PoolMemoryWatchdog, Fn as BaseAddon, It as linkedLabelStepId, Kn as hfModelUrl, Nn as errMsg, O as LABEL_SUPPLY_MACRO, Qt as pipelineExecutorCapability, Rt as loadContributionCapability, Vn as createEvent, X as applyModelBoundSettings, Yt as pickClusterStepSettings, _t as detectionPipelineCapability, an as resolveClusterStepModelId, ar as array, bt as edgetpuDelegateDevice, ct as containingParentIndex, d as CLUSTER_MODEL_SCOPED_STEPS, dr as object, ft as defaultDeviceFor$1, g as DEFAULT_CLUSTER_STEP_SETTINGS, gn as stepModelRunsOnFormat, gr as EventCategory, hr as union, mn as runtimeDevices$1, mr as string, n as APPLE_SA_TO_MACRO, nr as sleep, pn as rootSuppliesOf, q as YAMNET_TO_MACRO, qn as hydrateSchema, qt as overlayClusterStepSettings, st as collectModelBoundKeys, un as resolvePoolMemoryPolicy, wt as evaluateZoneRules, xn as supportedRuntimes$1 } from "../dist-BF60SjmI.mjs";
3
- import { c as readProcessCost } from "../node-DkphOOM2.mjs";
4
- import { C as resolveModelDefaultConfidence, S as landmarkPrecisionVerdict, _ as ALL_STEPS, b as getStepDefinition, f as localFrameRegistry, g as ALL_PIPELINE_STEPS, l as resolveDefaultDetectionModel, n as mergeCustomModels, o as deviceKeyOf, r as buildSubtreeCanRun, s as resolveDeviceEngine, t as CustomModelCatalog, u as macroGateVerdict, v as getDefaultModelForFormat, x as resolveModelForFormat, y as getStep } from "../custom-model-catalog-wpMi2U7e.mjs";
2
+ import { $ as applyModelBoundSettings, Cn as runtimeDevices$1, Dt as enumerateInferenceDevices, En as stepModelRunsOnFormat, Er as EventCategory, Gn as BaseAddon, I as PoolMemoryWatchdog, O as LABEL_SUPPLY_MACRO, Ot as evaluateZoneRules, Qt as overlayClusterStepSettings, Sn as rootSuppliesOf, Tr as union, Un as errMsg, Ut as loadContributionCapability, Vt as linkedLabelStepId, Y as YAMNET_TO_MACRO, Zn as createEvent, d as CLUSTER_MODEL_SCOPED_STEPS, dt as containingParentIndex, en as pickClusterStepSettings, fr as sleep, g as DEFAULT_CLUSTER_STEP_SETTINGS, gt as defaultDeviceFor$1, hr as array, jn as supportedRuntimes$1, lr as nodePin, mn as resolveClusterStepModelId, n as APPLE_SA_TO_MACRO, nr as hfModelUrl, rn as pipelineExecutorCapability, rr as hydrateSchema, ut as collectModelBoundKeys, wr as string, wt as edgetpuDelegateDevice, xr as object, xt as detectionPipelineCapability, yn as resolvePoolMemoryPolicy } from "../dist-BK3z-nti.mjs";
3
+ import { c as readProcessCost } from "../node-BAcWHimZ.mjs";
4
+ import { S as resolveModelDefaultConfidence, _ as getDefaultModelForFormat, b as resolveModelForFormat, c as resolveDefaultDetectionModel, d as localFrameRegistry, g as ALL_STEPS, h as ALL_PIPELINE_STEPS, l as macroGateVerdict, n as mergeCustomModels, o as deviceKeyOf, r as buildSubtreeCanRun, s as resolveDeviceEngine, t as CustomModelCatalog, v as getStep, x as landmarkPrecisionVerdict, y as getStepDefinition } from "../custom-model-catalog-Dx6W1kAo.mjs";
5
5
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
6
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-CBzfdSvC.mjs";
6
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-OZwib1pK.mjs";
7
7
  import * as os$1 from "node:os";
8
8
  import * as fs from "node:fs";
9
9
  import * as path$1 from "node:path";
@@ -3068,6 +3068,14 @@ var PipelineModelManager = class {
3068
3068
  }
3069
3069
  };
3070
3070
  //#endregion
3071
+ //#region src/detection-pipeline/engine/labels-for-decoder.ts
3072
+ /** Labels forwarded to the Python pool — SSD stock Coral keeps COCO-90 in Python. */
3073
+ function labelsForDecoder(postprocessor, modelLabels, stepLabels) {
3074
+ if (modelLabels !== void 0 && modelLabels.length > 0) return modelLabels;
3075
+ if (postprocessor === "ssd") return;
3076
+ return stepLabels;
3077
+ }
3078
+ //#endregion
3071
3079
  //#region src/detection-pipeline/engine/coral-cocompiled-set.ts
3072
3080
  var ROOT_DETECTOR_STEP_ID = "object-detection";
3073
3081
  /** The models a dispatch places on the pool that runs it: every enabled video step. */
@@ -3752,7 +3760,9 @@ function buildPoolModelConfigForStep(inputs) {
3752
3760
  const inputSize = Math.max(inputWidth, inputHeight);
3753
3761
  const inputChannels = modelEntry.inputChannels ?? 3;
3754
3762
  const entryLabels = modelEntry.labels.length > 0 ? modelEntry.labels.map((l) => l.id) : void 0;
3755
- const labels = readModelLabels(modelsDir, modelEntry) ?? entryLabels ?? def.labels;
3763
+ const modelLabels = readModelLabels(modelsDir, modelEntry) ?? entryLabels;
3764
+ const effectivePostprocessor = resolveEffectivePostprocessorForEntry(def, modelEntry);
3765
+ const labels = labelsForDecoder(effectivePostprocessor, modelLabels, def.labels);
3756
3766
  return {
3757
3767
  path: modelPath,
3758
3768
  inputSize,
@@ -3763,7 +3773,7 @@ function buildPoolModelConfigForStep(inputs) {
3763
3773
  inputNormalization: modelEntry.inputNormalization,
3764
3774
  outputProbabilities: modelEntry.outputProbabilities,
3765
3775
  ...modelEntry.gpuInferencePrecision !== void 0 ? { gpuInferencePrecision: modelEntry.gpuInferencePrecision } : {},
3766
- postprocessor: resolveEffectivePostprocessorForEntry(def, modelEntry),
3776
+ postprocessor: effectivePostprocessor,
3767
3777
  confidence: resolvePoolConfidenceFloor(stepId, resolveModelDefaultConfidence(def, modelEntry)),
3768
3778
  nmsIouThreshold: resolvePoolDecodeSettings({
3769
3779
  def,