@camstack/addon-pipeline 1.2.329 → 1.2.330
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 +2 -2
- package/dist/audio-analyzer/index.mjs +2 -2
- package/dist/{default-detection-model-ChH7Y219.js → default-detection-model-B6gKGnfx.js} +39 -67
- package/dist/{default-detection-model-j0nBpRoB.mjs → default-detection-model-CPDT_eFT.mjs} +39 -67
- package/dist/detection-pipeline/index.js +197 -31
- package/dist/detection-pipeline/index.mjs +197 -31
- package/dist/{dist-BlIWhjnu.js → dist-CMeICL07.js} +771 -464
- package/dist/{dist-0HoA3wAi.mjs → dist-CuPEyZY2.mjs} +726 -437
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-HOMWRPzW.mjs → node-USq5jYwq.mjs} +1 -1
- package/dist/{node-BPpVMnZy.js → node-X_0Tka7-.js} +1 -1
- package/dist/pipeline-runner/index.js +355 -104
- package/dist/pipeline-runner/index.mjs +355 -104
- package/dist/{process-memory-DuF8pa2w.mjs → process-memory-07XYts8V.mjs} +1 -1
- package/dist/{process-memory-BW06vOIQ.js → process-memory-o4LFWbBN.js} +1 -1
- package/dist/recorder/index.js +7 -7
- package/dist/recorder/index.mjs +7 -7
- package/dist/{segment-demux-js-BU2MXpln.mjs → segment-demux-js-Bq8DrH0b.mjs} +2 -2
- package/dist/{segment-demux-js-Dl52Zz8w.js → segment-demux-js-FqaQjG7n.js} +2 -2
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-vNfS65In.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-EYRUYv_r.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BnP7C_HO.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-CR0--kRv.mjs +26 -0
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-Ciacp783.mjs → hostInit-iGdBpvGc.mjs} +2 -2
- package/dist/stream-broker/index.js +4 -4
- package/dist/stream-broker/index.mjs +4 -4
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DfeHvW4k.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-BpXPNINd.mjs +0 -26
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { s as readProcessCost } from "../node-
|
|
4
|
-
import { _ as getStep, a as buildSubtreeCanRun, b as landmarkPrecisionVerdict, c as macroGateVerdict, g as getDefaultModelForFormat, h as ALL_STEPS, i as mergeCustomModels, m as ALL_PIPELINE_STEPS, n as resolveDefaultDetectionModel, r as CustomModelCatalog, u as localFrameRegistry, v as getStepDefinition, x as resolveModelDefaultConfidence, y as resolveModelForFormat } from "../default-detection-model-
|
|
2
|
+
import { $n as union, Cn as errMsg, Dt as linkedLabelStepId, G as YAMNET_TO_MACRO, Ln as nodePin, N as PoolMemoryWatchdog, Nn as hydrateSchema, O as LABEL_SUPPLY_MACRO, Qn as string, Rn as parseJsonUnknown, Tn as BaseAddon, Un as array, Vn as sleep, Vt as pickClusterStepSettings, Wt as pipelineExecutorCapability, Yn as object, Zt as resolveClusterStepModelId, an as runtimeDevices$1, b as DEVICE_BACKEND_TO_FORMAT, d as CLUSTER_MODEL_SCOPED_STEPS, dn as supportedRuntimes$1, dt as detectionPipelineCapability, er as EventCategory, g as DEFAULT_CLUSTER_STEP_SETTINGS, ht as evaluateZoneRules, in as rootSuppliesOf, kn as createEvent, kt as loadContributionCapability, mt as enumerateInferenceDevices, n as APPLE_SA_TO_MACRO, nt as containingParentIndex, on as stepModelRunsOnFormat, ot as defaultDeviceFor$1, tn as resolvePoolMemoryPolicy, wt as hfModelUrl, zt as overlayClusterStepSettings } from "../dist-CuPEyZY2.mjs";
|
|
3
|
+
import { s as readProcessCost } from "../node-USq5jYwq.mjs";
|
|
4
|
+
import { _ as getStep, a as buildSubtreeCanRun, b as landmarkPrecisionVerdict, c as macroGateVerdict, g as getDefaultModelForFormat, h as ALL_STEPS, i as mergeCustomModels, m as ALL_PIPELINE_STEPS, n as resolveDefaultDetectionModel, r as CustomModelCatalog, u as localFrameRegistry, v as getStepDefinition, x as resolveModelDefaultConfidence, y as resolveModelForFormat } from "../default-detection-model-CPDT_eFT.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
6
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-07XYts8V.mjs";
|
|
7
7
|
import * as os from "node:os";
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
@@ -752,7 +752,7 @@ var POOL_MODEL_LOAD_BOUNDS = {
|
|
|
752
752
|
hardMs: 6e5,
|
|
753
753
|
why: "A cold iGPU compile of the WHOLE model set measured ~25 s on the N100; one model is 1-3 s (YuNet 1.4 s on a fresh worker, 2026-09-26). 120 s is ~5x the worst measured set. No evidence of a legitimate compile past it; the hard bound gives one 5x more before the worker is recycled.",
|
|
754
754
|
gilMayBeHeldDuringCompile: false,
|
|
755
|
-
gilWhy: "The OpenVINO Python binding is believed to release the GIL around compile_model (gil_scoped_release). Not measured on
|
|
755
|
+
gilWhy: "The OpenVINO Python binding is believed to release the GIL around compile_model (gil_scoped_release). Not yet measured on this node."
|
|
756
756
|
},
|
|
757
757
|
coreml: {
|
|
758
758
|
softMs: 3e5,
|
|
@@ -5776,6 +5776,26 @@ var PLATE_OCR_CROP_POLICIES = {
|
|
|
5776
5776
|
}
|
|
5777
5777
|
};
|
|
5778
5778
|
/**
|
|
5779
|
+
* The margin around a plate box drawn by the ROOT model (D730) — a Frigate+
|
|
5780
|
+
* `license_plate` read in place of `plate-detection`'s own box.
|
|
5781
|
+
*
|
|
5782
|
+
* The margin is a property of the box's detector (see above), and this
|
|
5783
|
+
* detector's boxes have never been measured against the plate readers: 0.15 is
|
|
5784
|
+
* the value that served a TIGHT detector box (the deleted `yolov8n-plate`,
|
|
5785
|
+
* 7/7 Kia reads at 0.13–0.16), on the assumption that Frigate+ boxes are
|
|
5786
|
+
* tight as well. It is uncalibrated and needs measuring on a ground-truth set
|
|
5787
|
+
* of root-supplied plates before it is trusted; until then it applies to every
|
|
5788
|
+
* reader alike, replacing the reader's own detector-specific margin.
|
|
5789
|
+
*/
|
|
5790
|
+
var ROOT_SUPPLIED_PLATE_MARGIN_FRACTION = .15;
|
|
5791
|
+
/**
|
|
5792
|
+
* The margin a reader cuts around its plate box: the reader's own, unless the
|
|
5793
|
+
* box was drawn by the root model.
|
|
5794
|
+
*/
|
|
5795
|
+
function plateOcrMarginFraction(policy, boxFromRoot) {
|
|
5796
|
+
return boxFromRoot ? ROOT_SUPPLIED_PLATE_MARGIN_FRACTION : policy.marginFraction;
|
|
5797
|
+
}
|
|
5798
|
+
/**
|
|
5779
5799
|
* The crop policy for a step child, or `null` when the child is not a plate
|
|
5780
5800
|
* reader at all (a face embedder, a classifier — nothing here applies to them).
|
|
5781
5801
|
*/
|
|
@@ -5805,6 +5825,79 @@ function expandBbox(bbox, marginFraction, imageWidth, imageHeight) {
|
|
|
5805
5825
|
];
|
|
5806
5826
|
}
|
|
5807
5827
|
//#endregion
|
|
5828
|
+
//#region src/detection-pipeline/pipeline/root-child-boxes.ts
|
|
5829
|
+
/**
|
|
5830
|
+
* Root child boxes (D730) — a root model's `license_plate` / `face` box made
|
|
5831
|
+
* into a DETAIL of the vehicle / person that contains it.
|
|
5832
|
+
*
|
|
5833
|
+
* The labels are deliberately absent from the root's classMap, so they never
|
|
5834
|
+
* make a first-level detection and therefore never a track (D683). When the
|
|
5835
|
+
* root declares a CROP supply for them, the executor keeps the boxes aside
|
|
5836
|
+
* instead of discarding them, and once the frame's first-level detections are
|
|
5837
|
+
* final this attaches each to its containing parent (`containingParentIndex`).
|
|
5838
|
+
* Whether the camera USES them is the runner's decision
|
|
5839
|
+
* (`pipeline-runner/root-supply.ts`); a box nothing contains is discarded.
|
|
5840
|
+
*
|
|
5841
|
+
* Pure.
|
|
5842
|
+
*/
|
|
5843
|
+
/** The crop supply a raw root class belongs to, if the root declares one. */
|
|
5844
|
+
function cropSupplyForLabel(supplies, rawClass) {
|
|
5845
|
+
for (const supply of supplies ?? []) if (supply.kind === "crop" && supply.rootLabels.includes(rawClass)) return supply;
|
|
5846
|
+
}
|
|
5847
|
+
function toBox(b) {
|
|
5848
|
+
return {
|
|
5849
|
+
x: b[0],
|
|
5850
|
+
y: b[1],
|
|
5851
|
+
w: b[2] - b[0],
|
|
5852
|
+
h: b[3] - b[1]
|
|
5853
|
+
};
|
|
5854
|
+
}
|
|
5855
|
+
/**
|
|
5856
|
+
* Attach each candidate to the smallest first-level parent of its supply's
|
|
5857
|
+
* macro that contains it. Never mutates the parents.
|
|
5858
|
+
*/
|
|
5859
|
+
function attachRootChildBoxes(candidates, parents, modelId, idGen) {
|
|
5860
|
+
const details = [];
|
|
5861
|
+
const uncontained = [];
|
|
5862
|
+
for (const candidate of candidates) {
|
|
5863
|
+
const eligible = parents.filter((p) => p.kind === "first-level" && p.macroClass === candidate.supply.parentMacro);
|
|
5864
|
+
const index = containingParentIndex(toBox(candidate.bbox), eligible.map((p) => toBox(p.bbox)));
|
|
5865
|
+
const parent = index >= 0 ? eligible[index] : void 0;
|
|
5866
|
+
if (parent === void 0) {
|
|
5867
|
+
uncontained.push(candidate);
|
|
5868
|
+
continue;
|
|
5869
|
+
}
|
|
5870
|
+
const stepId = candidate.supply.stepId;
|
|
5871
|
+
details.push({
|
|
5872
|
+
id: idGen.next(),
|
|
5873
|
+
kind: "detail",
|
|
5874
|
+
macroClass: candidate.supply.childClass,
|
|
5875
|
+
originalClass: candidate.rawClass,
|
|
5876
|
+
score: candidate.score,
|
|
5877
|
+
bbox: [
|
|
5878
|
+
candidate.bbox[0],
|
|
5879
|
+
candidate.bbox[1],
|
|
5880
|
+
candidate.bbox[2],
|
|
5881
|
+
candidate.bbox[3]
|
|
5882
|
+
],
|
|
5883
|
+
parentId: parent.id,
|
|
5884
|
+
rootSupplied: {
|
|
5885
|
+
stepId,
|
|
5886
|
+
modelId
|
|
5887
|
+
},
|
|
5888
|
+
ownLabels: [],
|
|
5889
|
+
alternateLabels: {},
|
|
5890
|
+
stepLatencyMs: {},
|
|
5891
|
+
modelIds: { [stepId]: modelId },
|
|
5892
|
+
extractMode: "full-frame"
|
|
5893
|
+
});
|
|
5894
|
+
}
|
|
5895
|
+
return {
|
|
5896
|
+
details,
|
|
5897
|
+
uncontained
|
|
5898
|
+
};
|
|
5899
|
+
}
|
|
5900
|
+
//#endregion
|
|
5808
5901
|
//#region src/detection-pipeline/pipeline/plate-warp.ts
|
|
5809
5902
|
/**
|
|
5810
5903
|
* Plate-crop WARP — perspective rectification of a licence-plate ROI to a
|
|
@@ -6361,6 +6454,7 @@ function buildFrameResult(input) {
|
|
|
6361
6454
|
} : {},
|
|
6362
6455
|
labels,
|
|
6363
6456
|
...m.parentId !== void 0 ? { parentId: m.parentId } : {},
|
|
6457
|
+
...m.rootSupplied !== void 0 ? { rootSupplied: m.rootSupplied } : {},
|
|
6364
6458
|
...embedding !== void 0 ? {
|
|
6365
6459
|
embedding,
|
|
6366
6460
|
...embeddingModelId !== void 0 ? { embeddingModelId } : {}
|
|
@@ -6462,33 +6556,35 @@ function toMutableRootDetection(det, rootStep, idGen, rootStepLatencyMs) {
|
|
|
6462
6556
|
//#endregion
|
|
6463
6557
|
//#region src/detection-pipeline/pipeline/linked-label.ts
|
|
6464
6558
|
/**
|
|
6465
|
-
* The detector's linked label (D715): when the model that RAN declares
|
|
6466
|
-
*
|
|
6467
|
-
* the effect as a `ScoredLabel` attributed to `detector-link:<stepId>`
|
|
6468
|
-
* the step's own vocabulary and tier, so tier 1 means one thing whichever
|
|
6559
|
+
* The detector's linked label (D715, D730): when the model that RAN declares a
|
|
6560
|
+
* LABEL supply for a step, a detection whose raw class names that step's effect
|
|
6561
|
+
* carries the effect as a `ScoredLabel` attributed to `detector-link:<stepId>`
|
|
6562
|
+
* — in the step's own vocabulary and tier, so tier 1 means one thing whichever
|
|
6469
6563
|
* writer produced it.
|
|
6470
6564
|
*
|
|
6471
6565
|
* Written at score 0 here, always: the executor cannot see the camera's whole
|
|
6472
6566
|
* step tree (a detail step placed on another pool is pruned from the dispatch),
|
|
6473
|
-
* so it cannot know
|
|
6474
|
-
*
|
|
6475
|
-
*
|
|
6476
|
-
*
|
|
6567
|
+
* so it cannot know whether the camera USES the supply. The runner, which holds
|
|
6568
|
+
* the attach config, decides with `resolveRootSupply` (`pipeline-runner/root-supply.ts`):
|
|
6569
|
+
* effective ⇒ the label is raised to the detection's score, or dropped when the
|
|
6570
|
+
* step's class list switched it off; otherwise it stays the score-0 fallback
|
|
6571
|
+
* any scored answer of the step outranks.
|
|
6477
6572
|
*/
|
|
6478
6573
|
/** The linked labels one mapped root detection carries. Pure. */
|
|
6479
|
-
function linkedLabelsFor(
|
|
6480
|
-
if (
|
|
6574
|
+
function linkedLabelsFor(supplies, rawClass, macroClass, modelId) {
|
|
6575
|
+
if (supplies === void 0 || supplies.length === 0) return [];
|
|
6481
6576
|
const out = [];
|
|
6482
|
-
for (const
|
|
6483
|
-
if (
|
|
6484
|
-
|
|
6577
|
+
for (const supply of supplies) {
|
|
6578
|
+
if (supply.kind !== "label") continue;
|
|
6579
|
+
if (LABEL_SUPPLY_MACRO[supply.stepId] !== macroClass) continue;
|
|
6580
|
+
const effect = supply.labelToEffect[rawClass];
|
|
6485
6581
|
if (effect === void 0 || effect === macroClass) continue;
|
|
6486
|
-
const tier = getStepDefinition(
|
|
6582
|
+
const tier = getStepDefinition(supply.stepId).labelTier;
|
|
6487
6583
|
out.push({
|
|
6488
6584
|
label: effect,
|
|
6489
6585
|
score: 0,
|
|
6490
6586
|
...tier !== void 0 ? { tier } : {},
|
|
6491
|
-
stepId: linkedLabelStepId(
|
|
6587
|
+
stepId: linkedLabelStepId(supply.stepId),
|
|
6492
6588
|
modelId
|
|
6493
6589
|
});
|
|
6494
6590
|
}
|
|
@@ -6717,10 +6813,19 @@ var PipelineExecutor = class {
|
|
|
6717
6813
|
const rootView = rootInputViewProvider ? await rootInputViewProvider(rootStep, rootCrop) : null;
|
|
6718
6814
|
const cropPrep = !rootView && rootCrop !== void 0 ? await this.prepareCropZoneInput(rootCrop, fullFrameJpegProvider, imageWidth, imageHeight, deviceId) : null;
|
|
6719
6815
|
const rootStart = Date.now();
|
|
6720
|
-
const
|
|
6816
|
+
const supplied = runOpts?.suppliedRoot?.stepId === rootStep.stepId ? runOpts.suppliedRoot : void 0;
|
|
6817
|
+
const rawRootOutput = supplied ? {
|
|
6818
|
+
kind: "detections",
|
|
6819
|
+
detections: supplied.detections.map((d) => ({
|
|
6820
|
+
class: rootStep.definition.outputClasses[0] ?? rootStep.stepId,
|
|
6821
|
+
score: d.score,
|
|
6822
|
+
bbox: d.bbox,
|
|
6823
|
+
...d.landmarks !== void 0 ? { landmarks: d.landmarks } : {}
|
|
6824
|
+
}))
|
|
6825
|
+
} : await this.executeStep(rootStep, rootView?.input ?? cropPrep?.input ?? withInferenceDeviceId(rootInput, deviceId), rootView?.width ?? cropPrep?.width ?? imageWidth, rootView?.height ?? cropPrep?.height ?? imageHeight, "full-frame", void 0, void 0, traceBuilder, stepTimings, poolAgg, rootShed);
|
|
6721
6826
|
const rootMs = Date.now() - rootStart;
|
|
6722
6827
|
if (rawRootOutput === null) continue;
|
|
6723
|
-
const rootOutput = rootView && rawRootOutput.kind === "detections" ? reprojectViewDetections(rawRootOutput, rootView.geometry) : cropPrep && rawRootOutput.kind === "detections" ? reprojectCropZoneDetections(rawRootOutput, cropPrep.origin) : rawRootOutput;
|
|
6828
|
+
const rootOutput = supplied ? rawRootOutput : rootView && rawRootOutput.kind === "detections" ? reprojectViewDetections(rawRootOutput, rootView.geometry) : cropPrep && rawRootOutput.kind === "detections" ? reprojectCropZoneDetections(rawRootOutput, cropPrep.origin) : rawRootOutput;
|
|
6724
6829
|
if (rootOutput.kind !== "detections") {
|
|
6725
6830
|
if (isEnrichmentOutput(rootOutput)) {
|
|
6726
6831
|
const mutable = this.synthesizeRootDetection(rootOutput, rootStep, idGen, rootMs, imageWidth, imageHeight);
|
|
@@ -6742,8 +6847,33 @@ var PipelineExecutor = class {
|
|
|
6742
6847
|
}
|
|
6743
6848
|
continue;
|
|
6744
6849
|
}
|
|
6850
|
+
const rootChildCandidates = [];
|
|
6851
|
+
const firstLevelStart = firstLevel.length;
|
|
6745
6852
|
for (const det of rootOutput.detections) {
|
|
6746
|
-
const
|
|
6853
|
+
const cropSupply = cropSupplyForLabel(rootStep.rootSupplies, det.class);
|
|
6854
|
+
if (cropSupply !== void 0) {
|
|
6855
|
+
rootChildCandidates.push({
|
|
6856
|
+
rawClass: det.class,
|
|
6857
|
+
score: det.score,
|
|
6858
|
+
bbox: [
|
|
6859
|
+
det.bbox[0],
|
|
6860
|
+
det.bbox[1],
|
|
6861
|
+
det.bbox[2],
|
|
6862
|
+
det.bbox[3]
|
|
6863
|
+
],
|
|
6864
|
+
supply: cropSupply
|
|
6865
|
+
});
|
|
6866
|
+
continue;
|
|
6867
|
+
}
|
|
6868
|
+
const seeded = toMutableRootDetection(det, rootStep, idGen, rootMs);
|
|
6869
|
+
const mutable = supplied ? {
|
|
6870
|
+
...seeded,
|
|
6871
|
+
rootSupplied: {
|
|
6872
|
+
stepId: rootStep.stepId,
|
|
6873
|
+
modelId: supplied.modelId
|
|
6874
|
+
},
|
|
6875
|
+
modelIds: { [rootStep.stepId]: supplied.modelId }
|
|
6876
|
+
} : seeded;
|
|
6747
6877
|
if (rootStep.effectiveClassMap) {
|
|
6748
6878
|
const mapped = rootStep.effectiveClassMap.mapping[det.class];
|
|
6749
6879
|
if (mapped) {
|
|
@@ -6764,7 +6894,7 @@ var PipelineExecutor = class {
|
|
|
6764
6894
|
continue;
|
|
6765
6895
|
}
|
|
6766
6896
|
}
|
|
6767
|
-
for (const linked of linkedLabelsFor(rootStep.
|
|
6897
|
+
for (const linked of linkedLabelsFor(rootStep.rootSupplies, det.class, mutable.macroClass, rootStep.modelId)) mutable.ownLabels.push(linked);
|
|
6768
6898
|
const filterVerdict = this.macroFilterVerdict(mutable.macroClass, mutable.score, rootStep.settings);
|
|
6769
6899
|
if (filterVerdict !== "pass") {
|
|
6770
6900
|
(discarded ??= []).push({
|
|
@@ -6846,6 +6976,21 @@ var PipelineExecutor = class {
|
|
|
6846
6976
|
}
|
|
6847
6977
|
firstLevel.push(mutable);
|
|
6848
6978
|
}
|
|
6979
|
+
if (rootChildCandidates.length > 0) {
|
|
6980
|
+
const attached = attachRootChildBoxes(rootChildCandidates, firstLevel.slice(firstLevelStart), rootStep.modelId, idGen);
|
|
6981
|
+
details.push(...attached.details);
|
|
6982
|
+
for (const c of attached.uncontained) (discarded ??= []).push({
|
|
6983
|
+
bbox: [
|
|
6984
|
+
c.bbox[0],
|
|
6985
|
+
c.bbox[1],
|
|
6986
|
+
c.bbox[2],
|
|
6987
|
+
c.bbox[3]
|
|
6988
|
+
],
|
|
6989
|
+
macroClass: c.supply.childClass,
|
|
6990
|
+
score: c.score,
|
|
6991
|
+
reason: "class-filter"
|
|
6992
|
+
});
|
|
6993
|
+
}
|
|
6849
6994
|
}
|
|
6850
6995
|
const totalMs = Date.now() - startMs;
|
|
6851
6996
|
return {
|
|
@@ -7113,7 +7258,8 @@ var PipelineExecutor = class {
|
|
|
7113
7258
|
}
|
|
7114
7259
|
} else {
|
|
7115
7260
|
const cropPolicy = resolvePlateOcrCropPolicy(resolveEffectivePostprocessor(child.definition, child.modelId));
|
|
7116
|
-
const
|
|
7261
|
+
const marginFraction = cropPolicy ? plateOcrMarginFraction(cropPolicy, parentDetection.rootSupplied !== void 0) : 0;
|
|
7262
|
+
const cropBbox = cropPolicy ? expandBbox(parentDetection.bbox, marginFraction, imageWidth, imageHeight) : parentDetection.bbox;
|
|
7117
7263
|
const nativeChild = nativeCropProvider && child.children.length === 0 ? await nativeChildCrop(nativeCropProvider, cropBbox, imageWidth, imageHeight, NATIVE_CHILD_CROP_MAX_WIDTH) : null;
|
|
7118
7264
|
if (nativeChild) {
|
|
7119
7265
|
cropJpegBuf = nativeChild.jpeg;
|
|
@@ -7136,7 +7282,8 @@ var PipelineExecutor = class {
|
|
|
7136
7282
|
plateLongSidePx: Math.round(plateLongSidePx),
|
|
7137
7283
|
plateShortSidePx: Math.round(Math.min(cropW, cropH)),
|
|
7138
7284
|
minPlateLongSidePx: cropPolicy.minLongSidePx,
|
|
7139
|
-
marginFraction
|
|
7285
|
+
marginFraction,
|
|
7286
|
+
boxFrom: parentDetection.rootSupplied !== void 0 ? "root-model" : "step",
|
|
7140
7287
|
source: nativeChild ? "native" : "detection-tile"
|
|
7141
7288
|
}
|
|
7142
7289
|
});
|
|
@@ -7334,9 +7481,18 @@ function buildNode(step, getEngine, resolveModel, onMissingVariant, resolved) {
|
|
|
7334
7481
|
children,
|
|
7335
7482
|
...Object.keys(mergedSettings).length > 0 ? { settings: mergedSettings } : {},
|
|
7336
7483
|
...effectiveClassMap !== void 0 ? { effectiveClassMap } : {},
|
|
7337
|
-
...
|
|
7484
|
+
...rootSuppliesField(definition, modelEntry)
|
|
7338
7485
|
};
|
|
7339
7486
|
}
|
|
7487
|
+
/** A root step's supplies, omitted when it declares none (and for every child step). */
|
|
7488
|
+
function rootSuppliesField(definition, modelEntry) {
|
|
7489
|
+
if (definition.inputClasses !== null) return {};
|
|
7490
|
+
const supplies = rootSuppliesOf(modelEntry, {
|
|
7491
|
+
labels: definition.labels ?? [],
|
|
7492
|
+
...definition.classMap !== void 0 ? { classMap: definition.classMap } : {}
|
|
7493
|
+
});
|
|
7494
|
+
return supplies.length > 0 ? { rootSupplies: supplies } : {};
|
|
7495
|
+
}
|
|
7340
7496
|
/**
|
|
7341
7497
|
* Walk the step's declared `getConfigSchema()` and collect every field
|
|
7342
7498
|
* with a primitive `default` value into a plain record. Group fields
|
|
@@ -9482,7 +9638,8 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
9482
9638
|
execution = await executor.run(effectiveTree, rootInput, jpegProvider, imageWidth, imageHeight, effectiveDeviceId, {
|
|
9483
9639
|
traceVerbosity: isRuntime ? this.eventBus ? "summary" : "off" : "full",
|
|
9484
9640
|
plane: input.plane,
|
|
9485
|
-
occasion: input.replay === true ? "replay" : "live"
|
|
9641
|
+
occasion: input.replay === true ? "replay" : "live",
|
|
9642
|
+
...input.suppliedRoot !== void 0 ? { suppliedRoot: input.suppliedRoot } : {}
|
|
9486
9643
|
}, nativeCropProvider, cropZoneBbox, rootInputViewProvider);
|
|
9487
9644
|
executionSucceeded = true;
|
|
9488
9645
|
} finally {
|
|
@@ -11043,7 +11200,7 @@ function buildSchemaSlots(formats, modelsDir, customByStep) {
|
|
|
11043
11200
|
...m.legacy !== void 0 ? { legacy: m.legacy } : {},
|
|
11044
11201
|
provider: m.provider ?? "camstack",
|
|
11045
11202
|
defaultConfidence: resolveModelDefaultConfidence(step, m),
|
|
11046
|
-
...
|
|
11203
|
+
...modelSuppliesField(step, m)
|
|
11047
11204
|
})),
|
|
11048
11205
|
defaultModelId: step.defaultModelId,
|
|
11049
11206
|
...step.defaultModelIdByFormat ? { defaultModelIdByFormat: { ...step.defaultModelIdByFormat } } : {},
|
|
@@ -11179,6 +11336,15 @@ function isDetailPlaneStep(addonId) {
|
|
|
11179
11336
|
return false;
|
|
11180
11337
|
}
|
|
11181
11338
|
}
|
|
11339
|
+
/** A root model's supplies for the schema, omitted when it supplies nothing. */
|
|
11340
|
+
function modelSuppliesField(step, model) {
|
|
11341
|
+
if (step.inputClasses !== null) return {};
|
|
11342
|
+
const supplies = rootSuppliesOf(model, {
|
|
11343
|
+
labels: step.labels ?? [],
|
|
11344
|
+
...step.classMap !== void 0 ? { classMap: step.classMap } : {}
|
|
11345
|
+
});
|
|
11346
|
+
return supplies.length > 0 ? { suppliesSteps: supplies } : {};
|
|
11347
|
+
}
|
|
11182
11348
|
/**
|
|
11183
11349
|
* What a dispatch runs after its per-step loads (D657).
|
|
11184
11350
|
*
|
|
@@ -11427,7 +11593,7 @@ var DetectionPipelineAddon = class extends BaseAddon {
|
|
|
11427
11593
|
type: "select",
|
|
11428
11594
|
key: "batchMode",
|
|
11429
11595
|
label: "Batch dispatch mode",
|
|
11430
|
-
description: "How the Python pool GROUPS predict requests — it never changes a model's compiled batch SHAPE, which is derived from (engine, device) at load and is not configurable
|
|
11596
|
+
description: "How the Python pool GROUPS predict requests — it never changes a model's compiled batch SHAPE, which is derived from (engine, device) at load and is not configurable. `none` = one call per frame. `window` = per-model accumulator coalesces concurrent calls within Window (ms). Auto uses the matrix-sweep default for the current backend. Applies to THIS node only.",
|
|
11431
11597
|
options: [
|
|
11432
11598
|
{
|
|
11433
11599
|
value: "",
|
|
@@ -11471,7 +11637,7 @@ var DetectionPipelineAddon = class extends BaseAddon {
|
|
|
11471
11637
|
type: "slider",
|
|
11472
11638
|
key: "maxBatchSize",
|
|
11473
11639
|
label: "Max batch size",
|
|
11474
|
-
description: "Cap on how many requests are GROUPED into one batched predict call. Not the model's compiled batch shape — that is derived from (engine, device) at load and is not configurable
|
|
11640
|
+
description: "Cap on how many requests are GROUPED into one batched predict call. Not the model's compiled batch shape — that is derived from (engine, device) at load and is not configurable; a stacked tensor is only ever built for an export that declares a flexible batch axis itself. Auto = backend default. Applies to THIS node only.",
|
|
11475
11641
|
min: 1,
|
|
11476
11642
|
max: 16,
|
|
11477
11643
|
step: 1,
|