@camstack/addon-pipeline 1.2.4 → 1.2.6
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 +1 -1
- package/dist/audio-analyzer/index.mjs +1 -1
- package/dist/detection-pipeline/index.js +499 -30
- package/dist/detection-pipeline/index.mjs +493 -24
- package/dist/{dist-D7-LF079.js → dist-Bh0H8jM6.js} +61 -4
- package/dist/{dist-DVjpngiC.mjs → dist-Bw_V5L0r.mjs} +61 -4
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/pipeline-runner/index.js +19 -9
- package/dist/pipeline-runner/index.mjs +19 -9
- package/dist/recorder/index.js +1 -1
- package/dist/recorder/index.mjs +1 -1
- package/dist/{step-definitions-BPwND8Zg.mjs → step-definitions-aY4D9Loy.mjs} +241 -116
- package/dist/{step-definitions-BfXdDokR.js → step-definitions-xxdpJX9-.js} +241 -116
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DHZ9LbMC.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DX-Ef8CP.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-gchR4WlX.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BdxY9zld.mjs +26 -0
- package/dist/stream-broker/{hostInit-CpoOj-Zh.mjs → hostInit-DUL71Vjq.mjs} +2 -2
- package/dist/stream-broker/index.js +1 -1
- package/dist/stream-broker/index.mjs +1 -1
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-L6rscpzL.js → MaskShapeCanvas-DI4BY7W2-CGWEeRkz.js} +1 -1
- package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-CK9BVkOT.js → MotionZonesSettings-NcxxQN8r-4YbTa3Wp.js} +1 -1
- package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-CNcYwFLg.js → PrivacyMaskSettings-APgPLF7p-DL_tAs9-.js} +1 -1
- package/embed-dist/assets/{index-CBhJRpiC.js → index-CvBwcYl_.js} +13 -13
- package/embed-dist/index.html +1 -1
- package/package.json +1 -1
- package/python/postprocessors/ctc.py +228 -4
- package/python/postprocessors/test_ctc.py +312 -0
- package/python/postprocessors/testdata/ctc_degenerate_lowres_logits.npy.gz.b64 +1 -0
- package/python/postprocessors/testdata/ctc_dwro309_logits.npy.gz.b64 +1 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CQC_f4Yv.mjs +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-5Zc9wj-A.mjs +0 -26
|
@@ -11731,6 +11731,22 @@ var CameraMetricsSchema = object({
|
|
|
11731
11731
|
])
|
|
11732
11732
|
});
|
|
11733
11733
|
var CameraMetricsWithDeviceIdSchema = CameraMetricsSchema.extend({ deviceId: number() });
|
|
11734
|
+
/**
|
|
11735
|
+
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
11736
|
+
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
11737
|
+
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
11738
|
+
*/
|
|
11739
|
+
var NativeCropRefSchema = object({
|
|
11740
|
+
/** Handle keying the retained native surface (node-pinned to its owner). */
|
|
11741
|
+
handle: FrameHandleSchema,
|
|
11742
|
+
/** The parent crop's padded/clamped rectangle in FRAME-space pixels. */
|
|
11743
|
+
cropFrameSpace: object({
|
|
11744
|
+
x: number(),
|
|
11745
|
+
y: number(),
|
|
11746
|
+
w: number(),
|
|
11747
|
+
h: number()
|
|
11748
|
+
})
|
|
11749
|
+
});
|
|
11734
11750
|
var ModelFormatSchema$1 = _enum([
|
|
11735
11751
|
"onnx",
|
|
11736
11752
|
"coreml",
|
|
@@ -12104,7 +12120,22 @@ var pipelineExecutorCapability = {
|
|
|
12104
12120
|
* Omitted ⇒ the runner's default device (current single-engine
|
|
12105
12121
|
* behaviour). Selects WHICH device pool of the node runs the call.
|
|
12106
12122
|
*/
|
|
12107
|
-
deviceKey: string().optional()
|
|
12123
|
+
deviceKey: string().optional(),
|
|
12124
|
+
/**
|
|
12125
|
+
* Two-plane NATIVE child-crop reference. Set by `runDetailSubtree` ONLY
|
|
12126
|
+
* when the parent crop was resolved from the frame's retained NATIVE
|
|
12127
|
+
* surface (a frameHandle HIT). Lets the executor re-cut a LEAF crop
|
|
12128
|
+
* child's ROI (plate-ocr, face-embedding, leaf classifiers) at native
|
|
12129
|
+
* resolution from that surface — the SAME quality path faces already
|
|
12130
|
+
* had — instead of the downscaled parent tile. `handle` keys the native
|
|
12131
|
+
* surface (node-pinned to its owner); `cropFrameSpace` is the parent
|
|
12132
|
+
* crop's padded/clamped rectangle in FRAME-space pixels, used to compose
|
|
12133
|
+
* the executor's crop-normalized child ROI back into frame-normalized
|
|
12134
|
+
* coordinates. Auxiliary to the image source (`image`/`frame`/…), NOT one
|
|
12135
|
+
* of the mutually-exclusive image inputs. Absent ⇒ tile-crop children
|
|
12136
|
+
* (today's behaviour on the fallback path).
|
|
12137
|
+
*/
|
|
12138
|
+
nativeCropRef: NativeCropRefSchema.optional()
|
|
12108
12139
|
}), PipelineRunResultBridge, { kind: "mutation" }),
|
|
12109
12140
|
/**
|
|
12110
12141
|
* Batched run — N raw frames packed into one cap call. The provider
|
|
@@ -12374,7 +12405,11 @@ var DetailResultSchema = object({
|
|
|
12374
12405
|
bbox: NativeCropBboxSchema.optional(),
|
|
12375
12406
|
embedding: string().optional(),
|
|
12376
12407
|
label: string().optional(),
|
|
12377
|
-
alignedCropJpeg: string().optional()
|
|
12408
|
+
alignedCropJpeg: string().optional(),
|
|
12409
|
+
/** Face short side (px) measured on the NATIVE crop surface. The `bbox`
|
|
12410
|
+
* above is detection-frame px (≈6× smaller on a 4K camera) — min-face-size
|
|
12411
|
+
* consumers MUST prefer this when present (2026-07-22 native-gate fix). */
|
|
12412
|
+
nativeFaceShortSidePx: number().optional()
|
|
12378
12413
|
});
|
|
12379
12414
|
/**
|
|
12380
12415
|
* Per-camera tunable ranges + defaults. Single source of truth used
|
|
@@ -12388,6 +12423,12 @@ var motionCooldownMsField = {
|
|
|
12388
12423
|
default: 3e4,
|
|
12389
12424
|
step: 500
|
|
12390
12425
|
};
|
|
12426
|
+
var maxSessionHoldMsField = {
|
|
12427
|
+
min: 0,
|
|
12428
|
+
max: 6e5,
|
|
12429
|
+
default: 12e4,
|
|
12430
|
+
step: 5e3
|
|
12431
|
+
};
|
|
12391
12432
|
var motionFpsField = {
|
|
12392
12433
|
min: 1,
|
|
12393
12434
|
max: 30,
|
|
@@ -12535,6 +12576,19 @@ var RunnerCameraConfigSchema = object({
|
|
|
12535
12576
|
"on-motion"
|
|
12536
12577
|
]).default("always-on"),
|
|
12537
12578
|
motionCooldownMs: number().min(motionCooldownMsField.min).default(motionCooldownMsField.default),
|
|
12579
|
+
/**
|
|
12580
|
+
* Orchestrator-side on-motion session-hold cap (ms). While an on-motion
|
|
12581
|
+
* detection session is active and ≥1 confirmed non-stationary track is
|
|
12582
|
+
* still live, the orchestrator keeps the session open past
|
|
12583
|
+
* `motionCooldownMs` (a slowly-moving subject can stop re-triggering the
|
|
12584
|
+
* camera's VMD yet is still being tracked frame-to-frame) — up to this many
|
|
12585
|
+
* ms since the session opened, after which it closes regardless. `0`
|
|
12586
|
+
* disables the hold (legacy cooldown-only teardown). Not consumed by the
|
|
12587
|
+
* runner itself — carried here so it shares the per-camera device-settings
|
|
12588
|
+
* surface with `motionCooldownMs`; the orchestrator reads it off the
|
|
12589
|
+
* resolved `CameraDetectionConfig`.
|
|
12590
|
+
*/
|
|
12591
|
+
maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
|
|
12538
12592
|
motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
|
|
12539
12593
|
detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
|
|
12540
12594
|
motionStreamId: string(),
|
|
@@ -12624,7 +12678,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
12624
12678
|
*/
|
|
12625
12679
|
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
12626
12680
|
});
|
|
12627
|
-
motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
12681
|
+
motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
12628
12682
|
/**
|
|
12629
12683
|
* Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
|
|
12630
12684
|
* load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
|
|
@@ -17998,7 +18052,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
17998
18052
|
}), method(object({
|
|
17999
18053
|
eventId: string(),
|
|
18000
18054
|
kind: MediaFileKindEnum.optional()
|
|
18001
|
-
}), array(MediaFileSchema).readonly()), method(object({
|
|
18055
|
+
}), array(MediaFileSchema).readonly()), method(object({
|
|
18056
|
+
trackId: string(),
|
|
18057
|
+
kinds: array(MediaFileKindEnum).optional()
|
|
18058
|
+
}), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
|
|
18002
18059
|
deviceId: number(),
|
|
18003
18060
|
timestamp: number(),
|
|
18004
18061
|
frameWidth: number(),
|
|
@@ -11731,6 +11731,22 @@ var CameraMetricsSchema = object({
|
|
|
11731
11731
|
])
|
|
11732
11732
|
});
|
|
11733
11733
|
var CameraMetricsWithDeviceIdSchema = CameraMetricsSchema.extend({ deviceId: number() });
|
|
11734
|
+
/**
|
|
11735
|
+
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
11736
|
+
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
11737
|
+
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
11738
|
+
*/
|
|
11739
|
+
var NativeCropRefSchema = object({
|
|
11740
|
+
/** Handle keying the retained native surface (node-pinned to its owner). */
|
|
11741
|
+
handle: FrameHandleSchema,
|
|
11742
|
+
/** The parent crop's padded/clamped rectangle in FRAME-space pixels. */
|
|
11743
|
+
cropFrameSpace: object({
|
|
11744
|
+
x: number(),
|
|
11745
|
+
y: number(),
|
|
11746
|
+
w: number(),
|
|
11747
|
+
h: number()
|
|
11748
|
+
})
|
|
11749
|
+
});
|
|
11734
11750
|
var ModelFormatSchema$1 = _enum([
|
|
11735
11751
|
"onnx",
|
|
11736
11752
|
"coreml",
|
|
@@ -12104,7 +12120,22 @@ var pipelineExecutorCapability = {
|
|
|
12104
12120
|
* Omitted ⇒ the runner's default device (current single-engine
|
|
12105
12121
|
* behaviour). Selects WHICH device pool of the node runs the call.
|
|
12106
12122
|
*/
|
|
12107
|
-
deviceKey: string().optional()
|
|
12123
|
+
deviceKey: string().optional(),
|
|
12124
|
+
/**
|
|
12125
|
+
* Two-plane NATIVE child-crop reference. Set by `runDetailSubtree` ONLY
|
|
12126
|
+
* when the parent crop was resolved from the frame's retained NATIVE
|
|
12127
|
+
* surface (a frameHandle HIT). Lets the executor re-cut a LEAF crop
|
|
12128
|
+
* child's ROI (plate-ocr, face-embedding, leaf classifiers) at native
|
|
12129
|
+
* resolution from that surface — the SAME quality path faces already
|
|
12130
|
+
* had — instead of the downscaled parent tile. `handle` keys the native
|
|
12131
|
+
* surface (node-pinned to its owner); `cropFrameSpace` is the parent
|
|
12132
|
+
* crop's padded/clamped rectangle in FRAME-space pixels, used to compose
|
|
12133
|
+
* the executor's crop-normalized child ROI back into frame-normalized
|
|
12134
|
+
* coordinates. Auxiliary to the image source (`image`/`frame`/…), NOT one
|
|
12135
|
+
* of the mutually-exclusive image inputs. Absent ⇒ tile-crop children
|
|
12136
|
+
* (today's behaviour on the fallback path).
|
|
12137
|
+
*/
|
|
12138
|
+
nativeCropRef: NativeCropRefSchema.optional()
|
|
12108
12139
|
}), PipelineRunResultBridge, { kind: "mutation" }),
|
|
12109
12140
|
/**
|
|
12110
12141
|
* Batched run — N raw frames packed into one cap call. The provider
|
|
@@ -12374,7 +12405,11 @@ var DetailResultSchema = object({
|
|
|
12374
12405
|
bbox: NativeCropBboxSchema.optional(),
|
|
12375
12406
|
embedding: string().optional(),
|
|
12376
12407
|
label: string().optional(),
|
|
12377
|
-
alignedCropJpeg: string().optional()
|
|
12408
|
+
alignedCropJpeg: string().optional(),
|
|
12409
|
+
/** Face short side (px) measured on the NATIVE crop surface. The `bbox`
|
|
12410
|
+
* above is detection-frame px (≈6× smaller on a 4K camera) — min-face-size
|
|
12411
|
+
* consumers MUST prefer this when present (2026-07-22 native-gate fix). */
|
|
12412
|
+
nativeFaceShortSidePx: number().optional()
|
|
12378
12413
|
});
|
|
12379
12414
|
/**
|
|
12380
12415
|
* Per-camera tunable ranges + defaults. Single source of truth used
|
|
@@ -12388,6 +12423,12 @@ var motionCooldownMsField = {
|
|
|
12388
12423
|
default: 3e4,
|
|
12389
12424
|
step: 500
|
|
12390
12425
|
};
|
|
12426
|
+
var maxSessionHoldMsField = {
|
|
12427
|
+
min: 0,
|
|
12428
|
+
max: 6e5,
|
|
12429
|
+
default: 12e4,
|
|
12430
|
+
step: 5e3
|
|
12431
|
+
};
|
|
12391
12432
|
var motionFpsField = {
|
|
12392
12433
|
min: 1,
|
|
12393
12434
|
max: 30,
|
|
@@ -12535,6 +12576,19 @@ var RunnerCameraConfigSchema = object({
|
|
|
12535
12576
|
"on-motion"
|
|
12536
12577
|
]).default("always-on"),
|
|
12537
12578
|
motionCooldownMs: number().min(motionCooldownMsField.min).default(motionCooldownMsField.default),
|
|
12579
|
+
/**
|
|
12580
|
+
* Orchestrator-side on-motion session-hold cap (ms). While an on-motion
|
|
12581
|
+
* detection session is active and ≥1 confirmed non-stationary track is
|
|
12582
|
+
* still live, the orchestrator keeps the session open past
|
|
12583
|
+
* `motionCooldownMs` (a slowly-moving subject can stop re-triggering the
|
|
12584
|
+
* camera's VMD yet is still being tracked frame-to-frame) — up to this many
|
|
12585
|
+
* ms since the session opened, after which it closes regardless. `0`
|
|
12586
|
+
* disables the hold (legacy cooldown-only teardown). Not consumed by the
|
|
12587
|
+
* runner itself — carried here so it shares the per-camera device-settings
|
|
12588
|
+
* surface with `motionCooldownMs`; the orchestrator reads it off the
|
|
12589
|
+
* resolved `CameraDetectionConfig`.
|
|
12590
|
+
*/
|
|
12591
|
+
maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
|
|
12538
12592
|
motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
|
|
12539
12593
|
detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
|
|
12540
12594
|
motionStreamId: string(),
|
|
@@ -12624,7 +12678,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
12624
12678
|
*/
|
|
12625
12679
|
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
12626
12680
|
});
|
|
12627
|
-
motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
12681
|
+
motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
12628
12682
|
/**
|
|
12629
12683
|
* Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
|
|
12630
12684
|
* load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
|
|
@@ -17998,7 +18052,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
17998
18052
|
}), method(object({
|
|
17999
18053
|
eventId: string(),
|
|
18000
18054
|
kind: MediaFileKindEnum.optional()
|
|
18001
|
-
}), array(MediaFileSchema).readonly()), method(object({
|
|
18055
|
+
}), array(MediaFileSchema).readonly()), method(object({
|
|
18056
|
+
trackId: string(),
|
|
18057
|
+
kinds: array(MediaFileKindEnum).optional()
|
|
18058
|
+
}), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
|
|
18002
18059
|
deviceId: number(),
|
|
18003
18060
|
timestamp: number(),
|
|
18004
18061
|
frameWidth: number(),
|
|
@@ -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-
|
|
5
|
+
const require_dist = require("../dist-Bh0H8jM6.js");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
//#region src/motion-wasm/wasm-motion-detector.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as motionDetectionCapability, J as hydrateSchema, K as DeviceType, T as evaluateZoneRules, U as BaseAddon } from "../dist-
|
|
1
|
+
import { A as motionDetectionCapability, J as hydrateSchema, K as DeviceType, T as evaluateZoneRules, U as BaseAddon } from "../dist-Bw_V5L0r.mjs";
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
//#region src/motion-wasm/wasm-motion-detector.ts
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-D6vf50IK.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
6
|
+
const require_dist = require("../dist-Bh0H8jM6.js");
|
|
7
7
|
const require_remote_restream = require("../remote-restream-CO36Sr30.js");
|
|
8
8
|
const require_sheet_geometry = require("../sheet-geometry-BR-ip0CP.js");
|
|
9
9
|
const require_worker_protocol = require("../worker-protocol-DextwlTX.js");
|
|
10
|
-
const require_step_definitions = require("../step-definitions-
|
|
10
|
+
const require_step_definitions = require("../step-definitions-xxdpJX9-.js");
|
|
11
11
|
let node_child_process = require("node:child_process");
|
|
12
12
|
let node_url = require("node:url");
|
|
13
13
|
let sharp = require("sharp");
|
|
@@ -2210,14 +2210,18 @@ function toDetailResult(detection, stepId, crop) {
|
|
|
2210
2210
|
bbox: mapBboxToFrameSpace(detection.bbox, crop),
|
|
2211
2211
|
...detection.embedding !== void 0 ? { embedding: encodeEmbeddingBase64(detection.embedding) } : {},
|
|
2212
2212
|
...label !== void 0 ? { label } : {},
|
|
2213
|
-
...detection.faceAlignedCrop !== void 0 ? { alignedCropJpeg: detection.faceAlignedCrop } : {}
|
|
2213
|
+
...detection.faceAlignedCrop !== void 0 ? { alignedCropJpeg: detection.faceAlignedCrop } : {},
|
|
2214
|
+
...detection.nativeFaceShortSidePx !== void 0 ? { nativeFaceShortSidePx: detection.nativeFaceShortSidePx } : {}
|
|
2214
2215
|
};
|
|
2215
2216
|
}
|
|
2216
2217
|
async function resolveCrop(deps, input) {
|
|
2217
2218
|
if (input.frameHandle) {
|
|
2218
2219
|
const normalized = normalizeRect(padAndClampFrameBbox(input.parent.bbox, input.frameHandle.width, input.frameHandle.height), input.frameHandle.width, input.frameHandle.height);
|
|
2219
2220
|
const native = await deps.getNativeCrop(input.deviceId, input.frameHandle, normalized);
|
|
2220
|
-
if (native) return
|
|
2221
|
+
if (native) return {
|
|
2222
|
+
...native,
|
|
2223
|
+
source: "native"
|
|
2224
|
+
};
|
|
2221
2225
|
}
|
|
2222
2226
|
if (input.cropJpeg) {
|
|
2223
2227
|
const jpeg = Buffer.from(input.cropJpeg, "base64");
|
|
@@ -2230,7 +2234,8 @@ async function resolveCrop(deps, input) {
|
|
|
2230
2234
|
jpeg,
|
|
2231
2235
|
width,
|
|
2232
2236
|
height,
|
|
2233
|
-
frameSpace: input.parent.bbox
|
|
2237
|
+
frameSpace: input.parent.bbox,
|
|
2238
|
+
source: "fallback"
|
|
2234
2239
|
};
|
|
2235
2240
|
}
|
|
2236
2241
|
return null;
|
|
@@ -2258,10 +2263,14 @@ async function runDetailSubtree(deps, input) {
|
|
|
2258
2263
|
const steps = requested === void 0 ? matched : matched.map((step) => pruneChildStepsToRequested(step, requested));
|
|
2259
2264
|
const crop = await resolveCrop(deps, input);
|
|
2260
2265
|
if (!crop) return null;
|
|
2266
|
+
const nativeCropRef = input.frameHandle !== void 0 && crop.source === "native" ? {
|
|
2267
|
+
handle: input.frameHandle,
|
|
2268
|
+
cropFrameSpace: crop.frameSpace
|
|
2269
|
+
} : void 0;
|
|
2261
2270
|
const details = [];
|
|
2262
2271
|
for (const step of steps) {
|
|
2263
2272
|
const deviceKey = deps.resolveStepDevice?.(input.deviceId, step);
|
|
2264
|
-
const result = await deps.runPipeline([step], crop.jpeg, input.deviceId, deviceKey);
|
|
2273
|
+
const result = await deps.runPipeline([step], crop.jpeg, input.deviceId, deviceKey, nativeCropRef);
|
|
2265
2274
|
if (!result) continue;
|
|
2266
2275
|
for (const detection of result.detections) details.push(toDetailResult(detection, step.addonId, crop));
|
|
2267
2276
|
}
|
|
@@ -3367,7 +3376,7 @@ var PipelineRunnerAddon = class extends require_dist.BaseAddon {
|
|
|
3367
3376
|
return runDetailSubtree({
|
|
3368
3377
|
resolveChildSteps: (deviceId, parentClassName, filter) => this.resolveDetailChildSteps(deviceId, parentClassName, filter),
|
|
3369
3378
|
getNativeCrop: (deviceId, handle, paddedBbox) => this.getNativeCropForDetail(deviceId, handle, paddedBbox),
|
|
3370
|
-
runPipeline: (steps, imageJpeg, deviceId, deviceKey) => this.runDetailPipeline(steps, imageJpeg, deviceId, deviceKey),
|
|
3379
|
+
runPipeline: (steps, imageJpeg, deviceId, deviceKey, nativeCropRef) => this.runDetailPipeline(steps, imageJpeg, deviceId, deviceKey, nativeCropRef),
|
|
3371
3380
|
resolveStepDevice: (deviceId, step) => this.resolveDetailStepDevice(deviceId, step)
|
|
3372
3381
|
}, input);
|
|
3373
3382
|
}
|
|
@@ -3519,7 +3528,7 @@ var PipelineRunnerAddon = class extends require_dist.BaseAddon {
|
|
|
3519
3528
|
})();
|
|
3520
3529
|
}
|
|
3521
3530
|
/** Real `runPipeline` dep: node-local `pipelineExecutor.runPipeline` on the `'full'` plane. */
|
|
3522
|
-
async runDetailPipeline(steps, imageJpeg, deviceId, stepDeviceKey) {
|
|
3531
|
+
async runDetailPipeline(steps, imageJpeg, deviceId, stepDeviceKey, nativeCropRef) {
|
|
3523
3532
|
const api = this.ctxIfReady?.api;
|
|
3524
3533
|
if (!api) return null;
|
|
3525
3534
|
const detailDeviceKey = stepDeviceKey ?? this.attached.get(deviceId)?.config?.deviceKey;
|
|
@@ -3529,7 +3538,8 @@ var PipelineRunnerAddon = class extends require_dist.BaseAddon {
|
|
|
3529
3538
|
image: new Uint8Array(imageJpeg),
|
|
3530
3539
|
deviceId,
|
|
3531
3540
|
...detailDeviceKey ? { deviceKey: detailDeviceKey } : {},
|
|
3532
|
-
plane: "full"
|
|
3541
|
+
plane: "full",
|
|
3542
|
+
...nativeCropRef ? { nativeCropRef } : {}
|
|
3533
3543
|
});
|
|
3534
3544
|
} catch (err) {
|
|
3535
3545
|
this.ctxIfReady?.logger.warn("runDetailSubtree: runPipeline failed", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { H as errMsg, N as pipelineRunnerCapability, S as defineCustomActions, U as BaseAddon, b as customAction, ct as number, dt as string, it as boolean, j as nodePin, lt as object, nt as _enum, ot as lazy, pt as EventCategory, q as createEvent, rt as array, s as DEVICE_BACKEND_TO_FORMAT } from "../dist-
|
|
1
|
+
import { H as errMsg, N as pipelineRunnerCapability, S as defineCustomActions, U as BaseAddon, b as customAction, ct as number, dt as string, it as boolean, j as nodePin, lt as object, nt as _enum, ot as lazy, pt as EventCategory, q as createEvent, rt as array, s as DEVICE_BACKEND_TO_FORMAT } from "../dist-Bw_V5L0r.mjs";
|
|
2
2
|
import { n as profileForStreamId, t as isRemoteRestream } from "../remote-restream-BeHi78PZ.mjs";
|
|
3
3
|
import { r as resolveHubHostname } from "../sheet-geometry-DcpuGTCm.mjs";
|
|
4
4
|
import { t as isWorkerReply } from "../worker-protocol-D7RzZIla.mjs";
|
|
5
|
-
import { a as getStepDefinition } from "../step-definitions-
|
|
5
|
+
import { a as getStepDefinition } from "../step-definitions-aY4D9Loy.mjs";
|
|
6
6
|
import { fork } from "node:child_process";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import sharp from "sharp";
|
|
@@ -2204,14 +2204,18 @@ function toDetailResult(detection, stepId, crop) {
|
|
|
2204
2204
|
bbox: mapBboxToFrameSpace(detection.bbox, crop),
|
|
2205
2205
|
...detection.embedding !== void 0 ? { embedding: encodeEmbeddingBase64(detection.embedding) } : {},
|
|
2206
2206
|
...label !== void 0 ? { label } : {},
|
|
2207
|
-
...detection.faceAlignedCrop !== void 0 ? { alignedCropJpeg: detection.faceAlignedCrop } : {}
|
|
2207
|
+
...detection.faceAlignedCrop !== void 0 ? { alignedCropJpeg: detection.faceAlignedCrop } : {},
|
|
2208
|
+
...detection.nativeFaceShortSidePx !== void 0 ? { nativeFaceShortSidePx: detection.nativeFaceShortSidePx } : {}
|
|
2208
2209
|
};
|
|
2209
2210
|
}
|
|
2210
2211
|
async function resolveCrop(deps, input) {
|
|
2211
2212
|
if (input.frameHandle) {
|
|
2212
2213
|
const normalized = normalizeRect(padAndClampFrameBbox(input.parent.bbox, input.frameHandle.width, input.frameHandle.height), input.frameHandle.width, input.frameHandle.height);
|
|
2213
2214
|
const native = await deps.getNativeCrop(input.deviceId, input.frameHandle, normalized);
|
|
2214
|
-
if (native) return
|
|
2215
|
+
if (native) return {
|
|
2216
|
+
...native,
|
|
2217
|
+
source: "native"
|
|
2218
|
+
};
|
|
2215
2219
|
}
|
|
2216
2220
|
if (input.cropJpeg) {
|
|
2217
2221
|
const jpeg = Buffer.from(input.cropJpeg, "base64");
|
|
@@ -2224,7 +2228,8 @@ async function resolveCrop(deps, input) {
|
|
|
2224
2228
|
jpeg,
|
|
2225
2229
|
width,
|
|
2226
2230
|
height,
|
|
2227
|
-
frameSpace: input.parent.bbox
|
|
2231
|
+
frameSpace: input.parent.bbox,
|
|
2232
|
+
source: "fallback"
|
|
2228
2233
|
};
|
|
2229
2234
|
}
|
|
2230
2235
|
return null;
|
|
@@ -2252,10 +2257,14 @@ async function runDetailSubtree(deps, input) {
|
|
|
2252
2257
|
const steps = requested === void 0 ? matched : matched.map((step) => pruneChildStepsToRequested(step, requested));
|
|
2253
2258
|
const crop = await resolveCrop(deps, input);
|
|
2254
2259
|
if (!crop) return null;
|
|
2260
|
+
const nativeCropRef = input.frameHandle !== void 0 && crop.source === "native" ? {
|
|
2261
|
+
handle: input.frameHandle,
|
|
2262
|
+
cropFrameSpace: crop.frameSpace
|
|
2263
|
+
} : void 0;
|
|
2255
2264
|
const details = [];
|
|
2256
2265
|
for (const step of steps) {
|
|
2257
2266
|
const deviceKey = deps.resolveStepDevice?.(input.deviceId, step);
|
|
2258
|
-
const result = await deps.runPipeline([step], crop.jpeg, input.deviceId, deviceKey);
|
|
2267
|
+
const result = await deps.runPipeline([step], crop.jpeg, input.deviceId, deviceKey, nativeCropRef);
|
|
2259
2268
|
if (!result) continue;
|
|
2260
2269
|
for (const detection of result.detections) details.push(toDetailResult(detection, step.addonId, crop));
|
|
2261
2270
|
}
|
|
@@ -3361,7 +3370,7 @@ var PipelineRunnerAddon = class extends BaseAddon {
|
|
|
3361
3370
|
return runDetailSubtree({
|
|
3362
3371
|
resolveChildSteps: (deviceId, parentClassName, filter) => this.resolveDetailChildSteps(deviceId, parentClassName, filter),
|
|
3363
3372
|
getNativeCrop: (deviceId, handle, paddedBbox) => this.getNativeCropForDetail(deviceId, handle, paddedBbox),
|
|
3364
|
-
runPipeline: (steps, imageJpeg, deviceId, deviceKey) => this.runDetailPipeline(steps, imageJpeg, deviceId, deviceKey),
|
|
3373
|
+
runPipeline: (steps, imageJpeg, deviceId, deviceKey, nativeCropRef) => this.runDetailPipeline(steps, imageJpeg, deviceId, deviceKey, nativeCropRef),
|
|
3365
3374
|
resolveStepDevice: (deviceId, step) => this.resolveDetailStepDevice(deviceId, step)
|
|
3366
3375
|
}, input);
|
|
3367
3376
|
}
|
|
@@ -3513,7 +3522,7 @@ var PipelineRunnerAddon = class extends BaseAddon {
|
|
|
3513
3522
|
})();
|
|
3514
3523
|
}
|
|
3515
3524
|
/** Real `runPipeline` dep: node-local `pipelineExecutor.runPipeline` on the `'full'` plane. */
|
|
3516
|
-
async runDetailPipeline(steps, imageJpeg, deviceId, stepDeviceKey) {
|
|
3525
|
+
async runDetailPipeline(steps, imageJpeg, deviceId, stepDeviceKey, nativeCropRef) {
|
|
3517
3526
|
const api = this.ctxIfReady?.api;
|
|
3518
3527
|
if (!api) return null;
|
|
3519
3528
|
const detailDeviceKey = stepDeviceKey ?? this.attached.get(deviceId)?.config?.deviceKey;
|
|
@@ -3523,7 +3532,8 @@ var PipelineRunnerAddon = class extends BaseAddon {
|
|
|
3523
3532
|
image: new Uint8Array(imageJpeg),
|
|
3524
3533
|
deviceId,
|
|
3525
3534
|
...detailDeviceKey ? { deviceKey: detailDeviceKey } : {},
|
|
3526
|
-
plane: "full"
|
|
3535
|
+
plane: "full",
|
|
3536
|
+
...nativeCropRef ? { nativeCropRef } : {}
|
|
3527
3537
|
});
|
|
3528
3538
|
} catch (err) {
|
|
3529
3539
|
this.ctxIfReady?.logger.warn("runDetailSubtree: runPipeline failed", {
|
package/dist/recorder/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("../chunk-D6vf50IK.js");
|
|
2
|
-
const require_dist = require("../dist-
|
|
2
|
+
const require_dist = require("../dist-Bh0H8jM6.js");
|
|
3
3
|
const require_sheet_geometry = require("../sheet-geometry-BR-ip0CP.js");
|
|
4
4
|
const require_model_download_service_Cp9f4dk6 = require("../model-download-service-Cp9f4dk6-Dv-oFwjN.js");
|
|
5
5
|
let node_child_process = require("node:child_process");
|
package/dist/recorder/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as recordingExportCapability, H as errMsg, I as resolveScrubThumbnailGeometry, J as hydrateSchema, K as DeviceType, P as recordingCapability, R as storageEvictableCapability, U as BaseAddon, Y as isEvent, c as EVENT_PAD_MS, dt as string, et as selectAssignedProfileSlots, f as OpsLogEntrySchema, j as nodePin, k as migrateConfigToBands, p as RecordingConfigSchema, pt as EventCategory, rt as array, u as ExportRecordSchema, ut as record } from "../dist-
|
|
1
|
+
import { F as recordingExportCapability, H as errMsg, I as resolveScrubThumbnailGeometry, J as hydrateSchema, K as DeviceType, P as recordingCapability, R as storageEvictableCapability, U as BaseAddon, Y as isEvent, c as EVENT_PAD_MS, dt as string, et as selectAssignedProfileSlots, f as OpsLogEntrySchema, j as nodePin, k as migrateConfigToBands, p as RecordingConfigSchema, pt as EventCategory, rt as array, u as ExportRecordSchema, ut as record } from "../dist-Bw_V5L0r.mjs";
|
|
2
2
|
import { n as computeSheetGeometry, r as resolveHubHostname, t as allTilePlacements } from "../sheet-geometry-DcpuGTCm.mjs";
|
|
3
3
|
import { n as createFileDataPlaneHandler, s as parseRangeHeader, t as contentTypeFor } from "../model-download-service-Cp9f4dk6-CwUb5v3Y.mjs";
|
|
4
4
|
import { spawn } from "node:child_process";
|