@camstack/addon-pipeline 1.1.56 → 1.1.57

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 (39) hide show
  1. package/dist/audio-analyzer/index.js +2 -2
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/detection-pipeline/index.js +71 -74
  4. package/dist/detection-pipeline/index.mjs +70 -73
  5. package/dist/{dist-ClE6_i0p.js → dist-CK8Ur-OS.js} +104 -6
  6. package/dist/{dist-CrjLGrkj.mjs → dist-CL531uVA.mjs} +104 -6
  7. package/dist/motion-wasm/index.js +9 -41
  8. package/dist/motion-wasm/index.mjs +9 -41
  9. package/dist/pipeline-runner/index.js +222 -656
  10. package/dist/pipeline-runner/index.mjs +211 -647
  11. package/dist/recorder/index.js +2 -2
  12. package/dist/recorder/index.mjs +2 -2
  13. package/dist/remote-restream-BeHi78PZ.mjs +25 -0
  14. package/dist/remote-restream-CO36Sr30.js +36 -0
  15. package/dist/{step-definitions-dCghpdRo.mjs → step-definitions-1d3_vQ6S.mjs} +44 -2
  16. package/dist/{step-definitions-C9kUXgC7.js → step-definitions-DHAxruAQ.js} +44 -2
  17. package/dist/stream-broker/_stub.js +282 -222
  18. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-D4xH4Tm-.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Cm_B-hQT.mjs} +1 -1
  19. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D2z_vRMH.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ba7Eyd47.mjs} +1 -1
  20. package/dist/stream-broker/{hostInit-Di9WUNlQ.mjs → hostInit-DEaqJpGA.mjs} +1 -1
  21. package/dist/stream-broker/index.js +877 -37
  22. package/dist/stream-broker/index.mjs +874 -34
  23. package/dist/stream-broker/remoteEntry.js +1 -1
  24. package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-Ca93F1js.js → MaskShapeCanvas-DI4BY7W2-CZUzu3MF.js} +1 -1
  25. package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-CDqgb-WA.js → MotionZonesSettings-NcxxQN8r-CmZbzLQi.js} +1 -1
  26. package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-BlxPhY_w.js → PrivacyMaskSettings-APgPLF7p-BOKDrH0N.js} +1 -1
  27. package/embed-dist/assets/{index-B23riUw8.js → index-DOsK8CZb.js} +10 -10
  28. package/embed-dist/index.html +1 -1
  29. package/package.json +7 -5
  30. package/python/inference_pool.py +172 -28
  31. package/python/postprocessors/__init__.py +2 -0
  32. package/python/postprocessors/ssd.py +128 -0
  33. package/python/requirements-edgetpu.txt +23 -0
  34. package/python/test_inference_pool_layout.py +16 -1
  35. package/python/test_inference_pool_preprocess.py +65 -0
  36. package/dist/remote-source-plane-B28iGi7h.mjs +0 -1001
  37. package/dist/remote-source-plane-BAqEHSgm.js +0 -1030
  38. package/dist/{model-download-service-C-IHWnXx-BPy6aoAx.mjs → model-download-service-C-IHWnXx-3Mmeob3l.mjs} +1 -1
  39. package/dist/{model-download-service-C-IHWnXx-BLXzxpRB.js → model-download-service-C-IHWnXx-D326YNnt.js} +1 -1
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("../chunk-D6vf50IK.js");
2
- const require_dist = require("../dist-ClE6_i0p.js");
2
+ const require_dist = require("../dist-CK8Ur-OS.js");
3
3
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
4
- const require_model_download_service_C_IHWnXx = require("../model-download-service-C-IHWnXx-BLXzxpRB.js");
4
+ const require_model_download_service_C_IHWnXx = require("../model-download-service-C-IHWnXx-D326YNnt.js");
5
5
  let node_child_process = require("node:child_process");
6
6
  let node_fs = require("node:fs");
7
7
  let node_path = require("node:path");
