@camstack/addon-pipeline 1.2.326 → 1.2.328
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/THIRD_PARTY_MODELS.md +49 -43
- package/dist/audio-analyzer/index.js +2 -2
- package/dist/audio-analyzer/index.mjs +2 -2
- package/dist/{default-detection-model-WnGDQAQh.js → default-detection-model-1SadEKsW.js} +120 -61
- package/dist/{default-detection-model-Bu4So71h.mjs → default-detection-model-CMeVTcPZ.mjs} +120 -61
- package/dist/detection-pipeline/index.js +49 -9
- package/dist/detection-pipeline/index.mjs +49 -9
- package/dist/{dist-BuU8Y4o1.mjs → dist-Bpub2VcJ.mjs} +584 -396
- package/dist/{dist-BTBbIGSC.js → dist-wJO7mXeO.js} +631 -395
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-UK2v2ZSw.js → node-BCrqaejt.js} +1 -1
- package/dist/{node-inZFYgkm.mjs → node-BjCSgD4M.mjs} +1 -1
- package/dist/pipeline-runner/index.js +253 -87
- package/dist/pipeline-runner/index.mjs +253 -88
- package/dist/{process-memory-DbSOL63T.mjs → process-memory-BaKQ8u2G.mjs} +1 -1
- package/dist/{process-memory-BfDlwJc4.js → process-memory-iUJuTpXs.js} +1 -1
- package/dist/recorder/index.js +9 -8
- package/dist/recorder/index.mjs +9 -8
- package/dist/{segment-demux-js-CMj020zz.mjs → segment-demux-js-C5ez9LYG.mjs} +1 -1
- package/dist/{segment-demux-js-C1GXgxZ0.js → segment-demux-js-Opx6Hv9G.js} +1 -1
- package/dist/session-decode/decode-worker-main.js +13 -21
- package/dist/session-decode/decode-worker-main.mjs +13 -21
- package/dist/stream-broker/_stub.js +1 -1
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-qHD9Dl1z.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-B94LgsV0.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BPWYf4_O.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-BgWrKrQn.mjs → hostInit-xOx7AvgW.mjs} +3 -3
- package/dist/stream-broker/index.js +6 -5
- package/dist/stream-broker/index.mjs +6 -5
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/python/inference_pool.py +38 -121
- package/python/postprocessors/scrfd.py +2 -0
- package/python/postprocessors/test_bird_edgetpu.py +124 -0
- package/python/postprocessors/testdata/bird_classifier_int8_outputs.json +1 -0
- package/python/test_inference_pool_static_batch.py +2 -4
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-NkeMtp-v.mjs +0 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as LABEL_LINK_POLICIES, Ct as inferModelProvider, E as FILLABLE_STEP_VOCABULARIES, St as hfModelUrl, X as audioKindId, b as DEVICE_BACKEND_TO_FORMAT, f as COCO_80_LABELS, i as AUDIO_MACRO_LABELS, j as LABEL_LINK_SETTING_KEY, p as COCO_TO_MACRO, rn as stepModelRunsOnFormat, v as DEFAULT_LABEL_LINK_POLICY } from "./dist-Bpub2VcJ.mjs";
|
|
2
2
|
import { t as isWorkerReply } from "./worker-protocol-D_NzPcnh.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/detection-pipeline/registry/effective-confidence.ts
|
|
@@ -43,13 +43,13 @@ var ULTRALYTICS_AGPL = {
|
|
|
43
43
|
url: "https://github.com/ultralytics/ultralytics"
|
|
44
44
|
},
|
|
45
45
|
url: "https://github.com/ultralytics/ultralytics/blob/main/LICENSE",
|
|
46
|
-
attribution: "© Ultralytics, AGPL-3.0. Corresponding source: the upstream Ultralytics checkpoint and
|
|
46
|
+
attribution: "© Ultralytics, AGPL-3.0. Corresponding source: the upstream Ultralytics checkpoint and build-camstack-models.py (with convert_lib.py) published at https://huggingface.co/camstack/camstack-models/tree/main/source.",
|
|
47
47
|
modifications: "exported to ONNX, OpenVINO IR and CoreML (scripts/build-camstack-models.py)",
|
|
48
48
|
hosting: "camstack-hf"
|
|
49
49
|
};
|
|
50
50
|
var ULTRALYTICS_YOLOV9_AGPL = {
|
|
51
51
|
...ULTRALYTICS_AGPL,
|
|
52
|
-
attribution: "© Ultralytics, AGPL-3.0 (Ultralytics YOLOv9 weights). YOLOv9 architecture: Chien-Yao Wang, I-Hau Yeh, Hong-Yuan Mark Liao, GPL-3.0 (https://github.com/WongKinYiu/yolov9). Corresponding source: the upstream Ultralytics checkpoint and
|
|
52
|
+
attribution: "© Ultralytics, AGPL-3.0 (Ultralytics YOLOv9 weights). YOLOv9 architecture: Chien-Yao Wang, I-Hau Yeh, Hong-Yuan Mark Liao, GPL-3.0 (https://github.com/WongKinYiu/yolov9). Corresponding source: the upstream Ultralytics checkpoint and build-camstack-models.py (with convert_lib.py) published at https://huggingface.co/camstack/camstack-models/tree/main/source."
|
|
53
53
|
};
|
|
54
54
|
/** The CamStack Coral COCO detector (SSD MobileNet V2). */
|
|
55
55
|
var CORAL_COCO_APACHE = {
|
|
@@ -104,6 +104,30 @@ var AURAFACE_APACHE = {
|
|
|
104
104
|
modifications: "input scaling y = 2x - 1 baked ahead of the first Conv (scripts/build-auraface-model.py); converted to OpenVINO IR and CoreML FP16",
|
|
105
105
|
hosting: "camstack-hf"
|
|
106
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* open-lpr's YOLOX-tiny plate detector (D719). Weights Apache-2.0 by the
|
|
109
|
+
* open-lpr repository licence and NOTICE (YOLOX code and its same-repository
|
|
110
|
+
* COCO weights are Apache-2.0; no Ultralytics weights used) — the weights'
|
|
111
|
+
* status is inferred from that statement, not from a per-file licence. The
|
|
112
|
+
* NOTICE travels verbatim (Apache-2.0 §4(d)): licenses/models/NOTICE-open-lpr.txt
|
|
113
|
+
* and the mirror folder's own NOTICE.
|
|
114
|
+
*/
|
|
115
|
+
var OPEN_LPR_YOLOX_APACHE = {
|
|
116
|
+
weights: "Apache-2.0",
|
|
117
|
+
code: "Apache-2.0",
|
|
118
|
+
data: {
|
|
119
|
+
name: "Simanno annotated plate corpus plus community-contributed photographs, pseudo-labelled by a teacher model (not published; the upstream NOTICE says the photographs were uploaded without consent obtained)",
|
|
120
|
+
terms: "UNKNOWN"
|
|
121
|
+
},
|
|
122
|
+
upstream: {
|
|
123
|
+
name: "open-lpr models (faisalthaheem/open-lpr-models), YOLOX-tiny",
|
|
124
|
+
url: "https://huggingface.co/faisalthaheem/open-lpr-models"
|
|
125
|
+
},
|
|
126
|
+
url: "https://huggingface.co/faisalthaheem/open-lpr-models/blob/aed0df35ec2891c5a90437041ebeadb592cc516b/LICENSE",
|
|
127
|
+
attribution: "open-lpr models, Copyright the open-lpr contributors, Apache-2.0 (https://huggingface.co/faisalthaheem/open-lpr-models, tag detector-2026.10.1). YOLOX architecture and COCO pretraining by Megvii (https://github.com/Megvii-BaseDetection/YOLOX), Apache-2.0. The upstream NOTICE is reproduced verbatim (`NOTICE-open-lpr.txt`).",
|
|
128
|
+
modifications: "input contract baked into the graph (static 1x3x640x640 RGB /255 becomes the upstream BGR 0..255: Mul(255) plus a channel Gather) and the output reshaped to the YOLOv8 layout (cx, cy, w, h, obj*cls); ONNX fp32, OpenVINO IR fp16, CoreML fp16 (scripts/build-yolox-plate-model.py)",
|
|
129
|
+
hosting: "camstack-hf"
|
|
130
|
+
};
|
|
107
131
|
var FAST_PLATE_OCR_MIT = {
|
|
108
132
|
weights: "MIT",
|
|
109
133
|
code: "MIT",
|
|
@@ -145,7 +169,7 @@ var AIY_BIRDS_APACHE = {
|
|
|
145
169
|
},
|
|
146
170
|
url: "https://github.com/google-coral/test_data/blob/master/LICENSE",
|
|
147
171
|
attribution: "Coral Edge TPU models and AIY Vision Birds V1 © Google LLC, Apache-2.0.",
|
|
148
|
-
modifications: "converted from TensorFlow with tf2onnx; OpenVINO IR and CoreML derived from it",
|
|
172
|
+
modifications: "converted from TensorFlow with tf2onnx; OpenVINO IR and CoreML derived from it; the Edge TPU build is the Google full-integer quantised TFLite of the same model, compiled with edgetpu_compiler 14 (scripts/build-bird-classifier-edgetpu.py)",
|
|
149
173
|
hosting: "camstack-hf"
|
|
150
174
|
};
|
|
151
175
|
var VEHICLE_TYPE_V1_NC = {
|
|
@@ -762,17 +786,10 @@ var FACE_EMBEDDING_MODELS = [{
|
|
|
762
786
|
}
|
|
763
787
|
}];
|
|
764
788
|
var PLATE_DETECTION_MODELS = [{
|
|
765
|
-
id: "
|
|
766
|
-
license:
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
terms: "UNKNOWN"
|
|
770
|
-
},
|
|
771
|
-
attribution: "© Ultralytics, AGPL-3.0 (YOLOv8n base, fine-tuned for plates by an unidentified third party). CamStack holds no training checkpoint; the ONNX file is the only form it has.",
|
|
772
|
-
modifications: "converted to OpenVINO IR and CoreML"
|
|
773
|
-
}),
|
|
774
|
-
name: "YOLOv8 Nano — License Plate",
|
|
775
|
-
description: "YOLOv8 Nano fine-tuned for license plate detection",
|
|
789
|
+
id: "yolox-tiny-plate",
|
|
790
|
+
license: OPEN_LPR_YOLOX_APACHE,
|
|
791
|
+
name: "YOLOX-tiny — License Plate",
|
|
792
|
+
description: "YOLOX-tiny licence-plate detector trained by the open-lpr project (Apache-2.0)",
|
|
776
793
|
inputSize: {
|
|
777
794
|
width: 640,
|
|
778
795
|
height: 640
|
|
@@ -782,19 +799,20 @@ var PLATE_DETECTION_MODELS = [{
|
|
|
782
799
|
name: "License Plate"
|
|
783
800
|
}],
|
|
784
801
|
preprocessMode: "letterbox",
|
|
802
|
+
postprocessor: "yolo",
|
|
785
803
|
formats: {
|
|
786
804
|
onnx: {
|
|
787
|
-
url: hf("plateDetection/
|
|
788
|
-
sizeMB:
|
|
805
|
+
url: hf("plateDetection/yolox-tiny-plate/onnx/camstack-yolox-tiny-plate.onnx"),
|
|
806
|
+
sizeMB: 19.3
|
|
789
807
|
},
|
|
790
808
|
coreml: {
|
|
791
|
-
url: hf("plateDetection/
|
|
792
|
-
sizeMB:
|
|
809
|
+
url: hf("plateDetection/yolox-tiny-plate/coreml/camstack-yolox-tiny-plate.mlpackage"),
|
|
810
|
+
sizeMB: 9.8,
|
|
793
811
|
isDirectory: true,
|
|
794
812
|
files: [...MLPACKAGE_FILES],
|
|
795
813
|
runtimes: ["python"]
|
|
796
814
|
},
|
|
797
|
-
openvino: ovFormat(hf("plateDetection/
|
|
815
|
+
openvino: ovFormat(hf("plateDetection/yolox-tiny-plate/openvino/camstack-yolox-tiny-plate.xml"), 10)
|
|
798
816
|
}
|
|
799
817
|
}];
|
|
800
818
|
var PACKAGE_DETECTION_MODELS = [{
|
|
@@ -924,7 +942,12 @@ var BIRD_CLASSIFIER_MODELS = [{
|
|
|
924
942
|
files: [...MLPACKAGE_FILES],
|
|
925
943
|
runtimes: ["python"]
|
|
926
944
|
},
|
|
927
|
-
openvino: ovFormat(hf("animalClassification/bird-classifier/openvino/bird-classifier.xml"), 14)
|
|
945
|
+
openvino: ovFormat(hf("animalClassification/bird-classifier/openvino/bird-classifier.xml"), 14),
|
|
946
|
+
tflite: {
|
|
947
|
+
url: hf("animalClassification/bird-classifier/tflite/bird-classifier_edgetpu.tflite"),
|
|
948
|
+
sizeMB: 3.9,
|
|
949
|
+
runtimes: ["python"]
|
|
950
|
+
}
|
|
928
951
|
},
|
|
929
952
|
extraFiles: [{
|
|
930
953
|
url: hf("animalClassification/bird-classifier/onnx/bird-classifier-labels.json"),
|
|
@@ -1151,16 +1174,27 @@ var ANIMAL_10_LABELS = [
|
|
|
1151
1174
|
"sheep",
|
|
1152
1175
|
"spider"
|
|
1153
1176
|
];
|
|
1154
|
-
var ANIMAL_CLASSIFIER_LABELS = [
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1177
|
+
var ANIMAL_CLASSIFIER_LABELS = FILLABLE_STEP_VOCABULARIES["animal-classifier"];
|
|
1178
|
+
var VEHICLE_CLASSIFIER_LABELS = FILLABLE_STEP_VOCABULARIES["vehicle-classifier"];
|
|
1179
|
+
/**
|
|
1180
|
+
* The `labelLink` policy field (D715) — offered on every step a root detector
|
|
1181
|
+
* can fill. Stored in the step's own settings (`DeviceStepConfig.settings` /
|
|
1182
|
+
* `CameraStepOverridePatch.settings`), so it has ONE authority. It changes
|
|
1183
|
+
* nothing unless the camera's root model declares it fills this step.
|
|
1184
|
+
*/
|
|
1185
|
+
function labelLinkField(stepName) {
|
|
1186
|
+
return {
|
|
1187
|
+
type: "select",
|
|
1188
|
+
key: LABEL_LINK_SETTING_KEY,
|
|
1189
|
+
label: "When the detector already fills this step",
|
|
1190
|
+
description: `Only matters when the root detection model declares it fills ${stepName} (e.g. a Frigate+ model). "Skip" does not run ${stepName} for a subject the detector already named, and makes the detector's label the one answer — but only once every class the detector cannot produce is switched off in this step's class list. "Run" always runs ${stepName}; the detector's label is then a fallback any answer of the step outranks.`,
|
|
1191
|
+
options: LABEL_LINK_POLICIES.map((p) => ({
|
|
1192
|
+
value: p,
|
|
1193
|
+
label: p === "run" ? "Run anyway" : "Skip when filled"
|
|
1194
|
+
})),
|
|
1195
|
+
default: DEFAULT_LABEL_LINK_POLICY
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1164
1198
|
var VGG_G2_CHARSET = [
|
|
1165
1199
|
"",
|
|
1166
1200
|
..."0123456789".split(""),
|
|
@@ -1376,27 +1410,31 @@ var AnimalClassifierStep = class {
|
|
|
1376
1410
|
}
|
|
1377
1411
|
};
|
|
1378
1412
|
getConfigSchema(model) {
|
|
1379
|
-
return [
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1413
|
+
return [
|
|
1414
|
+
{
|
|
1415
|
+
type: "multiselect",
|
|
1416
|
+
key: "enabledClasses",
|
|
1417
|
+
label: "Species",
|
|
1418
|
+
description: "Which animal species to keep (empty = all). The classifier still scores every label but only the selected classes are returned on the detection.",
|
|
1419
|
+
options: ANIMAL_CLASSIFIER_LABELS.map((l) => ({
|
|
1420
|
+
value: l,
|
|
1421
|
+
label: l
|
|
1422
|
+
})),
|
|
1423
|
+
default: []
|
|
1424
|
+
},
|
|
1425
|
+
labelLinkField("the animal classifier"),
|
|
1426
|
+
{
|
|
1427
|
+
type: "slider",
|
|
1428
|
+
key: "minConfidence",
|
|
1429
|
+
label: "Min Confidence",
|
|
1430
|
+
description: "Drop classifications whose score is below this threshold.",
|
|
1431
|
+
default: resolveModelDefaultConfidence(this.definition, model),
|
|
1432
|
+
min: 0,
|
|
1433
|
+
max: 1,
|
|
1434
|
+
step: .05,
|
|
1435
|
+
showValue: true
|
|
1436
|
+
}
|
|
1437
|
+
];
|
|
1400
1438
|
}
|
|
1401
1439
|
};
|
|
1402
1440
|
/**
|
|
@@ -1434,7 +1472,7 @@ var PackageDetectionStep = class extends PipelineStepBase {
|
|
|
1434
1472
|
step: .05,
|
|
1435
1473
|
default: resolveModelDefaultConfidence(this.definition, model),
|
|
1436
1474
|
showValue: true
|
|
1437
|
-
}];
|
|
1475
|
+
}, labelLinkField("package detection")];
|
|
1438
1476
|
}
|
|
1439
1477
|
};
|
|
1440
1478
|
var ClassifierWithMinConfidence = class extends PipelineStepBase {
|
|
@@ -1582,7 +1620,7 @@ var STEP_PLATE_DETECTION = new PipelineStepBase({
|
|
|
1582
1620
|
inputClasses: ["vehicle"],
|
|
1583
1621
|
outputClasses: ["plate"],
|
|
1584
1622
|
models: [...PLATE_DETECTION_MODELS],
|
|
1585
|
-
defaultModelId: "
|
|
1623
|
+
defaultModelId: "yolox-tiny-plate",
|
|
1586
1624
|
defaultConfidence: .5,
|
|
1587
1625
|
defaultMinParentScore: .7,
|
|
1588
1626
|
labels: ["plate"],
|
|
@@ -1649,7 +1687,32 @@ var STEP_BIRD_CLASSIFIER = new ClassifierWithMinConfidence({
|
|
|
1649
1687
|
stickyOnConfidence: .7
|
|
1650
1688
|
}
|
|
1651
1689
|
});
|
|
1652
|
-
|
|
1690
|
+
/**
|
|
1691
|
+
* `vehicle-classifier` — the `minConfidence` slider plus the two fields a
|
|
1692
|
+
* root-detector fill needs (D715): the class allow-list (a coverage gap the
|
|
1693
|
+
* detector cannot produce, e.g. `Van` for Frigate+, is switched off HERE before
|
|
1694
|
+
* the skip applies) and the `labelLink` policy.
|
|
1695
|
+
*/
|
|
1696
|
+
var VehicleClassifierStep = class extends ClassifierWithMinConfidence {
|
|
1697
|
+
getConfigSchema(model) {
|
|
1698
|
+
return [
|
|
1699
|
+
{
|
|
1700
|
+
type: "multiselect",
|
|
1701
|
+
key: "enabledClasses",
|
|
1702
|
+
label: "Vehicle types",
|
|
1703
|
+
description: "Which vehicle types to keep (empty = all). The classifier still scores every type but only the selected ones are returned on the detection.",
|
|
1704
|
+
options: VEHICLE_CLASSIFIER_LABELS.map((l) => ({
|
|
1705
|
+
value: l,
|
|
1706
|
+
label: l
|
|
1707
|
+
})),
|
|
1708
|
+
default: []
|
|
1709
|
+
},
|
|
1710
|
+
...super.getConfigSchema(model),
|
|
1711
|
+
labelLinkField("the vehicle classifier")
|
|
1712
|
+
];
|
|
1713
|
+
}
|
|
1714
|
+
};
|
|
1715
|
+
var STEP_VEHICLE_CLASSIFIER = new VehicleClassifierStep({
|
|
1653
1716
|
id: "vehicle-classifier",
|
|
1654
1717
|
name: "Vehicle Classifier",
|
|
1655
1718
|
slot: "classifier",
|
|
@@ -2879,14 +2942,10 @@ var LocalFrameRegistry = class {
|
|
|
2879
2942
|
if (entry.releaseNativeOnClose) entry.image.releaseNativeLease?.();
|
|
2880
2943
|
}
|
|
2881
2944
|
};
|
|
2882
|
-
function envPositiveInt(name, fallback) {
|
|
2883
|
-
const parsed = Number(process.env[name]);
|
|
2884
|
-
return Number.isFinite(parsed) && parsed > 0 ? Math.floor(parsed) : fallback;
|
|
2885
|
-
}
|
|
2886
2945
|
/** Shared only by addons in the same grouped runner process. */
|
|
2887
2946
|
var localFrameRegistry = new LocalFrameRegistry({
|
|
2888
|
-
maxFrames:
|
|
2889
|
-
maxBytes:
|
|
2947
|
+
maxFrames: DEFAULT_MAX_FRAMES,
|
|
2948
|
+
maxBytes: DEFAULT_MAX_BYTES
|
|
2890
2949
|
});
|
|
2891
2950
|
//#endregion
|
|
2892
2951
|
//#region src/detection-pipeline/pipeline/macro-gate.ts
|
|
@@ -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-wJO7mXeO.js");
|
|
7
|
+
const require_node = require("../node-BCrqaejt.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-1SadEKsW.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-iUJuTpXs.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");
|
|
@@ -4093,7 +4093,7 @@ function requestedModels(steps) {
|
|
|
4093
4093
|
const walk = (nodes) => {
|
|
4094
4094
|
for (const step of nodes) {
|
|
4095
4095
|
if (!step.enabled) continue;
|
|
4096
|
-
out.set(step.addonId, step.modelId);
|
|
4096
|
+
if (step.modelId !== void 0) out.set(step.addonId, step.modelId);
|
|
4097
4097
|
if (step.children !== void 0) walk(step.children);
|
|
4098
4098
|
}
|
|
4099
4099
|
};
|
|
@@ -5444,7 +5444,7 @@ var PLATE_OCR_CROP_POLICIES = {
|
|
|
5444
5444
|
minLongSidePx: 85
|
|
5445
5445
|
},
|
|
5446
5446
|
"plate-slots": {
|
|
5447
|
-
marginFraction: .
|
|
5447
|
+
marginFraction: .05,
|
|
5448
5448
|
rectify: false,
|
|
5449
5449
|
minLongSidePx: 70
|
|
5450
5450
|
}
|
|
@@ -6134,6 +6134,41 @@ function toMutableRootDetection(det, rootStep, idGen, rootStepLatencyMs) {
|
|
|
6134
6134
|
};
|
|
6135
6135
|
}
|
|
6136
6136
|
//#endregion
|
|
6137
|
+
//#region src/detection-pipeline/pipeline/linked-label.ts
|
|
6138
|
+
/**
|
|
6139
|
+
* The detector's linked label (D715): when the model that RAN declares it
|
|
6140
|
+
* fills a step, a detection whose raw class names that step's effect carries
|
|
6141
|
+
* the effect as a `ScoredLabel` attributed to `detector-link:<stepId>` — in
|
|
6142
|
+
* the step's own vocabulary and tier, so tier 1 means one thing whichever
|
|
6143
|
+
* writer produced it.
|
|
6144
|
+
*
|
|
6145
|
+
* Written at score 0 here, always: the executor cannot see the camera's whole
|
|
6146
|
+
* step tree (a detail step placed on another pool is pruned from the dispatch),
|
|
6147
|
+
* so it cannot know who the writer is. The runner, which holds the attach
|
|
6148
|
+
* config, raises the score to the detection's own when the detector is
|
|
6149
|
+
* authoritative (`pipeline-runner/label-link.ts`). Score 0 is the fallback any
|
|
6150
|
+
* scored answer of the step outranks.
|
|
6151
|
+
*/
|
|
6152
|
+
/** The linked labels one mapped root detection carries. Pure. */
|
|
6153
|
+
function linkedLabelsFor(fills, rawClass, macroClass, modelId) {
|
|
6154
|
+
if (fills === void 0 || fills.length === 0) return [];
|
|
6155
|
+
const out = [];
|
|
6156
|
+
for (const fill of fills) {
|
|
6157
|
+
if (require_dist.FILLABLE_STEP_MACRO[fill.stepId] !== macroClass) continue;
|
|
6158
|
+
const effect = fill.labelToEffect[rawClass];
|
|
6159
|
+
if (effect === void 0 || effect === macroClass) continue;
|
|
6160
|
+
const tier = require_default_detection_model.getStepDefinition(fill.stepId).labelTier;
|
|
6161
|
+
out.push({
|
|
6162
|
+
label: effect,
|
|
6163
|
+
score: 0,
|
|
6164
|
+
...tier !== void 0 ? { tier } : {},
|
|
6165
|
+
stepId: require_dist.linkedLabelStepId(fill.stepId),
|
|
6166
|
+
modelId
|
|
6167
|
+
});
|
|
6168
|
+
}
|
|
6169
|
+
return out;
|
|
6170
|
+
}
|
|
6171
|
+
//#endregion
|
|
6137
6172
|
//#region src/detection-pipeline/pipeline/executor.ts
|
|
6138
6173
|
/**
|
|
6139
6174
|
* Default minimum short-side (px, source-frame resolution) of a face bbox for
|
|
@@ -6403,6 +6438,7 @@ var PipelineExecutor = class {
|
|
|
6403
6438
|
continue;
|
|
6404
6439
|
}
|
|
6405
6440
|
}
|
|
6441
|
+
for (const linked of linkedLabelsFor(rootStep.fillsClassifierEffects, det.class, mutable.macroClass, rootStep.modelId)) mutable.ownLabels.push(linked);
|
|
6406
6442
|
const filterVerdict = this.macroFilterVerdict(mutable.macroClass, mutable.score, rootStep.settings);
|
|
6407
6443
|
if (filterVerdict !== "pass") {
|
|
6408
6444
|
(discarded ??= []).push({
|
|
@@ -6971,7 +7007,8 @@ function buildNode(step, getEngine, resolveModel, onMissingVariant, resolved) {
|
|
|
6971
7007
|
enabled: step.enabled,
|
|
6972
7008
|
children,
|
|
6973
7009
|
...Object.keys(mergedSettings).length > 0 ? { settings: mergedSettings } : {},
|
|
6974
|
-
...effectiveClassMap !== void 0 ? { effectiveClassMap } : {}
|
|
7010
|
+
...effectiveClassMap !== void 0 ? { effectiveClassMap } : {},
|
|
7011
|
+
...modelEntry?.fillsClassifierEffects !== void 0 ? { fillsClassifierEffects: modelEntry.fillsClassifierEffects } : {}
|
|
6975
7012
|
};
|
|
6976
7013
|
}
|
|
6977
7014
|
/**
|
|
@@ -7757,7 +7794,9 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
7757
7794
|
* The rebuild is not cheap — `ensureModelsForSteps` loads EVERY enabled step
|
|
7758
7795
|
* into the fresh factory, which on the hub is seven models
|
|
7759
7796
|
* (yolov9m-320-int8, scrfd-2.5g, arcface-r100, yolov8n-plate,
|
|
7760
|
-
* vgg_english_g2, mobileclip-s1-vision, yolov8n-package
|
|
7797
|
+
* vgg_english_g2, mobileclip-s1-vision, yolov8n-package — the set of that
|
|
7798
|
+
* date; all but the root detector have since been replaced, D703/D719).
|
|
7799
|
+
* The hub log shows
|
|
7761
7800
|
* the cycle plainly: `COMPILE ×7` → shed within 7-15s → `EVICT` ~2.5 min
|
|
7762
7801
|
* later → repeat. So the first seconds of a motion event — precisely when
|
|
7763
7802
|
* detection matters — were spent recompiling models that had just been
|
|
@@ -10608,7 +10647,8 @@ function buildSchemaSlots(formats, modelsDir, customByStep) {
|
|
|
10608
10647
|
...m.group ? { group: m.group } : {},
|
|
10609
10648
|
...m.legacy !== void 0 ? { legacy: m.legacy } : {},
|
|
10610
10649
|
provider: m.provider ?? "camstack",
|
|
10611
|
-
defaultConfidence: require_default_detection_model.resolveModelDefaultConfidence(step, m)
|
|
10650
|
+
defaultConfidence: require_default_detection_model.resolveModelDefaultConfidence(step, m),
|
|
10651
|
+
...m.fillsClassifierEffects !== void 0 ? { fillsClassifierEffects: m.fillsClassifierEffects } : {}
|
|
10612
10652
|
})),
|
|
10613
10653
|
defaultModelId: step.defaultModelId,
|
|
10614
10654
|
...step.defaultModelIdByFormat ? { defaultModelIdByFormat: { ...step.defaultModelIdByFormat } } : {},
|
|
@@ -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 { An as hydrateSchema, Bn as array, Dt as loadContributionCapability, En as createEvent, F as PoolMemoryWatchdog, Fn as parseJsonUnknown, Ht as pipelineExecutorCapability, K as YAMNET_TO_MACRO, Kn as object, Lt as overlayClusterStepSettings, Pn as nodePin, Rn as sleep, Sn as BaseAddon, T as FILLABLE_STEP_MACRO, Tt as linkedLabelStepId, Xn as union, Yn as string, Yt as resolveClusterStepModelId, Zn as EventCategory, at as defaultDeviceFor$1, b as DEVICE_BACKEND_TO_FORMAT, bn as errMsg, cn as supportedRuntimes$1, d as CLUSTER_MODEL_SCOPED_STEPS, en as resolvePoolMemoryPolicy, ft as enumerateInferenceDevices, h as DEFAULT_CLUSTER_STEP_SETTINGS, lt as detectionPipelineCapability, n as APPLE_SA_TO_MACRO, nn as runtimeDevices$1, pt as evaluateZoneRules, rn as stepModelRunsOnFormat, zt as pickClusterStepSettings } from "../dist-Bpub2VcJ.mjs";
|
|
3
|
+
import { s as readProcessCost } from "../node-BjCSgD4M.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-CMeVTcPZ.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-BaKQ8u2G.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";
|
|
@@ -4086,7 +4086,7 @@ function requestedModels(steps) {
|
|
|
4086
4086
|
const walk = (nodes) => {
|
|
4087
4087
|
for (const step of nodes) {
|
|
4088
4088
|
if (!step.enabled) continue;
|
|
4089
|
-
out.set(step.addonId, step.modelId);
|
|
4089
|
+
if (step.modelId !== void 0) out.set(step.addonId, step.modelId);
|
|
4090
4090
|
if (step.children !== void 0) walk(step.children);
|
|
4091
4091
|
}
|
|
4092
4092
|
};
|
|
@@ -5437,7 +5437,7 @@ var PLATE_OCR_CROP_POLICIES = {
|
|
|
5437
5437
|
minLongSidePx: 85
|
|
5438
5438
|
},
|
|
5439
5439
|
"plate-slots": {
|
|
5440
|
-
marginFraction: .
|
|
5440
|
+
marginFraction: .05,
|
|
5441
5441
|
rectify: false,
|
|
5442
5442
|
minLongSidePx: 70
|
|
5443
5443
|
}
|
|
@@ -6127,6 +6127,41 @@ function toMutableRootDetection(det, rootStep, idGen, rootStepLatencyMs) {
|
|
|
6127
6127
|
};
|
|
6128
6128
|
}
|
|
6129
6129
|
//#endregion
|
|
6130
|
+
//#region src/detection-pipeline/pipeline/linked-label.ts
|
|
6131
|
+
/**
|
|
6132
|
+
* The detector's linked label (D715): when the model that RAN declares it
|
|
6133
|
+
* fills a step, a detection whose raw class names that step's effect carries
|
|
6134
|
+
* the effect as a `ScoredLabel` attributed to `detector-link:<stepId>` — in
|
|
6135
|
+
* the step's own vocabulary and tier, so tier 1 means one thing whichever
|
|
6136
|
+
* writer produced it.
|
|
6137
|
+
*
|
|
6138
|
+
* Written at score 0 here, always: the executor cannot see the camera's whole
|
|
6139
|
+
* step tree (a detail step placed on another pool is pruned from the dispatch),
|
|
6140
|
+
* so it cannot know who the writer is. The runner, which holds the attach
|
|
6141
|
+
* config, raises the score to the detection's own when the detector is
|
|
6142
|
+
* authoritative (`pipeline-runner/label-link.ts`). Score 0 is the fallback any
|
|
6143
|
+
* scored answer of the step outranks.
|
|
6144
|
+
*/
|
|
6145
|
+
/** The linked labels one mapped root detection carries. Pure. */
|
|
6146
|
+
function linkedLabelsFor(fills, rawClass, macroClass, modelId) {
|
|
6147
|
+
if (fills === void 0 || fills.length === 0) return [];
|
|
6148
|
+
const out = [];
|
|
6149
|
+
for (const fill of fills) {
|
|
6150
|
+
if (FILLABLE_STEP_MACRO[fill.stepId] !== macroClass) continue;
|
|
6151
|
+
const effect = fill.labelToEffect[rawClass];
|
|
6152
|
+
if (effect === void 0 || effect === macroClass) continue;
|
|
6153
|
+
const tier = getStepDefinition(fill.stepId).labelTier;
|
|
6154
|
+
out.push({
|
|
6155
|
+
label: effect,
|
|
6156
|
+
score: 0,
|
|
6157
|
+
...tier !== void 0 ? { tier } : {},
|
|
6158
|
+
stepId: linkedLabelStepId(fill.stepId),
|
|
6159
|
+
modelId
|
|
6160
|
+
});
|
|
6161
|
+
}
|
|
6162
|
+
return out;
|
|
6163
|
+
}
|
|
6164
|
+
//#endregion
|
|
6130
6165
|
//#region src/detection-pipeline/pipeline/executor.ts
|
|
6131
6166
|
/**
|
|
6132
6167
|
* Default minimum short-side (px, source-frame resolution) of a face bbox for
|
|
@@ -6396,6 +6431,7 @@ var PipelineExecutor = class {
|
|
|
6396
6431
|
continue;
|
|
6397
6432
|
}
|
|
6398
6433
|
}
|
|
6434
|
+
for (const linked of linkedLabelsFor(rootStep.fillsClassifierEffects, det.class, mutable.macroClass, rootStep.modelId)) mutable.ownLabels.push(linked);
|
|
6399
6435
|
const filterVerdict = this.macroFilterVerdict(mutable.macroClass, mutable.score, rootStep.settings);
|
|
6400
6436
|
if (filterVerdict !== "pass") {
|
|
6401
6437
|
(discarded ??= []).push({
|
|
@@ -6964,7 +7000,8 @@ function buildNode(step, getEngine, resolveModel, onMissingVariant, resolved) {
|
|
|
6964
7000
|
enabled: step.enabled,
|
|
6965
7001
|
children,
|
|
6966
7002
|
...Object.keys(mergedSettings).length > 0 ? { settings: mergedSettings } : {},
|
|
6967
|
-
...effectiveClassMap !== void 0 ? { effectiveClassMap } : {}
|
|
7003
|
+
...effectiveClassMap !== void 0 ? { effectiveClassMap } : {},
|
|
7004
|
+
...modelEntry?.fillsClassifierEffects !== void 0 ? { fillsClassifierEffects: modelEntry.fillsClassifierEffects } : {}
|
|
6968
7005
|
};
|
|
6969
7006
|
}
|
|
6970
7007
|
/**
|
|
@@ -7750,7 +7787,9 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
7750
7787
|
* The rebuild is not cheap — `ensureModelsForSteps` loads EVERY enabled step
|
|
7751
7788
|
* into the fresh factory, which on the hub is seven models
|
|
7752
7789
|
* (yolov9m-320-int8, scrfd-2.5g, arcface-r100, yolov8n-plate,
|
|
7753
|
-
* vgg_english_g2, mobileclip-s1-vision, yolov8n-package
|
|
7790
|
+
* vgg_english_g2, mobileclip-s1-vision, yolov8n-package — the set of that
|
|
7791
|
+
* date; all but the root detector have since been replaced, D703/D719).
|
|
7792
|
+
* The hub log shows
|
|
7754
7793
|
* the cycle plainly: `COMPILE ×7` → shed within 7-15s → `EVICT` ~2.5 min
|
|
7755
7794
|
* later → repeat. So the first seconds of a motion event — precisely when
|
|
7756
7795
|
* detection matters — were spent recompiling models that had just been
|
|
@@ -10601,7 +10640,8 @@ function buildSchemaSlots(formats, modelsDir, customByStep) {
|
|
|
10601
10640
|
...m.group ? { group: m.group } : {},
|
|
10602
10641
|
...m.legacy !== void 0 ? { legacy: m.legacy } : {},
|
|
10603
10642
|
provider: m.provider ?? "camstack",
|
|
10604
|
-
defaultConfidence: resolveModelDefaultConfidence(step, m)
|
|
10643
|
+
defaultConfidence: resolveModelDefaultConfidence(step, m),
|
|
10644
|
+
...m.fillsClassifierEffects !== void 0 ? { fillsClassifierEffects: m.fillsClassifierEffects } : {}
|
|
10605
10645
|
})),
|
|
10606
10646
|
defaultModelId: step.defaultModelId,
|
|
10607
10647
|
...step.defaultModelIdByFormat ? { defaultModelIdByFormat: { ...step.defaultModelIdByFormat } } : {},
|