@camstack/addon-pipeline 1.1.55 → 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 (46) 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 +92 -88
  4. package/dist/detection-pipeline/index.mjs +91 -87
  5. package/dist/{dist-DI57FC8K.js → dist-CK8Ur-OS.js} +1045 -43
  6. package/dist/{dist-RWGGPwVx.mjs → dist-CL531uVA.mjs} +1045 -43
  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 +338 -664
  10. package/dist/pipeline-runner/index.mjs +327 -655
  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/session-decode/decode-worker-child.js +5 -3
  16. package/dist/session-decode/decode-worker-child.mjs +5 -3
  17. package/dist/{step-definitions-CP9kVSml.mjs → step-definitions-1d3_vQ6S.mjs} +45 -3
  18. package/dist/{step-definitions-CNBFKjZe.js → step-definitions-DHAxruAQ.js} +45 -3
  19. package/dist/stream-broker/_stub.js +351 -291
  20. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-mDCPzmT3.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Cm_B-hQT.mjs} +2 -2
  21. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ba7Eyd47.mjs +26 -0
  22. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Dn_pxzP-.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-TWCUWhCm.mjs} +2 -2
  23. package/dist/stream-broker/{hostInit-GM_CI22k.mjs → hostInit-DEaqJpGA.mjs} +2 -2
  24. package/dist/stream-broker/index.js +935 -38
  25. package/dist/stream-broker/index.mjs +932 -35
  26. package/dist/stream-broker/remoteEntry.js +1 -1
  27. package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-BChW0ntM.js → MaskShapeCanvas-DI4BY7W2-CZUzu3MF.js} +1 -1
  28. package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-DDzqEbSe.js → MotionZonesSettings-NcxxQN8r-CmZbzLQi.js} +1 -1
  29. package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-B879GXaf.js → PrivacyMaskSettings-APgPLF7p-BOKDrH0N.js} +1 -1
  30. package/embed-dist/assets/index-Bmpl9O1K.css +2 -0
  31. package/embed-dist/assets/index-DOsK8CZb.js +81 -0
  32. package/embed-dist/index.html +2 -2
  33. package/package.json +7 -5
  34. package/python/inference_pool.py +183 -29
  35. package/python/postprocessors/__init__.py +2 -0
  36. package/python/postprocessors/ssd.py +128 -0
  37. package/python/requirements-edgetpu.txt +23 -0
  38. package/python/test_inference_pool_layout.py +16 -1
  39. package/python/test_inference_pool_preprocess.py +65 -0
  40. package/dist/remote-source-plane-CHgvzzA6.js +0 -1030
  41. package/dist/remote-source-plane-DU0aRSPv.mjs +0 -1001
  42. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B3gTdHEh.mjs +0 -26
  43. package/embed-dist/assets/index-CC06JBcl.css +0 -2
  44. package/embed-dist/assets/index-CNjQ5rAE.js +0 -81
  45. package/dist/{model-download-service-C-IHWnXx-BPy6aoAx.mjs → model-download-service-C-IHWnXx-3Mmeob3l.mjs} +1 -1
  46. 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-DI57FC8K.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-RWGGPwVx.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
+ });
@@ -956,8 +956,9 @@ var DecodeWorkerChild = class {
956
956
  const uSlice = uPlane.subarray(region.top / 2 * cStride + region.left / 2);
957
957
  const vSlice = vPlane.subarray(region.top / 2 * cStride + region.left / 2);
958
958
  const scaler = this.ensureNativeCropScaler(nav, C, region.width, region.height, target.width, target.height);
959
- const dstStride = target.width * 3;
960
- const dstBuffer = Buffer.allocUnsafe(dstStride * target.height);
959
+ const tightStride = target.width * 3;
960
+ const dstStride = tightStride + 63 & -64;
961
+ const dstBuffer = Buffer.allocUnsafe(dstStride * target.height + 64);
961
962
  const scaledHeight = scaler.scaleSync([
962
963
  ySlice,
963
964
  uSlice,
@@ -969,7 +970,8 @@ var DecodeWorkerChild = class {
969
970
  ], 0, region.height, [dstBuffer], [dstStride]);
970
971
  if (scaledHeight < 0) throw new Error(`native crop sws_scale failed: ${scaledHeight}`);
971
972
  if (scaledHeight !== target.height) throw new Error(`native crop scaler produced ${scaledHeight} of ${target.height} rows`);
972
- return dstBuffer;
973
+ if (dstStride === tightStride) return dstBuffer.subarray(0, tightStride * target.height);
974
+ return packSinglePlane(dstBuffer, dstStride, target.width, target.height, 3);
973
975
  }
974
976
  /**
975
977
  * Hardware native crop — run the retained GPU surface through a DEDICATED
@@ -952,8 +952,9 @@ var DecodeWorkerChild = class {
952
952
  const uSlice = uPlane.subarray(region.top / 2 * cStride + region.left / 2);
953
953
  const vSlice = vPlane.subarray(region.top / 2 * cStride + region.left / 2);
954
954
  const scaler = this.ensureNativeCropScaler(nav, C, region.width, region.height, target.width, target.height);
955
- const dstStride = target.width * 3;
956
- const dstBuffer = Buffer.allocUnsafe(dstStride * target.height);
955
+ const tightStride = target.width * 3;
956
+ const dstStride = tightStride + 63 & -64;
957
+ const dstBuffer = Buffer.allocUnsafe(dstStride * target.height + 64);
957
958
  const scaledHeight = scaler.scaleSync([
958
959
  ySlice,
959
960
  uSlice,
@@ -965,7 +966,8 @@ var DecodeWorkerChild = class {
965
966
  ], 0, region.height, [dstBuffer], [dstStride]);
966
967
  if (scaledHeight < 0) throw new Error(`native crop sws_scale failed: ${scaledHeight}`);
967
968
  if (scaledHeight !== target.height) throw new Error(`native crop scaler produced ${scaledHeight} of ${target.height} rows`);
968
- return dstBuffer;
969
+ if (dstStride === tightStride) return dstBuffer.subarray(0, tightStride * target.height);
970
+ return packSinglePlane(dstBuffer, dstStride, target.width, target.height, 3);
969
971
  }
970
972
  /**
971
973
  * Hardware native crop — run the retained GPU surface through a DEDICATED
@@ -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-RWGGPwVx.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
@@ -1244,7 +1286,7 @@ var STEP_FACE_DETECTION = new PipelineStepBase({
1244
1286
  defaultConfidence: .5,
1245
1287
  defaultMinParentScore: .7,
1246
1288
  cadence: {
1247
- trigger: "improve",
1289
+ trigger: "periodic",
1248
1290
  minIntervalMs: 1e3
1249
1291
  }
1250
1292
  });
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-DI57FC8K.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
@@ -1244,7 +1286,7 @@ var STEP_FACE_DETECTION = new PipelineStepBase({
1244
1286
  defaultConfidence: .5,
1245
1287
  defaultMinParentScore: .7,
1246
1288
  cadence: {
1247
- trigger: "improve",
1289
+ trigger: "periodic",
1248
1290
  minIntervalMs: 1e3
1249
1291
  }
1250
1292
  });