@@ -1,6 +1,6 @@
1
- import { A as recordingCapability, B as DeviceType, D as nodePin, I as errMsg, L as BaseAddon, M as storageEvictableCapability, T as migrateConfigToBands, U as hydrateSchema, V as EventCategory, Y as selectAssignedProfileSlots, at as record, ot as string, s as EVENT_PAD_MS, u as RecordingConfigSchema } from "../dist-CrjLGrkj.mjs";
1
+ import { A as recordingCapability, B as DeviceType, D as nodePin, I as errMsg, L as BaseAddon, M as storageEvictableCapability, T as migrateConfigToBands, U as hydrateSchema, V as EventCategory, Y as selectAssignedProfileSlots, at as record, ot as string, s as EVENT_PAD_MS, u as RecordingConfigSchema } from "../dist-CL531uVA.mjs";
2
2
  import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
3
- import { t as createFileDataPlaneHandler } from "../model-download-service-C-IHWnXx-BPy6aoAx.mjs";
3
+ import { t as createFileDataPlaneHandler } from "../model-download-service-C-IHWnXx-3Mmeob3l.mjs";
4
4
  import { spawn } from "node:child_process";
5
5
  import { promises } from "node:fs";
6
6
  import path from "node:path";
@@ -0,0 +1,25 @@
1
+ //#region src/pipeline-runner/remote-restream.ts
2
+ /**
3
+ * Runner-side mode selection (pure): whether an attach payload routes this
4
+ * camera through the remote-source leg. Absent `frameSource` (a pre-P2c
5
+ * payload) and `local-broker` both take the co-located broker path.
6
+ */
7
+ function isRemoteRestream(frameSource) {
8
+ return frameSource !== void 0 && frameSource.kind === "remote-restream";
9
+ }
10
+ /**
11
+ * Resolve WHICH broker profile a camStream id feeds for a device (pure).
12
+ *
13
+ * `getStreamWithCodec` targets a PROFILE (its assigned camStream), while the
14
+ * runner is dispatched with camStream ids (`motionStreamId` /
15
+ * `detectionStreamId`). The broker's profile slots carry the mapping
16
+ * (`sourceCamStreamId`); a stream no slot feeds returns `null` — the acquire
17
+ * fails fast and the caller's backoff retries (the assignment may still be
18
+ * propagating).
19
+ */
20
+ function profileForStreamId(slots, deviceId, streamId) {
21
+ for (const slot of slots) if (slot.deviceId === deviceId && slot.sourceCamStreamId === streamId) return slot.profile;
22
+ return null;
23
+ }
24
+ //#endregion
25
+ export { profileForStreamId as n, isRemoteRestream as t };
@@ -0,0 +1,36 @@
1
+ //#region src/pipeline-runner/remote-restream.ts
2
+ /**
3
+ * Runner-side mode selection (pure): whether an attach payload routes this
4
+ * camera through the remote-source leg. Absent `frameSource` (a pre-P2c
5
+ * payload) and `local-broker` both take the co-located broker path.
6
+ */
7
+ function isRemoteRestream(frameSource) {
8
+ return frameSource !== void 0 && frameSource.kind === "remote-restream";
9
+ }
10
+ /**
11
+ * Resolve WHICH broker profile a camStream id feeds for a device (pure).
12
+ *
13
+ * `getStreamWithCodec` targets a PROFILE (its assigned camStream), while the
14
+ * runner is dispatched with camStream ids (`motionStreamId` /
15
+ * `detectionStreamId`). The broker's profile slots carry the mapping
16
+ * (`sourceCamStreamId`); a stream no slot feeds returns `null` — the acquire
17
+ * fails fast and the caller's backoff retries (the assignment may still be
18
+ * propagating).
19
+ */
20
+ function profileForStreamId(slots, deviceId, streamId) {
21
+ for (const slot of slots) if (slot.deviceId === deviceId && slot.sourceCamStreamId === streamId) return slot.profile;
22
+ return null;
23
+ }
24
+ //#endregion
25
+ Object.defineProperty(exports, "isRemoteRestream", {
26
+ enumerable: true,
27
+ get: function() {
28
+ return isRemoteRestream;
29
+ }
30
+ });
31
+ Object.defineProperty(exports, "profileForStreamId", {
32
+ enumerable: true,
33
+ get: function() {
34
+ return profileForStreamId;
35
+ }
36
+ });
@@ -1,4 +1,4 @@
1
- import { S as hfModelUrl, a as COCO_TO_MACRO, i as COCO_80_LABELS, r as AUDIO_MACRO_LABELS } from "./dist-CrjLGrkj.mjs";
1
+ import { S as hfModelUrl, a as COCO_TO_MACRO, i as COCO_80_LABELS, r as AUDIO_MACRO_LABELS } from "./dist-CL531uVA.mjs";
2
2
  //#region src/detection-pipeline/registry/model-catalogs.ts
