@camstack/addon-pipeline 0.1.17 → 0.1.19
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.
- package/dist/audio-analyzer/index.js +8 -3
- package/dist/audio-analyzer/index.js.map +1 -1
- package/dist/audio-analyzer/index.mjs +8 -3
- package/dist/audio-analyzer/index.mjs.map +1 -1
- package/dist/audio-codec-nodeav/index.js +1 -1
- package/dist/audio-codec-nodeav/index.mjs +1 -1
- package/dist/decoder-nodeav/index.js +1 -1
- package/dist/decoder-nodeav/index.mjs +1 -1
- package/dist/detection-pipeline/index.js +23 -20
- package/dist/detection-pipeline/index.js.map +1 -1
- package/dist/detection-pipeline/index.mjs +23 -20
- package/dist/detection-pipeline/index.mjs.map +1 -1
- package/dist/{index-p-6GfKOg.js → index-BbPPvoCx.js} +469 -57
- package/dist/index-BbPPvoCx.js.map +1 -0
- package/dist/{index-CVzLrojg.mjs → index-Bmlkm0Fd.mjs} +469 -57
- package/dist/index-Bmlkm0Fd.mjs.map +1 -0
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/pipeline-runner/index.js +132 -14
- package/dist/pipeline-runner/index.js.map +1 -1
- package/dist/pipeline-runner/index.mjs +133 -15
- package/dist/pipeline-runner/index.mjs.map +1 -1
- package/dist/stream-broker/@mf-types.zip +0 -0
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-NjF4kxzW.mjs +19 -0
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-BAv_5ISf.mjs +20 -0
- package/dist/stream-broker/{__mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs-DAssX3h0.mjs → __mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs-BsB2G7oY.mjs} +2 -1
- package/dist/stream-broker/{__mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-DFoJJhpt.mjs → __mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-xrRiPUpA.mjs} +1 -1
- package/dist/stream-broker/{__mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-x7XMEeuJ.mjs → __mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-C0E2yCzO.mjs} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Sx8tgpFZ.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CupRlwqG.mjs} +6 -6
- package/dist/stream-broker/{client-CZXrddDR.mjs → client-NPZqorv9.mjs} +2 -2
- package/dist/stream-broker/{hostInit-D0jPgChu.mjs → hostInit-Bh4w7o5_.mjs} +12 -12
- package/dist/stream-broker/{index-C0BzaWmB.mjs → index-2Qp8vT3w.mjs} +1 -1
- package/dist/stream-broker/{index-CZNxa0ad.mjs → index-BBcZvb5t.mjs} +1 -1
- package/dist/stream-broker/index-CIJue-4t.mjs +37880 -0
- package/dist/stream-broker/{index-BvV3RVTZ.mjs → index-Cc6QBqMk.mjs} +2 -2
- package/dist/stream-broker/{index-cYW01SNH.mjs → index-D_1p2K9B.mjs} +1 -1
- package/dist/stream-broker/{index-BCEx31Mh.mjs → index-Dy2V7VOm.mjs} +3808 -3277
- package/dist/stream-broker/{index-KtR7Pp0O.mjs → index-mX3Kgiv1.mjs} +1 -1
- package/dist/stream-broker/index.js +1565 -280
- package/dist/stream-broker/index.js.map +1 -1
- package/dist/stream-broker/index.mjs +1567 -281
- package/dist/stream-broker/index.mjs.map +1 -1
- package/dist/stream-broker/{jsx-runtime-B_evVsXl.mjs → jsx-runtime-lb0mH5st.mjs} +1 -1
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/stream-broker/{schemas-ChN4Ih0h.mjs → schemas-ClCuS4qa.mjs} +151 -141
- package/package.json +1 -1
- package/dist/index-CVzLrojg.mjs.map +0 -1
- package/dist/index-p-6GfKOg.js.map +0 -1
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-d8PmLbO2.mjs +0 -19
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-B4l8Nb2y.mjs +0 -20
- package/dist/stream-broker/index-Kb4xa8FX.mjs +0 -36403
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as hfModelUrl, C as COCO_TO_MACRO, g as COCO_80_LABELS, A as AUDIO_MACRO_LABELS, e as errMsg, f as createEvent, E as EventCategory, i as evaluateZoneRules, Y as YAMNET_TO_MACRO, j as APPLE_SA_TO_MACRO, k as parseJsonUnknown, B as BaseAddon, m as hydrateSchema, q as pipelineExecutorCapability, r as detectionPipelineCapability } from "../index-
|
|
1
|
+
import { h as hfModelUrl, C as COCO_TO_MACRO, g as COCO_80_LABELS, A as AUDIO_MACRO_LABELS, e as errMsg, f as createEvent, E as EventCategory, i as evaluateZoneRules, Y as YAMNET_TO_MACRO, j as APPLE_SA_TO_MACRO, k as parseJsonUnknown, B as BaseAddon, m as hydrateSchema, q as pipelineExecutorCapability, r as detectionPipelineCapability } from "../index-Bmlkm0Fd.mjs";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import * as os from "node:os";
|
|
@@ -3214,7 +3214,8 @@ function parseWavToAudioChunk(filePath) {
|
|
|
3214
3214
|
for (let i = 0; i < pcm.length; i++) {
|
|
3215
3215
|
float32[i] = pcm[i] / 32768;
|
|
3216
3216
|
}
|
|
3217
|
-
|
|
3217
|
+
const data = new Uint8Array(float32.buffer, float32.byteOffset, float32.byteLength);
|
|
3218
|
+
return { data, sampleRate: 16e3, channels: 1, timestamp: Date.now() };
|
|
3218
3219
|
}
|
|
3219
3220
|
function enginesEqual(a, b) {
|
|
3220
3221
|
return a.runtime === b.runtime && a.backend === b.backend && a.format === b.format && (a.device ?? null) === (b.device ?? null);
|
|
@@ -4895,7 +4896,7 @@ class DetectionPipelineProvider {
|
|
|
4895
4896
|
label: l.className,
|
|
4896
4897
|
score: l.score
|
|
4897
4898
|
}));
|
|
4898
|
-
const sampleCount = chunk.data.
|
|
4899
|
+
const sampleCount = chunk.data.byteLength / 4;
|
|
4899
4900
|
const startMs = 0;
|
|
4900
4901
|
const endMs = sampleCount / chunk.sampleRate * 1e3;
|
|
4901
4902
|
const detections = ranked.filter((l) => l.score >= minConfidence).map((l, i) => ({
|
|
@@ -5183,7 +5184,15 @@ const TUNING_DEFAULTS = {
|
|
|
5183
5184
|
// (~+30-90% on 4-8 simulated cams in `bench-pool-inprocess.mts`).
|
|
5184
5185
|
// Higher counts saturate the single ANE channel and degrade — 2 is the
|
|
5185
5186
|
// sweet spot on M-series.
|
|
5186
|
-
|
|
5187
|
+
// Latency-first: one model context, one serialized predict, no cross-camera
|
|
5188
|
+
// window batching. On a single shared ANE, concurrent predicts
|
|
5189
|
+
// (concurrency×numWorkers) oversubscribe the accelerator, so per-frame latency
|
|
5190
|
+
// scales with active-camera count; a `window` adds pure queueing delay and
|
|
5191
|
+
// `model.predict([list])` does NOT fuse image-typed inputs (it loops), so the
|
|
5192
|
+
// batch is no faster while every member waits for the slowest. One predict
|
|
5193
|
+
// owns the ANE → each inference runs at its isolated speed. (Prev throughput-
|
|
5194
|
+
// tuned default was concurrency:2, batchMode:'window', windowMs:30, numWorkers:2.)
|
|
5195
|
+
coreml: { concurrency: 1, batchMode: "none", windowMs: 8, maxBatchSize: 8, numWorkers: 1 },
|
|
5187
5196
|
openvino: { concurrency: 1, batchMode: "none", numStreams: 0 },
|
|
5188
5197
|
onnx: { concurrency: 4, batchMode: "list", maxBatchSize: 8, intraOpThreads: 0 },
|
|
5189
5198
|
cpu: { concurrency: 4, batchMode: "list", maxBatchSize: 8, intraOpThreads: 0 }
|
|
@@ -5506,23 +5515,17 @@ class DetectionPipelineAddon extends BaseAddon {
|
|
|
5506
5515
|
resolveBackendTuning() {
|
|
5507
5516
|
const backend = this.config.engineBackend ?? DEFAULT_CONFIG.engineBackend;
|
|
5508
5517
|
const t = TUNING_DEFAULTS[backend] ?? TUNING_DEFAULTS["onnx"];
|
|
5509
|
-
const
|
|
5510
|
-
const
|
|
5511
|
-
|
|
5512
|
-
return userVal;
|
|
5513
|
-
};
|
|
5514
|
-
const pickStr = (userVal, defaultVal) => {
|
|
5515
|
-
if (typeof userVal !== "string" || userVal === "") return defaultVal;
|
|
5516
|
-
return userVal;
|
|
5517
|
-
};
|
|
5518
|
+
const tAny = t;
|
|
5519
|
+
const num = (v, dflt) => typeof v === "number" && v > 0 ? v : dflt;
|
|
5520
|
+
const str = (v, dflt) => typeof v === "string" && v !== "" ? v : dflt;
|
|
5518
5521
|
return {
|
|
5519
|
-
concurrency:
|
|
5520
|
-
batchMode:
|
|
5521
|
-
windowMs:
|
|
5522
|
-
maxBatchSize:
|
|
5523
|
-
numStreams:
|
|
5524
|
-
intraOpThreads:
|
|
5525
|
-
numWorkers:
|
|
5522
|
+
concurrency: num(t.concurrency, 1),
|
|
5523
|
+
batchMode: str(t.batchMode, "window"),
|
|
5524
|
+
windowMs: num(t.windowMs, 2),
|
|
5525
|
+
maxBatchSize: num(t.maxBatchSize, 8),
|
|
5526
|
+
numStreams: num(t.numStreams, 0),
|
|
5527
|
+
intraOpThreads: num(t.intraOpThreads, 0),
|
|
5528
|
+
numWorkers: num(tAny["numWorkers"], 1)
|
|
5526
5529
|
};
|
|
5527
5530
|
}
|
|
5528
5531
|
async onInitialize() {
|