@camstack/addon-pipeline 1.2.299 → 1.2.301
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-DMcHBVmE.mjs → default-detection-model-JDKeiJPf.mjs} +15 -8
- package/dist/{default-detection-model-H_NzHI_P.js → default-detection-model-P7IIrP0a.js} +20 -7
- package/dist/detection-pipeline/index.js +15 -17
- package/dist/detection-pipeline/index.mjs +15 -17
- package/dist/{dist-BzDPLvQ6.js → dist-BUs7H-fe.js} +437 -23
- package/dist/{dist-DNlqf8dr.mjs → dist-DvzAabca.mjs} +437 -23
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-g2ZRFDvc.mjs → node-DnP_6GBZ.mjs} +1 -1
- package/dist/{node-B-cB_Hdy.js → node-DxVMyys-.js} +1 -1
- package/dist/pipeline-runner/index.js +129 -5
- package/dist/pipeline-runner/index.mjs +129 -5
- package/dist/{process-memory-kKYoJ9hl.mjs → process-memory-BMr61qT1.mjs} +1 -1
- package/dist/{process-memory-Bo3-laZ_.js → process-memory-DmYzYip-.js} +1 -1
- package/dist/recorder/index.js +15 -2
- package/dist/recorder/index.mjs +15 -2
- package/dist/{segment-demux-js-DrDj8kP6.js → segment-demux-js-DANvUJgH.js} +1 -1
- package/dist/{segment-demux-js-QK7qFMSj.mjs → segment-demux-js-DBqdboBI.mjs} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Da_bbYQp.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-D0etdxl0.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-vnc0r4NV.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-CUFWg1jj.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-aFrOa5WT.mjs → hostInit-TY9BRVDy.mjs} +2 -2
- package/dist/stream-broker/index.js +3 -3
- package/dist/stream-broker/index.mjs +3 -3
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/python/postprocessors/testdata/ssdlite_mobiledet_outputs.json +289 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CxT9ry2j.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-Dti8Ex88.mjs +0 -26
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_process_memory = require("../process-memory-
|
|
6
|
+
const require_dist = require("../dist-BUs7H-fe.js");
|
|
7
|
+
const require_process_memory = require("../process-memory-DmYzYip-.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
10
10
|
let node_path = require("node:path");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { E as HF_BASE_URL, G as audioAnalyzerCapability, Rn as EventCategory, Ut as resolvePoolMemoryPolicy, W as audioAnalysisCapability, _n as hydrateSchema, bt as mapAudioLabelToMacro, en as errMsg, fn as audioChunkBytesPerSample, gn as expandAudioChunkToF32le, j as PoolMemoryWatchdog, n as AUDIO_BACKEND_CHOICES, p as DEFAULT_AUDIO_ANALYZER_CONFIG, sn as BaseAddon, xn as nodePin } from "../dist-
|
|
3
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
2
|
+
import { E as HF_BASE_URL, G as audioAnalyzerCapability, Rn as EventCategory, Ut as resolvePoolMemoryPolicy, W as audioAnalysisCapability, _n as hydrateSchema, bt as mapAudioLabelToMacro, en as errMsg, fn as audioChunkBytesPerSample, gn as expandAudioChunkToF32le, j as PoolMemoryWatchdog, n as AUDIO_BACKEND_CHOICES, p as DEFAULT_AUDIO_ANALYZER_CONFIG, sn as BaseAddon, xn as nodePin } from "../dist-DvzAabca.mjs";
|
|
3
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-BMr61qT1.mjs";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
import { downloadFile } from "@camstack/system/addon-utils";
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { K as audioKindId, Kt as stepModelRunsOnFormat, d as COCO_80_LABELS, f as COCO_TO_MACRO, gt as inferModelProvider, ht as hfModelUrl, r as AUDIO_MACRO_LABELS, y as DEVICE_BACKEND_TO_FORMAT } from "./dist-
|
|
1
|
+
import { K as audioKindId, Kt as stepModelRunsOnFormat, d as COCO_80_LABELS, f as COCO_TO_MACRO, gt as inferModelProvider, ht as hfModelUrl, r as AUDIO_MACRO_LABELS, y as DEVICE_BACKEND_TO_FORMAT } from "./dist-DvzAabca.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
|
+
//#region src/detection-pipeline/registry/effective-confidence.ts
|
|
4
|
+
/** The default in force: the model's own floor, else the step's. */
|
|
5
|
+
function resolveModelDefaultConfidence(def, model) {
|
|
6
|
+
return model?.defaultConfidence ?? def.defaultConfidence;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
3
9
|
//#region src/detection-pipeline/pipeline/landmark-precision-gate.ts
|
|
4
10
|
/**
|
|
5
11
|
* `null` = admit. A verdict = refuse, carrying both numbers so the caller can
|
|
@@ -862,6 +868,7 @@ var FACE_DETECTION_MODELS = [
|
|
|
862
868
|
}],
|
|
863
869
|
preprocessMode: "letterbox",
|
|
864
870
|
postprocessor: "yunet",
|
|
871
|
+
defaultConfidence: .85,
|
|
865
872
|
formats: {
|
|
866
873
|
onnx: {
|
|
867
874
|
url: hf("faceDetection/yunet/onnx/camstack-yunet-2023mar.onnx"),
|
|
@@ -1753,7 +1760,7 @@ var AnimalClassifierStep = class {
|
|
|
1753
1760
|
stickyOnConfidence: .7
|
|
1754
1761
|
}
|
|
1755
1762
|
};
|
|
1756
|
-
getConfigSchema() {
|
|
1763
|
+
getConfigSchema(model) {
|
|
1757
1764
|
return [{
|
|
1758
1765
|
type: "multiselect",
|
|
1759
1766
|
key: "enabledClasses",
|
|
@@ -1769,7 +1776,7 @@ var AnimalClassifierStep = class {
|
|
|
1769
1776
|
key: "minConfidence",
|
|
1770
1777
|
label: "Min Confidence",
|
|
1771
1778
|
description: "Drop classifications whose score is below this threshold.",
|
|
1772
|
-
default: this.definition
|
|
1779
|
+
default: resolveModelDefaultConfidence(this.definition, model),
|
|
1773
1780
|
min: 0,
|
|
1774
1781
|
max: 1,
|
|
1775
1782
|
step: .05,
|
|
@@ -1801,7 +1808,7 @@ var AnimalClassifierStep = class {
|
|
|
1801
1808
|
* bug `packageDropEnabled` already was.
|
|
1802
1809
|
*/
|
|
1803
1810
|
var PackageDetectionStep = class extends PipelineStepBase {
|
|
1804
|
-
getConfigSchema() {
|
|
1811
|
+
getConfigSchema(model) {
|
|
1805
1812
|
return [{
|
|
1806
1813
|
type: "slider",
|
|
1807
1814
|
key: "minConfidencePackage",
|
|
@@ -1810,19 +1817,19 @@ var PackageDetectionStep = class extends PipelineStepBase {
|
|
|
1810
1817
|
min: 0,
|
|
1811
1818
|
max: 1,
|
|
1812
1819
|
step: .05,
|
|
1813
|
-
default: this.definition
|
|
1820
|
+
default: resolveModelDefaultConfidence(this.definition, model),
|
|
1814
1821
|
showValue: true
|
|
1815
1822
|
}];
|
|
1816
1823
|
}
|
|
1817
1824
|
};
|
|
1818
1825
|
var ClassifierWithMinConfidence = class extends PipelineStepBase {
|
|
1819
|
-
getConfigSchema() {
|
|
1826
|
+
getConfigSchema(model) {
|
|
1820
1827
|
return [{
|
|
1821
1828
|
type: "slider",
|
|
1822
1829
|
key: "minConfidence",
|
|
1823
1830
|
label: "Min Confidence",
|
|
1824
1831
|
description: "Drop classifications whose score is below this threshold.",
|
|
1825
|
-
default: this.definition
|
|
1832
|
+
default: resolveModelDefaultConfidence(this.definition, model),
|
|
1826
1833
|
min: 0,
|
|
1827
1834
|
max: 1,
|
|
1828
1835
|
step: .05,
|
|
@@ -2843,4 +2850,4 @@ function resolveDefaultDetectionModel(backend, device, format, getStepDef = getS
|
|
|
2843
2850
|
return getDefaultModelForFormatFromDef(def, format);
|
|
2844
2851
|
}
|
|
2845
2852
|
//#endregion
|
|
2846
|
-
export { resolveModelForFormat as _, buildSubtreeCanRun as a, macroGateVerdict as c, resolveFrameViewGeometry as d, ALL_PIPELINE_STEPS as f, getStepDefinition as g, getStep as h, mergeCustomModels as i, rootObjectGate as l, getDefaultModelForFormat as m, resolveDefaultDetectionModel as n, placeDetailStep as o, ALL_STEPS as p, CustomModelCatalog as r, stepsForElectedPool as s, OBJECT_DETECTION_STEP_ID as t, localFrameRegistry as u, RETIRED_MODEL_IDS as v, landmarkPrecisionVerdict as y };
|
|
2853
|
+
export { resolveModelForFormat as _, buildSubtreeCanRun as a, resolveModelDefaultConfidence as b, macroGateVerdict as c, resolveFrameViewGeometry as d, ALL_PIPELINE_STEPS as f, getStepDefinition as g, getStep as h, mergeCustomModels as i, rootObjectGate as l, getDefaultModelForFormat as m, resolveDefaultDetectionModel as n, placeDetailStep as o, ALL_STEPS as p, CustomModelCatalog as r, stepsForElectedPool as s, OBJECT_DETECTION_STEP_ID as t, localFrameRegistry as u, RETIRED_MODEL_IDS as v, landmarkPrecisionVerdict as y };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
1
|
+
const require_dist = require("./dist-BUs7H-fe.js");
|
|
2
2
|
let node_crypto = require("node:crypto");
|
|
3
|
+
//#region src/detection-pipeline/registry/effective-confidence.ts
|
|
4
|
+
/** The default in force: the model's own floor, else the step's. */
|
|
5
|
+
function resolveModelDefaultConfidence(def, model) {
|
|
6
|
+
return model?.defaultConfidence ?? def.defaultConfidence;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
3
9
|
//#region src/detection-pipeline/pipeline/landmark-precision-gate.ts
|
|
4
10
|
/**
|
|
5
11
|
* `null` = admit. A verdict = refuse, carrying both numbers so the caller can
|
|
@@ -862,6 +868,7 @@ var FACE_DETECTION_MODELS = [
|
|
|
862
868
|
}],
|
|
863
869
|
preprocessMode: "letterbox",
|
|
864
870
|
postprocessor: "yunet",
|
|
871
|
+
defaultConfidence: .85,
|
|
865
872
|
formats: {
|
|
866
873
|
onnx: {
|
|
867
874
|
url: hf("faceDetection/yunet/onnx/camstack-yunet-2023mar.onnx"),
|
|
@@ -1753,7 +1760,7 @@ var AnimalClassifierStep = class {
|
|
|
1753
1760
|
stickyOnConfidence: .7
|
|
1754
1761
|
}
|
|
1755
1762
|
};
|
|
1756
|
-
getConfigSchema() {
|
|
1763
|
+
getConfigSchema(model) {
|
|
1757
1764
|
return [{
|
|
1758
1765
|
type: "multiselect",
|
|
1759
1766
|
key: "enabledClasses",
|
|
@@ -1769,7 +1776,7 @@ var AnimalClassifierStep = class {
|
|
|
1769
1776
|
key: "minConfidence",
|
|
1770
1777
|
label: "Min Confidence",
|
|
1771
1778
|
description: "Drop classifications whose score is below this threshold.",
|
|
1772
|
-
default: this.definition
|
|
1779
|
+
default: resolveModelDefaultConfidence(this.definition, model),
|
|
1773
1780
|
min: 0,
|
|
1774
1781
|
max: 1,
|
|
1775
1782
|
step: .05,
|
|
@@ -1801,7 +1808,7 @@ var AnimalClassifierStep = class {
|
|
|
1801
1808
|
* bug `packageDropEnabled` already was.
|
|
1802
1809
|
*/
|
|
1803
1810
|
var PackageDetectionStep = class extends PipelineStepBase {
|
|
1804
|
-
getConfigSchema() {
|
|
1811
|
+
getConfigSchema(model) {
|
|
1805
1812
|
return [{
|
|
1806
1813
|
type: "slider",
|
|
1807
1814
|
key: "minConfidencePackage",
|
|
@@ -1810,19 +1817,19 @@ var PackageDetectionStep = class extends PipelineStepBase {
|
|
|
1810
1817
|
min: 0,
|
|
1811
1818
|
max: 1,
|
|
1812
1819
|
step: .05,
|
|
1813
|
-
default: this.definition
|
|
1820
|
+
default: resolveModelDefaultConfidence(this.definition, model),
|
|
1814
1821
|
showValue: true
|
|
1815
1822
|
}];
|
|
1816
1823
|
}
|
|
1817
1824
|
};
|
|
1818
1825
|
var ClassifierWithMinConfidence = class extends PipelineStepBase {
|
|
1819
|
-
getConfigSchema() {
|
|
1826
|
+
getConfigSchema(model) {
|
|
1820
1827
|
return [{
|
|
1821
1828
|
type: "slider",
|
|
1822
1829
|
key: "minConfidence",
|
|
1823
1830
|
label: "Min Confidence",
|
|
1824
1831
|
description: "Drop classifications whose score is below this threshold.",
|
|
1825
|
-
default: this.definition
|
|
1832
|
+
default: resolveModelDefaultConfidence(this.definition, model),
|
|
1826
1833
|
min: 0,
|
|
1827
1834
|
max: 1,
|
|
1828
1835
|
step: .05,
|
|
@@ -2939,6 +2946,12 @@ Object.defineProperty(exports, "resolveFrameViewGeometry", {
|
|
|
2939
2946
|
return resolveFrameViewGeometry;
|
|
2940
2947
|
}
|
|
2941
2948
|
});
|
|
2949
|
+
Object.defineProperty(exports, "resolveModelDefaultConfidence", {
|
|
2950
|
+
enumerable: true,
|
|
2951
|
+
get: function() {
|
|
2952
|
+
return resolveModelDefaultConfidence;
|
|
2953
|
+
}
|
|
2954
|
+
});
|
|
2942
2955
|
Object.defineProperty(exports, "resolveModelForFormat", {
|
|
2943
2956
|
enumerable: true,
|
|
2944
2957
|
get: function() {
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
8
|
-
const require_default_detection_model = require("../default-detection-model-
|
|
6
|
+
const require_dist = require("../dist-BUs7H-fe.js");
|
|
7
|
+
const require_node = require("../node-DxVMyys-.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-P7IIrP0a.js");
|
|
9
9
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
10
|
-
const require_process_memory = require("../process-memory-
|
|
10
|
+
const require_process_memory = require("../process-memory-DmYzYip-.js");
|
|
11
11
|
let node_os = require("node:os");
|
|
12
12
|
node_os = require_chunk.__toESM(node_os);
|
|
13
13
|
let node_fs = require("node:fs");
|
|
@@ -3394,7 +3394,7 @@ function buildPoolModelConfigForStep(inputs) {
|
|
|
3394
3394
|
inputNormalization: modelEntry.inputNormalization,
|
|
3395
3395
|
outputProbabilities: modelEntry.outputProbabilities,
|
|
3396
3396
|
postprocessor: resolveEffectivePostprocessorForEntry(def, modelEntry),
|
|
3397
|
-
confidence: resolvePoolConfidenceFloor(stepId, def
|
|
3397
|
+
confidence: resolvePoolConfidenceFloor(stepId, require_default_detection_model.resolveModelDefaultConfidence(def, modelEntry)),
|
|
3398
3398
|
nmsIouThreshold: resolvePoolDecodeSettings({
|
|
3399
3399
|
def,
|
|
3400
3400
|
modelEntry,
|
|
@@ -6913,13 +6913,9 @@ function composeCropRoiToFrameNorm(roi, cropFrameSpace, frameWidth, frameHeight)
|
|
|
6913
6913
|
}
|
|
6914
6914
|
//#endregion
|
|
6915
6915
|
//#region src/detection-pipeline/pipeline/tree-builder.ts
|
|
6916
|
-
/**
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
* resolved through the optional registry callback.
|
|
6920
|
-
*/
|
|
6921
|
-
function resolveEffectiveClassMap(definition, modelId, resolveModel) {
|
|
6922
|
-
return (definition.models.find((model) => model.id === modelId) ?? resolveModel?.(definition.id, modelId))?.classMap ?? definition.classMap;
|
|
6916
|
+
/** The catalog entry for `(definition, modelId)`: the static catalog, else the custom registry. */
|
|
6917
|
+
function resolveModelEntry(definition, modelId, resolveModel) {
|
|
6918
|
+
return definition.models.find((model) => model.id === modelId) ?? resolveModel?.(definition.id, modelId);
|
|
6923
6919
|
}
|
|
6924
6920
|
/**
|
|
6925
6921
|
* Build an executable tree from user config.
|
|
@@ -6956,11 +6952,12 @@ function buildNode(step, getEngine, resolveModel, onMissingVariant, resolved) {
|
|
|
6956
6952
|
const definition = require_default_detection_model.getStepDefinition(step.addonId);
|
|
6957
6953
|
const variant = resolved ?? getEngine(step.addonId, step.modelId);
|
|
6958
6954
|
const children = (step.children ?? []).filter((c) => c.enabled).map((c) => buildChild(c, step.addonId, getEngine, resolveModel, onMissingVariant)).filter((c) => c !== null);
|
|
6955
|
+
const modelEntry = resolveModelEntry(definition, variant.modelId, resolveModel);
|
|
6959
6956
|
const mergedSettings = {
|
|
6960
|
-
...collectSchemaDefaults(step.addonId),
|
|
6957
|
+
...collectSchemaDefaults(step.addonId, modelEntry),
|
|
6961
6958
|
...step.settings
|
|
6962
6959
|
};
|
|
6963
|
-
const effectiveClassMap =
|
|
6960
|
+
const effectiveClassMap = modelEntry?.classMap ?? definition.classMap;
|
|
6964
6961
|
return {
|
|
6965
6962
|
stepId: step.addonId,
|
|
6966
6963
|
definition,
|
|
@@ -6979,8 +6976,8 @@ function buildNode(step, getEngine, resolveModel, onMissingVariant, resolved) {
|
|
|
6979
6976
|
* are flattened — a nested `{ type: 'group', fields: [...] }` is
|
|
6980
6977
|
* entered recursively. Fields without a declared default are skipped.
|
|
6981
6978
|
*/
|
|
6982
|
-
function collectSchemaDefaults(stepId) {
|
|
6983
|
-
const schema = require_default_detection_model.getStep(stepId).getConfigSchema();
|
|
6979
|
+
function collectSchemaDefaults(stepId, model) {
|
|
6980
|
+
const schema = require_default_detection_model.getStep(stepId).getConfigSchema(model);
|
|
6984
6981
|
const out = {};
|
|
6985
6982
|
walkFieldsForDefaults(schema, out);
|
|
6986
6983
|
return out;
|
|
@@ -10605,7 +10602,8 @@ function buildSchemaSlots(formats, modelsDir, customByStep) {
|
|
|
10605
10602
|
}])),
|
|
10606
10603
|
...m.group ? { group: m.group } : {},
|
|
10607
10604
|
...m.legacy !== void 0 ? { legacy: m.legacy } : {},
|
|
10608
|
-
provider: m.provider ?? "camstack"
|
|
10605
|
+
provider: m.provider ?? "camstack",
|
|
10606
|
+
defaultConfidence: require_default_detection_model.resolveModelDefaultConfidence(step, m)
|
|
10609
10607
|
})),
|
|
10610
10608
|
defaultModelId: step.defaultModelId,
|
|
10611
10609
|
...step.defaultModelIdByFormat ? { defaultModelIdByFormat: { ...step.defaultModelIdByFormat } } : {},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { Dn as array, Dt as overlayClusterStepSettings, Gt as runtimeDevices$1, H as YAMNET_TO_MACRO, In as string, Kt as stepModelRunsOnFormat, Ln as union, Mt as pipelineExecutorCapability, Nn as object, Rn as EventCategory, Sn as parseJsonUnknown, Tn as sleep, Ut as resolvePoolMemoryPolicy, Zt as supportedRuntimes$1, _n as hydrateSchema, en as errMsg, et as defaultDeviceFor$1, it as detectionPipelineCapability, j as PoolMemoryWatchdog, kt as pickClusterStepSettings, lt as evaluateZoneRules, m as DEFAULT_CLUSTER_STEP_SETTINGS, pn as createEvent, sn as BaseAddon, st as enumerateInferenceDevices, t as APPLE_SA_TO_MACRO, u as CLUSTER_MODEL_SCOPED_STEPS, vt as loadContributionCapability, xn as nodePin, y as DEVICE_BACKEND_TO_FORMAT, zt as resolveClusterStepModelId } from "../dist-
|
|
3
|
-
import { s as readProcessCost } from "../node-
|
|
4
|
-
import { _ as resolveModelForFormat, a as buildSubtreeCanRun, c as macroGateVerdict, f as ALL_PIPELINE_STEPS, g as getStepDefinition, h as getStep, i as mergeCustomModels, m as getDefaultModelForFormat, n as resolveDefaultDetectionModel, p as ALL_STEPS, r as CustomModelCatalog, u as localFrameRegistry, y as landmarkPrecisionVerdict } from "../default-detection-model-
|
|
2
|
+
import { Dn as array, Dt as overlayClusterStepSettings, Gt as runtimeDevices$1, H as YAMNET_TO_MACRO, In as string, Kt as stepModelRunsOnFormat, Ln as union, Mt as pipelineExecutorCapability, Nn as object, Rn as EventCategory, Sn as parseJsonUnknown, Tn as sleep, Ut as resolvePoolMemoryPolicy, Zt as supportedRuntimes$1, _n as hydrateSchema, en as errMsg, et as defaultDeviceFor$1, it as detectionPipelineCapability, j as PoolMemoryWatchdog, kt as pickClusterStepSettings, lt as evaluateZoneRules, m as DEFAULT_CLUSTER_STEP_SETTINGS, pn as createEvent, sn as BaseAddon, st as enumerateInferenceDevices, t as APPLE_SA_TO_MACRO, u as CLUSTER_MODEL_SCOPED_STEPS, vt as loadContributionCapability, xn as nodePin, y as DEVICE_BACKEND_TO_FORMAT, zt as resolveClusterStepModelId } from "../dist-DvzAabca.mjs";
|
|
3
|
+
import { s as readProcessCost } from "../node-DnP_6GBZ.mjs";
|
|
4
|
+
import { _ as resolveModelForFormat, a as buildSubtreeCanRun, b as resolveModelDefaultConfidence, c as macroGateVerdict, f as ALL_PIPELINE_STEPS, g as getStepDefinition, h as getStep, i as mergeCustomModels, m as getDefaultModelForFormat, n as resolveDefaultDetectionModel, p as ALL_STEPS, r as CustomModelCatalog, u as localFrameRegistry, y as landmarkPrecisionVerdict } from "../default-detection-model-JDKeiJPf.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-BMr61qT1.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";
|
|
@@ -3387,7 +3387,7 @@ function buildPoolModelConfigForStep(inputs) {
|
|
|
3387
3387
|
inputNormalization: modelEntry.inputNormalization,
|
|
3388
3388
|
outputProbabilities: modelEntry.outputProbabilities,
|
|
3389
3389
|
postprocessor: resolveEffectivePostprocessorForEntry(def, modelEntry),
|
|
3390
|
-
confidence: resolvePoolConfidenceFloor(stepId, def
|
|
3390
|
+
confidence: resolvePoolConfidenceFloor(stepId, resolveModelDefaultConfidence(def, modelEntry)),
|
|
3391
3391
|
nmsIouThreshold: resolvePoolDecodeSettings({
|
|
3392
3392
|
def,
|
|
3393
3393
|
modelEntry,
|
|
@@ -6906,13 +6906,9 @@ function composeCropRoiToFrameNorm(roi, cropFrameSpace, frameWidth, frameHeight)
|
|
|
6906
6906
|
}
|
|
6907
6907
|
//#endregion
|
|
6908
6908
|
//#region src/detection-pipeline/pipeline/tree-builder.ts
|
|
6909
|
-
/**
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
* resolved through the optional registry callback.
|
|
6913
|
-
*/
|
|
6914
|
-
function resolveEffectiveClassMap(definition, modelId, resolveModel) {
|
|
6915
|
-
return (definition.models.find((model) => model.id === modelId) ?? resolveModel?.(definition.id, modelId))?.classMap ?? definition.classMap;
|
|
6909
|
+
/** The catalog entry for `(definition, modelId)`: the static catalog, else the custom registry. */
|
|
6910
|
+
function resolveModelEntry(definition, modelId, resolveModel) {
|
|
6911
|
+
return definition.models.find((model) => model.id === modelId) ?? resolveModel?.(definition.id, modelId);
|
|
6916
6912
|
}
|
|
6917
6913
|
/**
|
|
6918
6914
|
* Build an executable tree from user config.
|
|
@@ -6949,11 +6945,12 @@ function buildNode(step, getEngine, resolveModel, onMissingVariant, resolved) {
|
|
|
6949
6945
|
const definition = getStepDefinition(step.addonId);
|
|
6950
6946
|
const variant = resolved ?? getEngine(step.addonId, step.modelId);
|
|
6951
6947
|
const children = (step.children ?? []).filter((c) => c.enabled).map((c) => buildChild(c, step.addonId, getEngine, resolveModel, onMissingVariant)).filter((c) => c !== null);
|
|
6948
|
+
const modelEntry = resolveModelEntry(definition, variant.modelId, resolveModel);
|
|
6952
6949
|
const mergedSettings = {
|
|
6953
|
-
...collectSchemaDefaults(step.addonId),
|
|
6950
|
+
...collectSchemaDefaults(step.addonId, modelEntry),
|
|
6954
6951
|
...step.settings
|
|
6955
6952
|
};
|
|
6956
|
-
const effectiveClassMap =
|
|
6953
|
+
const effectiveClassMap = modelEntry?.classMap ?? definition.classMap;
|
|
6957
6954
|
return {
|
|
6958
6955
|
stepId: step.addonId,
|
|
6959
6956
|
definition,
|
|
@@ -6972,8 +6969,8 @@ function buildNode(step, getEngine, resolveModel, onMissingVariant, resolved) {
|
|
|
6972
6969
|
* are flattened — a nested `{ type: 'group', fields: [...] }` is
|
|
6973
6970
|
* entered recursively. Fields without a declared default are skipped.
|
|
6974
6971
|
*/
|
|
6975
|
-
function collectSchemaDefaults(stepId) {
|
|
6976
|
-
const schema = getStep(stepId).getConfigSchema();
|
|
6972
|
+
function collectSchemaDefaults(stepId, model) {
|
|
6973
|
+
const schema = getStep(stepId).getConfigSchema(model);
|
|
6977
6974
|
const out = {};
|
|
6978
6975
|
walkFieldsForDefaults(schema, out);
|
|
6979
6976
|
return out;
|
|
@@ -10598,7 +10595,8 @@ function buildSchemaSlots(formats, modelsDir, customByStep) {
|
|
|
10598
10595
|
}])),
|
|
10599
10596
|
...m.group ? { group: m.group } : {},
|
|
10600
10597
|
...m.legacy !== void 0 ? { legacy: m.legacy } : {},
|
|
10601
|
-
provider: m.provider ?? "camstack"
|
|
10598
|
+
provider: m.provider ?? "camstack",
|
|
10599
|
+
defaultConfidence: resolveModelDefaultConfidence(step, m)
|
|
10602
10600
|
})),
|
|
10603
10601
|
defaultModelId: step.defaultModelId,
|
|
10604
10602
|
...step.defaultModelIdByFormat ? { defaultModelIdByFormat: { ...step.defaultModelIdByFormat } } : {},
|