@camstack/addon-pipeline 1.2.333 → 1.2.334

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 (35) hide show
  1. package/THIRD_PARTY_MODELS.md +3 -8
  2. package/dist/audio-analyzer/index.js +2 -2
  3. package/dist/audio-analyzer/index.mjs +2 -2
  4. package/dist/{default-detection-model-Biwf5-ML.js → custom-model-catalog-CVeosmYm.js} +236 -165
  5. package/dist/{default-detection-model-CDffuH2m.mjs → custom-model-catalog-DoOVE7kz.mjs} +225 -166
  6. package/dist/detection-pipeline/index.js +70 -104
  7. package/dist/detection-pipeline/index.mjs +18 -52
  8. package/dist/{dist-DJV7Z6Bb.js → dist-C7v30DMP.js} +69 -22
  9. package/dist/{dist-BsT15i7i.mjs → dist-Dn3knu_K.mjs} +69 -22
  10. package/dist/motion-wasm/index.js +1 -1
  11. package/dist/motion-wasm/index.mjs +1 -1
  12. package/dist/{node-CkmucLYG.js → node-DWdekhW3.js} +1 -1
  13. package/dist/{node-Crsi_8ea.mjs → node-_BruMF4L.mjs} +1 -1
  14. package/dist/pipeline-runner/index.js +228 -42
  15. package/dist/pipeline-runner/index.mjs +206 -20
  16. package/dist/{process-memory-BJb7Ihdp.js → process-memory-CaDpfUdM.js} +1 -1
  17. package/dist/{process-memory-1mAUV8S1.mjs → process-memory-Dp-4bFOp.mjs} +1 -1
  18. package/dist/recorder/index.js +2 -2
  19. package/dist/recorder/index.mjs +2 -2
  20. package/dist/{segment-demux-js-B_tboBcJ.mjs → segment-demux-js-B_-zBECg.mjs} +1 -1
  21. package/dist/{segment-demux-js-mK9IBGLf.js → segment-demux-js-BqPTLFZG.js} +1 -1
  22. package/dist/stream-broker/_stub.js +1 -1
  23. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-a3HMFtd5.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BP8FFU2i.mjs} +2 -2
  24. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CpjKK9II.mjs +26 -0
  25. package/dist/stream-broker/demux-worker-child.js +1 -1
  26. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  27. package/dist/stream-broker/{hostInit-DChPnZ5C.mjs → hostInit-BEh-hm1x.mjs} +2 -2
  28. package/dist/stream-broker/index.js +3 -3
  29. package/dist/stream-broker/index.mjs +3 -3
  30. package/dist/stream-broker/remoteEntry.js +1 -1
  31. package/package.json +1 -1
  32. package/python/postprocessors/test_yolo_seg_root.py +109 -0
  33. package/python/postprocessors/yolo.py +52 -13
  34. package/python/postprocessors/yolo_seg.py +79 -156
  35. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DPbj3ML4.mjs +0 -26
@@ -12608,8 +12608,19 @@ var LABEL_SUPPLY_STEP_IDS = [
12608
12608
  ];
12609
12609
  /** Steps whose box a root detection can BE. */
12610
12610
  var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
12611
+ /**
12612
+ * Steps whose per-detection MASK a root detection can carry (D737). The live
12613
+ * mask step is `segmentation` — a frame-plane refiner that runs its own model
12614
+ * once per detection crop. (`instance-segmentation` is a dormant step id that
12615
+ * no camera tree carries.)
12616
+ */
12617
+ var MASK_SUPPLY_STEP_IDS = ["segmentation"];
12611
12618
  /** Every step a root model can supply. */
12612
- var ROOT_SUPPLIABLE_STEP_IDS = [...LABEL_SUPPLY_STEP_IDS, ...CROP_SUPPLY_STEP_IDS];
12619
+ var ROOT_SUPPLIABLE_STEP_IDS = [
12620
+ ...LABEL_SUPPLY_STEP_IDS,
12621
+ ...CROP_SUPPLY_STEP_IDS,
12622
+ ...MASK_SUPPLY_STEP_IDS
12623
+ ];
12613
12624
  /** Narrow a step id to a label-kind one. */