3
3
  var HF_REPO = "camstack/camstack-models";
4
4
  var HF_SCRYPTED = "scrypted/plugin-models";
@@ -341,6 +341,40 @@ var OBJECT_DETECTION_MODELS = [
341
341
  openvino: ovFormat(hf("objectDetection/yolo26/openvino/camstack-yolo26x.xml"), 213)
342
342
  }
343
343
  },
344
+ {
345
+ id: "ssd-mobilenet-v2-coco-edgetpu",
346
+ name: "SSD MobileNet V2 (Coral)",
347
+ description: "SSD MobileNet V2 COCO — EdgeTPU-compiled full-integer TFLite, 300×300; runs on the Coral USB Edge TPU (~11 ms/frame)",
348
+ inputSize: {
349
+ width: 300,
350
+ height: 300
351
+ },
352
+ labels: [],
353
+ preprocessMode: "letterbox",
354
+ postprocessor: "ssd",
355
+ formats: { tflite: {
356
+ url: "https://github.com/google-coral/test_data/raw/master/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite",
357
+ sizeMB: 6.6,
358
+ runtimes: ["python"]
359
+ } }
360
+ },
361
+ {
362
+ id: "efficientdet-lite0-edgetpu",
363
+ name: "EfficientDet-Lite0 (Coral)",
364
+ description: "EfficientDet-Lite0 COCO — EdgeTPU-compiled full-integer TFLite, 320×320; higher accuracy than SSD MobileNet on the Coral USB Edge TPU",
365
+ inputSize: {
366
+ width: 320,
367
+ height: 320
368
+ },
369
+ labels: [],
370
+ preprocessMode: "letterbox",
371
+ postprocessor: "ssd",
372
+ formats: { tflite: {
373
+ url: "https://github.com/google-coral/test_data/raw/master/efficientdet_lite0_320_ptq_edgetpu.tflite",
374
+ sizeMB: 5.7,
375
+ runtimes: ["python"]
376
+ } }
377
+ },
344
378
  {
345
379
  id: "scrypted-yolov9t-relu",
346
380
  legacy: true,
@@ -656,6 +690,7 @@ var PLATE_OCR_MODELS = [{
656
690
  width: 384,
657
691
  height: 64
658
692
  },
693
+ inputChannels: 1,
659
694
  labels: [{
660
695
  id: "text",
661
696
  name: "Plate Text"
@@ -1018,7 +1053,13 @@ var ANIMAL_10_LABELS = [
1018
1053
  "sheep",
1019
1054
  "spider"
1020
1055
  ];
1021
- var VGG_G2_CHARSET = ["", ..."0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("")];
1056
+ var VGG_G2_CHARSET = [
1057
+ "",
1058
+ ..."0123456789".split(""),
1059
+ ..."!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ".split(""),
1060
+ " ",
1061
+ ..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("")
1062
+ ];
1022
1063
  /**
1023
1064
  * Detail-subtree dispatch cadence a `PipelineStepBase` step gets when its
1024
1065
  * definition literal doesn't declare one explicitly. Conservative default
@@ -1056,6 +1097,7 @@ var ObjectDetectionStep = class {
1056
1097
  ],
1057
1098
  models: [...OBJECT_DETECTION_MODELS],
1058
1099
  defaultModelId: "yolo26n",
1100
+ defaultModelIdByFormat: { tflite: "ssd-mobilenet-v2-coco-edgetpu" },
1059
1101
  defaultConfidence: .5,
1060
1102
  labels: COCO_80_LABELS.map((l) => l.id),
1061
1103
  classMap: COCO_TO_MACRO
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-ClE6_i0p.js");
1
+ const require_dist = require("./dist-CK8Ur-OS.js");
2
2
  //#region src/detection-pipeline/registry/model-catalogs.ts
3
3
  var HF_REPO = "camstack/camstack-models";
4
4
  var HF_SCRYPTED = "scrypted/plugin-models";
@@ -341,6 +341,40 @@ var OBJECT_DETECTION_MODELS = [
341
341
  openvino: ovFormat(hf("objectDetection/yolo26/openvino/camstack-yolo26x.xml"), 213)
342
342
  }
343
343
  },
344
+ {
345
+ id: "ssd-mobilenet-v2-coco-edgetpu",
346
+ name: "SSD MobileNet V2 (Coral)",
347
+ description: "SSD MobileNet V2 COCO — EdgeTPU-compiled full-integer TFLite, 300×300; runs on the Coral USB Edge TPU (~11 ms/frame)",
348
+ inputSize: {
349
+ width: 300,
350
+ height: 300
351
+ },
352
+ labels: [],
353
+ preprocessMode: "letterbox",
354
+ postprocessor: "ssd",
355
+ formats: { tflite: {
356
+ url: "https://github.com/google-coral/test_data/raw/master/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite",
357
+ sizeMB: 6.6,
358
+ runtimes: ["python"]
359
+ } }
360
+ },
361
+ {
362
+ id: "efficientdet-lite0-edgetpu",
363
+ name: "EfficientDet-Lite0 (Coral)",
364
+ description: "EfficientDet-Lite0 COCO — EdgeTPU-compiled full-integer TFLite, 320×320; higher accuracy than SSD MobileNet on the Coral USB Edge TPU",
365
+ inputSize: {
366
+ width: 320,
367
+ height: 320
368
+ },
369
+ labels: [],
370
+ preprocessMode: "letterbox",
371
+ postprocessor: "ssd",
372
+ formats: { tflite: {
373
+ url: "https://github.com/google-coral/test_data/raw/master/efficientdet_lite0_320_ptq_edgetpu.tflite",
374
+ sizeMB: 5.7,
375
+ runtimes: ["python"]
376
+ } }
377
+ },
344
378
  {
345
379
  id: "scrypted-yolov9t-relu",
346
380
  legacy: true,
@@ -656,6 +690,7 @@ var PLATE_OCR_MODELS = [{
656
690
  width: 384,
657
691
  height: 64
658
692
  },
693
+ inputChannels: 1,
659
694
  labels: [{
660
695
  id: "text",
661
696
  name: "Plate Text"
@@ -1018,7 +1053,13 @@ var ANIMAL_10_LABELS = [
1018
1053
  "sheep",
1019
1054
  "spider"
1020
1055
  ];
1021
- var VGG_G2_CHARSET = ["", ..."0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("")];
1056
+ var VGG_G2_CHARSET = [
1057
+ "",
1058
+ ..."0123456789".split(""),
1059
+ ..."!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ".split(""),
1060
+ " ",
1061
+ ..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("")
1062
+ ];
1022
1063
  /**
1023
1064
  * Detail-subtree dispatch cadence a `PipelineStepBase` step gets when its
1024
1065
  * definition literal doesn't declare one explicitly. Conservative default
@@ -1056,6 +1097,7 @@ var ObjectDetectionStep = class {
1056
1097
  ],
1057
1098
  models: [...OBJECT_DETECTION_MODELS],
1058
1099
  defaultModelId: "yolo26n",
1100
+ defaultModelIdByFormat: { tflite: "ssd-mobilenet-v2-coco-edgetpu" },
1059
1101
  defaultConfidence: .5,
1060
1102
  labels: require_dist.COCO_80_LABELS.map((l) => l.id),
1061
1103
  classMap: require_dist.COCO_TO_MACRO