12614
12625
  function isLabelSupplyStepId(value) {
12615
12626
  return LABEL_SUPPLY_STEP_IDS.some((id) => id === value);
@@ -12690,7 +12701,12 @@ var CROP_SUPPLY_SOURCES = {
12690
12701
  * Whether an operator intends a step to take the root's output when the
12691
12702
  * root declares it — the default of the `useRootModel` flag. The label kinds
12692
12703
  * default ON: the detector's answer is the cheaper one and the classifier
12693
- * keeps its model for the day the root changes. The crop kinds default OFF: a
12704
+ * keeps its model for the day the root changes. The animal and vehicle
12705
+ * classifiers are also ENABLED by default (their catalog `enabledByDefault`,
12706
+ * D736), so out of the box a root that declares them names animals and
12707
+ * vehicles and a root that does not runs the classifier; `package-detection`
12708
+ * stays zone-driven and takes this default whenever a zone switches it on.
12709
+ * The crop kinds default OFF: a
12694
12710
  * root plate box has an uncalibrated OCR margin, and root-face refinement has
12695
12711
  * not run on live traffic yet.
12696
12712
  */
@@ -12699,7 +12715,8 @@ var USE_ROOT_MODEL_DEFAULTS = {
12699
12715
  "vehicle-classifier": true,
12700
12716
  "package-detection": true,
12701
12717
  "plate-detection": false,
12702
- "face-detection": false
12718
+ "face-detection": false,
12719
+ segmentation: true
12703
12720
  };
12704
12721
  /** The step-settings key the flag is stored under (DeviceStepConfig.settings, camera overrides). */
12705
12722
  var USE_ROOT_MODEL_SETTING_KEY = "useRootModel";
@@ -12776,13 +12793,32 @@ function deriveRootSupplies(labels, classMap) {
12776
12793
  return supplies;
12777
12794
  }
12778
12795
  /**
12796
+ * The decodes that emit an instance mask with every detection — a fact of the
12797
+ * model's OUTPUT, read from its postprocessor (`yolo-seg`: per-instance mask
12798
+ * coefficients times the prototype masks), never assumed per family.
12799
+ */
12800
+ var MASK_EMITTING_POSTPROCESSORS = ["yolo-seg"];
12801
+ /**
12802
+ * The mask supplies a root declares from its decode: `segmentation` when the
12803
+ * postprocessor emits a mask per detection, nothing otherwise.
12804
+ */
12805
+ function deriveMaskSupplies(postprocessor) {
12806
+ if (postprocessor === void 0 || !MASK_EMITTING_POSTPROCESSORS.includes(postprocessor)) return [];
12807
+ return MASK_SUPPLY_STEP_IDS.map((stepId) => ({
12808
+ kind: "mask",
12809
+ stepId
12810
+ }));
12811
+ }
12812
+ /**
12779
12813
  * The supplies a root model declares. A row registered with a declaration
12780
12814
  * carries it (`suppliesSteps`, computed at import from the model's own
12781
12815
  * labelmap); a row without one — a built-in entry, or a custom row registered
12782
12816
  * before the field existed — is derived here, on read, from the same inputs.
12783
12817
  */
12784
12818
  function rootSuppliesOf(entry, stepDefaults) {
12785
- const declared = entry?.suppliesSteps ?? deriveRootSupplies(entry !== void 0 && entry.labels.length > 0 ? entry.labels.map((l) => l.id) : stepDefaults.labels, entry?.classMap ?? stepDefaults.classMap);
12819
+ const fromLabels = entry?.suppliesSteps ?? deriveRootSupplies(entry !== void 0 && entry.labels.length > 0 ? entry.labels.map((l) => l.id) : stepDefaults.labels, entry?.classMap ?? stepDefaults.classMap);
12820
+ const masks = deriveMaskSupplies(entry?.postprocessor).filter((m) => !fromLabels.some((s) => s.stepId === m.stepId));
12821
+ const declared = masks.length > 0 ? [...fromLabels, ...masks] : fromLabels;
12786
12822
  const inputPx = entry !== void 0 ? Math.min(entry.inputSize.width, entry.inputSize.height) : void 0;
12787
12823
  if (inputPx === void 0) return declared;
12788
12824
  return declared.map((s) => s.kind === "crop" ? {
@@ -13019,25 +13055,36 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
13019
13055
  * - `crop`: the root draws the box the step would have found (`license_plate`
13020
13056
  * for plate-detection, `face` for face-detection). The box becomes a detail
13021
13057
  * child of the `parentMacro` detection that contains it — never a track.
13058
+ * - `mask`: the root's decode emits an instance mask with every detection (a
13059
+ * YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
13060
+ * detection in the shape that step produces. Derived from the model's
13061
+ * postprocessor on read, never stored by an import.
13022
13062
  */
13023
- var RootStepSupplySchema = discriminatedUnion("kind", [object({
13024
- kind: literal("label"),
13025
- stepId: _enum(LABEL_SUPPLY_STEP_IDS),
13026
- labelToEffect: record(string(), string()),
13027
- uncovered: array(string()).readonly()
13028
- }), object({
13029
- kind: literal("crop"),
13030
- stepId: _enum(CROP_SUPPLY_STEP_IDS),
13031
- rootLabels: array(string()).readonly(),
13032
- parentMacro: _enum(["vehicle", "person"]),
13033
- childClass: _enum(["plate", "face"]),
13034
- /**
13035
- * The root's smaller input side, stamped on read by `rootSuppliesOf` from
13036
- * the model entry — what a step's `minRootInputPx` gate judges. Never
13037
- * stored by an import.
13038
- */
13039
- rootInputPx: number().int().positive().optional()
13040
- })]);
13063
+ var RootStepSupplySchema = discriminatedUnion("kind", [
13064
+ object({
13065
+ kind: literal("label"),
13066
+ stepId: _enum(LABEL_SUPPLY_STEP_IDS),
13067
+ labelToEffect: record(string(), string()),
13068
+ uncovered: array(string()).readonly()
13069
+ }),
13070
+ object({
13071
+ kind: literal("crop"),
13072
+ stepId: _enum(CROP_SUPPLY_STEP_IDS),
13073
+ rootLabels: array(string()).readonly(),
13074
+ parentMacro: _enum(["vehicle", "person"]),
13075
+ childClass: _enum(["plate", "face"]),
13076
+ /**
13077
+ * The root's smaller input side, stamped on read by `rootSuppliesOf` from
13078
+ * the model entry — what a step's `minRootInputPx` gate judges. Never
13079
+ * stored by an import.
13080
+ */
13081
+ rootInputPx: number().int().positive().optional()
13082
+ }),
13083
+ object({
13084
+ kind: literal("mask"),
13085
+ stepId: _enum(MASK_SUPPLY_STEP_IDS)
13086
+ })
13087
+ ]);
13041
13088
  var ModelCatalogEntrySchema = object({
13042
13089
  id: string(),
13043
13090
  name: string(),
@@ -12608,8 +12608,19 @@ var LABEL_SUPPLY_STEP_IDS = [
12608
12608
  ];
12609
12609
  /** Steps whose box a root detection can BE. */
12610
12610
  var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
12611
+ /**
12612
+ * Steps whose per-detection MASK a root detection can carry (D737). The live
12613
+ * mask step is `segmentation` — a frame-plane refiner that runs its own model
12614
+ * once per detection crop. (`instance-segmentation` is a dormant step id that
12615
+ * no camera tree carries.)
12616
+ */
12617
+ var MASK_SUPPLY_STEP_IDS = ["segmentation"];
12611
12618
  /** Every step a root model can supply. */
12612
- var ROOT_SUPPLIABLE_STEP_IDS = [...LABEL_SUPPLY_STEP_IDS, ...CROP_SUPPLY_STEP_IDS];
12619
+ var ROOT_SUPPLIABLE_STEP_IDS = [
12620
+ ...LABEL_SUPPLY_STEP_IDS,
12621
+ ...CROP_SUPPLY_STEP_IDS,
12622
+ ...MASK_SUPPLY_STEP_IDS
12623
+ ];
12613
12624
  /** Narrow a step id to a label-kind one. */
12614
12625
  function isLabelSupplyStepId(value) {
12615
12626
  return LABEL_SUPPLY_STEP_IDS.some((id) => id === value);
@@ -12690,7 +12701,12 @@ var CROP_SUPPLY_SOURCES = {
12690
12701
  * Whether an operator intends a step to take the root's output when the
12691
12702
  * root declares it — the default of the `useRootModel` flag. The label kinds
12692
12703
  * default ON: the detector's answer is the cheaper one and the classifier
12693
- * keeps its model for the day the root changes. The crop kinds default OFF: a
12704
+ * keeps its model for the day the root changes. The animal and vehicle
12705
+ * classifiers are also ENABLED by default (their catalog `enabledByDefault`,
12706
+ * D736), so out of the box a root that declares them names animals and
12707
+ * vehicles and a root that does not runs the classifier; `package-detection`
12708
+ * stays zone-driven and takes this default whenever a zone switches it on.
12709
+ * The crop kinds default OFF: a
12694
12710
  * root plate box has an uncalibrated OCR margin, and root-face refinement has
12695
12711
  * not run on live traffic yet.
12696
12712
  */
@@ -12699,7 +12715,8 @@ var USE_ROOT_MODEL_DEFAULTS = {
12699
12715
  "vehicle-classifier": true,
12700
12716
  "package-detection": true,
12701
12717
  "plate-detection": false,
12702
- "face-detection": false
12718
+ "face-detection": false,
12719
+ segmentation: true
12703
12720
  };
12704
12721
  /** The step-settings key the flag is stored under (DeviceStepConfig.settings, camera overrides). */
12705
12722
  var USE_ROOT_MODEL_SETTING_KEY = "useRootModel";
@@ -12776,13 +12793,32 @@ function deriveRootSupplies(labels, classMap) {
12776
12793
  return supplies;
12777
12794
  }
12778
12795
  /**
12796
+ * The decodes that emit an instance mask with every detection — a fact of the
12797
+ * model's OUTPUT, read from its postprocessor (`yolo-seg`: per-instance mask
12798
+ * coefficients times the prototype masks), never assumed per family.
12799
+ */
12800
+ var MASK_EMITTING_POSTPROCESSORS = ["yolo-seg"];
12801
+ /**
12802
+ * The mask supplies a root declares from its decode: `segmentation` when the
12803
+ * postprocessor emits a mask per detection, nothing otherwise.
12804
+ */
12805
+ function deriveMaskSupplies(postprocessor) {
12806
+ if (postprocessor === void 0 || !MASK_EMITTING_POSTPROCESSORS.includes(postprocessor)) return [];
12807
+ return MASK_SUPPLY_STEP_IDS.map((stepId) => ({
12808
+ kind: "mask",
12809
+ stepId
12810
+ }));
12811
+ }
12812
+ /**
12779
12813
  * The supplies a root model declares. A row registered with a declaration
12780
12814
  * carries it (`suppliesSteps`, computed at import from the model's own
12781
12815
  * labelmap); a row without one — a built-in entry, or a custom row registered
12782
12816
  * before the field existed — is derived here, on read, from the same inputs.
12783
12817
  */
12784
12818
  function rootSuppliesOf(entry, stepDefaults) {
12785
- const declared = entry?.suppliesSteps ?? deriveRootSupplies(entry !== void 0 && entry.labels.length > 0 ? entry.labels.map((l) => l.id) : stepDefaults.labels, entry?.classMap ?? stepDefaults.classMap);
12819
+ const fromLabels = entry?.suppliesSteps ?? deriveRootSupplies(entry !== void 0 && entry.labels.length > 0 ? entry.labels.map((l) => l.id) : stepDefaults.labels, entry?.classMap ?? stepDefaults.classMap);
12820
+ const masks = deriveMaskSupplies(entry?.postprocessor).filter((m) => !fromLabels.some((s) => s.stepId === m.stepId));
12821
+ const declared = masks.length > 0 ? [...fromLabels, ...masks] : fromLabels;
12786
12822
  const inputPx = entry !== void 0 ? Math.min(entry.inputSize.width, entry.inputSize.height) : void 0;
12787
12823
  if (inputPx === void 0) return declared;
12788
12824
  return declared.map((s) => s.kind === "crop" ? {
@@ -13019,25 +13055,36 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
13019
13055
  * - `crop`: the root draws the box the step would have found (`license_plate`
13020
13056
  * for plate-detection, `face` for face-detection). The box becomes a detail
13021
13057
  * child of the `parentMacro` detection that contains it — never a track.
13058
+ * - `mask`: the root's decode emits an instance mask with every detection (a
13059
+ * YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
13060
+ * detection in the shape that step produces. Derived from the model's
13061
+ * postprocessor on read, never stored by an import.
13022
13062
  */
13023
- var RootStepSupplySchema = discriminatedUnion("kind", [object({
13024
- kind: literal("label"),
13025
- stepId: _enum(LABEL_SUPPLY_STEP_IDS),
13026
- labelToEffect: record(string(), string()),
13027
- uncovered: array(string()).readonly()
13028
- }), object({
13029
- kind: literal("crop"),
13030
- stepId: _enum(CROP_SUPPLY_STEP_IDS),
13031
- rootLabels: array(string()).readonly(),
13032
- parentMacro: _enum(["vehicle", "person"]),
13033
- childClass: _enum(["plate", "face"]),
13034
- /**
13035
- * The root's smaller input side, stamped on read by `rootSuppliesOf` from
13036
- * the model entry — what a step's `minRootInputPx` gate judges. Never
13037
- * stored by an import.
13038
- */
13039
- rootInputPx: number().int().positive().optional()
13040
- })]);
13063
+ var RootStepSupplySchema = discriminatedUnion("kind", [
13064
+ object({
13065
+ kind: literal("label"),
13066
+ stepId: _enum(LABEL_SUPPLY_STEP_IDS),
13067
+ labelToEffect: record(string(), string()),
13068
+ uncovered: array(string()).readonly()
13069
+ }),
13070
+ object({
13071
+ kind: literal("crop"),
13072
+ stepId: _enum(CROP_SUPPLY_STEP_IDS),
13073
+ rootLabels: array(string()).readonly(),
13074
+ parentMacro: _enum(["vehicle", "person"]),
13075
+ childClass: _enum(["plate", "face"]),
13076
+ /**
13077
+ * The root's smaller input side, stamped on read by `rootSuppliesOf` from
13078
+ * the model entry — what a step's `minRootInputPx` gate judges. Never
13079
+ * stored by an import.
13080
+ */
13081
+ rootInputPx: number().int().positive().optional()
13082
+ }),
13083
+ object({
13084
+ kind: literal("mask"),
13085
+ stepId: _enum(MASK_SUPPLY_STEP_IDS)
13086
+ })
13087
+ ]);
13041
13088
  var ModelCatalogEntrySchema = object({
13042
13089
  id: string(),
13043
13090
  name: string(),
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-DJV7Z6Bb.js");
5
+ const require_dist = require("../dist-C7v30DMP.js");
6
6
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Nn as hydrateSchema, Rt as motionDetectionCapability, Sn as DeviceType, Tn as BaseAddon, ht as evaluateZoneRules } from "../dist-BsT15i7i.mjs";
1
+ import { Nn as hydrateSchema, Rt as motionDetectionCapability, Sn as DeviceType, Tn as BaseAddon, ht as evaluateZoneRules } from "../dist-Dn3knu_K.mjs";
2
2
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
- const require_dist = require("./dist-DJV7Z6Bb.js");
2
+ const require_dist = require("./dist-C7v30DMP.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_fs = require("node:fs");
5
5
  node_fs = require_chunk.__toESM(node_fs, 1);
@@ -1,4 +1,4 @@
1
- import { Cn as errMsg, _n as buildFfmpegArgs, bn as isSoftwareDecode, gn as Fmp4BoxSplitter } from "./dist-BsT15i7i.mjs";
1
+ import { Cn as errMsg, _n as buildFfmpegArgs, bn as isSoftwareDecode, gn as Fmp4BoxSplitter } from "./dist-Dn3knu_K.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { realpathSync } from "node:fs";
4
4
  import path from "node:path";