@camstack/addon-post-analysis 1.2.335 → 1.2.337
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 +2 -2
- package/dist/{clip-model-registry-D7e1kEqc.mjs → clip-model-registry-CD0UYoAb.mjs} +249 -92
- package/dist/{clip-model-registry-BxUHFGUg.js → clip-model-registry-CML1YOOa.js} +259 -90
- package/dist/embedding-encoder/index.js +2 -2
- package/dist/embedding-encoder/index.mjs +2 -2
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-NmXf2bwM.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DGaCYQ8R.mjs} +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D7NMYqUM.mjs +26 -0
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-bIOxWlPv.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-DM07J5TU.mjs → hostInit-Dlhtn22B.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +148 -61
- package/dist/pipeline-analytics/index.mjs +148 -61
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BMP6Hyub.mjs +0 -26
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DxUsRAkr.mjs +0 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, $n as encodeVectorBase64, $r as
|
|
1
|
+
import { $ as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, $n as encodeVectorBase64, $r as systemEventDeliveryProblems, $t as RECORDING_SOURCE_CAMSTACK_ADDON, A as EMBEDDING_MODEL_FAILED, Ai as literal, An as applyModeDelaysEdits, Ar as plateGalleryCapability, At as NcLegacyRuleActionSequenceSchema, B as LabelAttributionSchema, Bi as union, Bn as coreBlockIdFromAddonId, Br as rootSupplyServes, Bt as NcSnoozeInputSchema, C as CoverStateSchema, Cn as TrackSideSchema, Cr as linkedStepOf, Ct as NcAlarmConfigSchema, D as DETECTION_PIPELINE_CAP_NAME, Di as array, Dn as alarmDeviceSecureOnArm, Dr as occupancyScope, Dt as NcAlarmSettingsPatchSchema, E as DETECTION_MACRO_CLASSES, Ei as _enum, En as addonWidgetsSourceCapability, Er as notificationRulesCapability, Et as NcAlarmSensorsSchema, F as EVENT_OWNER_TYPES, Fi as record, Fn as audioModeOf, Fr as resolveClipSearchMinScore, Ft as NcRuleSchema, G as MAX_BIRTH_DECISION_RECORDS, Gn as deriveRecordingMode, Gr as ruleKindOf, Gt as NcTaxonomySchema, H as ListTrackRelationsResultSchema, Hi as EventCategory, Hn as createAlarmProfile, Hr as ruleBelongsToAlarm$1, Ht as NcSnoozeSuppressedSchema, I as EXPORT_DENSE_MAX_RANGES, Ii as strictObject, In as buildEventKindDescriptor, Ir as resolveLocationMode, It as NcRuleTargetSchema, J as MAX_TRACK_RELATIONS, Jr as sensorRaisedOf, Jt as NcTemplateVarDescriptorSchema, K as MAX_BIRTH_LATENCY_PROXY_MS, Kn as describeSystemEventDeliveryProblem, Kr as sceneMonitorCapability, Kt as NcTemplatePreviewInputSchema, L as FIRST_LEVEL_MACRO_CLASSES, Li as string, Ln as buildViewerLink, Lr as resolveModeDelays, Lt as NcRuleUpdateInputSchema, M as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Mi as number, Mn as applySecureOnArmEdit, Mr as readMotionTriggeredBy, Mt as NcRuleActionsSchema, N as EVENT_DENSITY_BATCH_MAX, Ni as object, Nn as assertTimelapseCadences, Nr as readTimelapseGeneratedAt, Nt as NcRuleInputSchema, O as DeclaredDevices, Oi as boolean, On as alarmPanelCapability, Ot as NcConditionDescriptorSchema, P as EVENT_KIND_BY_CAP, Pi as partialRecord, Pn as audioMetricsCapability, Pr as renameAlarmProfile, Pt as NcRulePatchSchema, Q as NC_ALARM_DEFAULT_PROFILE_ID, Qr as syncActiveAlarmProfileSettings, Qt as RECORDING_EXPORT_MAX_READ_BYTES, R as FULL_IMAGE_BBOX, Ri as templateLiteral, Rn as cloneAlarmSettings, Rr as resolveModeNotifyPolicy, Rt as NcScheduleSchema, S as ClearTrackRelationResultSchema, Si as nodePin, Sn as TrackRelationSchema, Sr as kebabToCamel, St as NC_TEMPLATE_VARS, T as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Ti as ZodObject, Tn as activateAlarmProfile, Tr as memoizePinnedFfmpeg, Tt as NcAlarmSensorsInputSchema, U as LockStateSchema, Un as deleteAlarmProfile, Ur as ruleDeviceCompatCapQueries, Ut as NcStateSummarySectionIdSchema, V as ListTrackRelationsInputSchema, Vi as unknown, Vn as cosineSimilarity$1, Vr as ruleAutoTriggersAlarm, Vt as NcSnoozeSchema, W as MAX_ARCHIVED_DEBUG_NOTES, Wn as derivePostTriggeredAction, Wr as ruleGroupingApplies, Wt as NcSystemEventKindSchema, X as MediaFileKindEnum, Xn as embeddingRefusalOf, Xr as storageOccupancyCapability, Xt as OpsLogEntrySchema, Y as MOTION_CLOSE_AFTER_MS, Yr as servedTemplateVars, Yt as OPS_LOG_DEFAULT_LIMIT, Z as MotionTriggeredBySchema, Zr as subKindsOf, _ as BIRTH_DECISION_DEFAULT_LIMIT, _i as createEvent, _n as TimelapseRuleInputSchema, _r as isRootSuppliableStepId, _t as NC_SENSOR_TRANSITION_KINDS, a as CLIP_EMBEDDING_STEP_ID, ai as templateVarsFor, an as SCENE_DEFAULT_CHECK_INTERVAL_SEC, ar as gifDeriveSpeed, at as NC_AUDIO_CONFIRM_HITS_DEFAULT, b as COCO_TO_MACRO, bi as hydrateSchema, bn as TrackPuritySchema, br as isSystemEventSummaryRule, bt as NC_TANK_SYSTEM_EVENT_KINDS, c as resolveClusterModelPin, ci as zoneAnalyticsCapability, cn as SCENE_DEFAULT_UNCOVERED_POLICY, cr as isAppLinkBase, ct as NC_CLIP_PRE_ROLL_DEFAULT_SEC, d as APPEARANCE_BLOCKS, di as evaluateSensorEdge, dn as SceneMonitorSchema, dr as isDetectionMacroClass, dt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, ei as systemEventFamilyProblems, en as RebuildObjectEmbeddingsRefusalSchema, er as ensureAlarmProfiles, et as NC_ALARM_DELAY_FIELDS, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fi as isSourceCap, fn as SetTrackPurityInputSchema, fr as isEventKindLabelKey, ft as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, g as ArchivedDebugNoteSchema, gi as CamProfileSchema, gn as TRACK_RELATIONS_DEFAULT_LIMIT, gr as isRetiredClearKey, gt as NC_GROUPING_MIN_SEC, h as AlarmArmModeSchema, hi as BaseAddon, hn as TIMELAPSE_DENSE_FLOOR_SEC, hr as isMediaOwnerType, ht as NC_GROUPING_MAX_SEC, ii as templateCarriesSummary, in as SCENE_DEFAULT_ANCHOR_THRESHOLD, ir as failureContributionCapability, it as NC_ALARM_TRIGGERED_MAX_SEC, j as EMBEDDING_REQUIREMENTS_FAILED, ji as looseObject, jn as applyNonBlockingEdit, jr as readDeviceStateFrom, jt as NcRuleActionSchema, k as DetectionSourceSchema, ki as discriminatedUnion, kn as applyBlockingEdit, kr as pipelineAnalyticsCapability, kt as NcConditionsSchema, l as ALL_CAPABILITY_DEFINITIONS, li as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, ln as SCENE_DIVERGED, lr as isAudioClassName, lt as NC_CLIP_RETENTION_MAX_SEC, m as AUDIO_MACRO_LABELS, mi as errMsg, mn as SetTrackRelationInputSchema, mr as isKnownTemplateVar, mt as NC_GROUPING_DEFAULT_SEC, ni as systemEventSummaryScheduleOf, nn as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, nr as evictionPolicyOfLocation, nt as NC_ALARM_NOTIFY_FIELDS, o as FACE_EMBEDDING_STEP_ID, oi as vectorDimFromBase64, on as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, or as gifFromMp4Args, ot as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pi as DeviceType, pn as SetTrackPurityResultSchema, pr as isEventOwnerType, pt as NC_DEFAULT_SNOOZE_MINUTES, q as MAX_TRACK_PURITIES, qn as describeSystemEventFamilyProblem, qr as secureActuationFor, qt as NcTemplatePreviewSchema, ri as systemEventSummarySplitOf, rn as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, rr as faceGalleryCapability, rt as NC_ALARM_SYSTEM_EVENT_KINDS, s as readClusterModelPinStrict, si as viewerLinkBaseOf, sn as SCENE_DEFAULT_QUIET_SECONDS, sr as isAlarmControllableCap, st as NC_CLIP_POST_ROLL_DEFAULT_SEC, t as BUILTIN_CLIP_MODELS, ti as systemEventFilterApplies, tn as RetrainStatusSchema, tr as eventKindLabel, tt as NC_ALARM_DELAY_MAX_SEC, u as APPEARANCE_BIN_COUNT, ui as canonicalHash, un as SCENE_RESET_RECAPTURES, ur as isDefaultAlarmProfileId, ut as NC_CONDITION_CATALOG, v as BaseDevice, vi as customAction, vn as TimelapseRulePatchSchema, vr as isScheduleActive, vt as NC_SNOOZE_MAX_MINUTES, w as DEFAULT_EVENT_COLOR, wi as sleep$1, wn as TrackSourceSchema, wr as mayWriteToLocation, wt as NcAlarmPostTriggeredActionSchema, x as ClearTrackRelationInputSchema, xi as isDeviceScopedCap, xn as TrackRelationKindSchema, xr as isVectorIndexDimConflict, xt as NC_TAXONOMY, y as BirthDecisionRecordSchema, yi as defineCustomActions, yn as TimelapseRuleSchema, yr as isSystemDelivery, yt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, z as FailureCounters, zi as tuple, zn as consumableLowPercentOf, zt as NcSharedSequenceSchema } from "../clip-model-registry-CD0UYoAb.mjs";
|
|
2
2
|
import { t as __exportAll } from "../embedding-encoder/index.mjs";
|
|
3
3
|
import * as fs$1 from "node:fs";
|
|
4
4
|
import { createWriteStream, promises } from "node:fs";
|
|
@@ -4649,8 +4649,8 @@ function verifyArtifactSignature(input) {
|
|
|
4649
4649
|
//#region src/notification-center/artifact-plane.ts
|
|
4650
4650
|
/**
|
|
4651
4651
|
* The hub's default HTTPS API port — the same constant `derive-hub-url.ts`
|
|
4652
|
-
* documents. Only
|
|
4653
|
-
*
|
|
4652
|
+
* documents. Only a legacy hint for the LAN candidates: `local-network`
|
|
4653
|
+
* builds them with the port the hub really listens on.
|
|
4654
4654
|
*/
|
|
4655
4655
|
var HUB_API_PORT = 4443;
|
|
4656
4656
|
/**
|
|
@@ -4659,12 +4659,11 @@ var HUB_API_PORT = 4443;
|
|
|
4659
4659
|
* zero to outrank it.
|
|
4660
4660
|
*/
|
|
4661
4661
|
var PRIORITY_MARKED = -400;
|
|
4662
|
-
var PRIORITY_CONFIGURED = -300;
|
|
4663
4662
|
var PRIORITY_CONNECTED = -200;
|
|
4664
4663
|
var PRIORITY_EXTERNAL_LIST = -100;
|
|
4665
4664
|
/**
|
|
4666
|
-
* Build the ranked candidate list, in the operator's own order:
|
|
4667
|
-
*
|
|
4665
|
+
* Build the ranked candidate list, in the operator's own order: the address
|
|
4666
|
+
* marked on the Network page, then the connected external ingress (tunnels),
|
|
4668
4667
|
* then the LAN addresses. Every source is best-effort — one that throws
|
|
4669
4668
|
* contributes nothing rather than costing the whole list.
|
|
4670
4669
|
*/
|
|
@@ -4676,12 +4675,6 @@ async function collectArtifactEndpoints(sources) {
|
|
|
4676
4675
|
kind: "public",
|
|
4677
4676
|
priority: PRIORITY_MARKED
|
|
4678
4677
|
});
|
|
4679
|
-
const configured = sources.configuredPublicUrl;
|
|
4680
|
-
if (configured !== void 0 && configured !== "" && !/127\.0\.0\.1|localhost/.test(configured)) out.push({
|
|
4681
|
-
baseUrl: configured,
|
|
4682
|
-
kind: "public",
|
|
4683
|
-
priority: PRIORITY_CONFIGURED
|
|
4684
|
-
});
|
|
4685
4678
|
try {
|
|
4686
4679
|
const connected = await sources.getConnected();
|
|
4687
4680
|
if (connected !== null && connected.protocol === "https") out.push({
|
|
@@ -45337,10 +45330,10 @@ var MediaStore = class MediaStore {
|
|
|
45337
45330
|
ownerKind: params.ownerKind,
|
|
45338
45331
|
ownerId: params.ownerId,
|
|
45339
45332
|
kind: params.kind,
|
|
45340
|
-
hint: "pipeline-analytics:media must be rebuilt with an INTEGER PRIMARY KEY
|
|
45333
|
+
hint: "pipeline-analytics:media must be rebuilt with an INTEGER PRIMARY KEY"
|
|
45341
45334
|
}
|
|
45342
45335
|
});
|
|
45343
|
-
throw new Error(`MediaStore.put: "${MEDIA_COLLECTION}" returned a TEXT id (${id}) — the table has not been rebuilt with an INTEGER PRIMARY KEY
|
|
45336
|
+
throw new Error(`MediaStore.put: "${MEDIA_COLLECTION}" returned a TEXT id (${id}) — the table has not been rebuilt with an INTEGER PRIMARY KEY`);
|
|
45344
45337
|
}
|
|
45345
45338
|
this.pressure.noteSuccess();
|
|
45346
45339
|
return id;
|
|
@@ -48791,7 +48784,7 @@ function planTrackMediaNames(media) {
|
|
|
48791
48784
|
}
|
|
48792
48785
|
return out;
|
|
48793
48786
|
}
|
|
48794
|
-
var DEBUG_RETENTION_NOTE = "A `debug` mark does not pin retention
|
|
48787
|
+
var DEBUG_RETENTION_NOTE = "A `debug` mark does not pin retention. A track with no media here may have been evicted rather than never captured.";
|
|
48795
48788
|
/** The archive filename, stamped so two downloads never collide in ~/Downloads. */
|
|
48796
48789
|
function debugArchiveFilename(nowMs) {
|
|
48797
48790
|
return `camstack-debug-${new Date(nowMs).toISOString().replace(/[:.]/g, "-")}.zip`.replace(/[\r\n"]/g, "");
|
|
@@ -53386,7 +53379,7 @@ var FaceAlignmentJobs = class {
|
|
|
53386
53379
|
const stores = this.deps.stores();
|
|
53387
53380
|
if (stores === null) throw new Error("embedding.reenrolPhotos: the gallery stores are not ready");
|
|
53388
53381
|
if (this.photoPassRunning) throw new Error("embedding.reenrolPhotos: a photo re-enrol pass is already running");
|
|
53389
|
-
if (this.resetRunning) throw new Error("embedding.reenrolPhotos: a face gallery reset is running
|
|
53382
|
+
if (this.resetRunning) throw new Error("embedding.reenrolPhotos: a face gallery reset is running");
|
|
53390
53383
|
if (this.deps.isReembedRunning()) throw new Error("embedding.reenrolPhotos: a face re-embed pass is running — the photo pass waits for it");
|
|
53391
53384
|
this.photoPassRunning = true;
|
|
53392
53385
|
try {
|
|
@@ -53442,7 +53435,7 @@ var FaceAlignmentJobs = class {
|
|
|
53442
53435
|
const stores = this.deps.stores();
|
|
53443
53436
|
if (stores === null) throw new Error("embedding.backfillPhotoSources: the gallery stores are not ready");
|
|
53444
53437
|
if (this.photoPassRunning) throw new Error("embedding.backfillPhotoSources: a photo re-enrol pass is running");
|
|
53445
|
-
if (this.resetRunning) throw new Error("embedding.backfillPhotoSources: a face gallery reset is running
|
|
53438
|
+
if (this.resetRunning) throw new Error("embedding.backfillPhotoSources: a face gallery reset is running");
|
|
53446
53439
|
this.backfillRunning = true;
|
|
53447
53440
|
try {
|
|
53448
53441
|
return await this.runBackfill(stores, input);
|
|
@@ -60961,15 +60954,6 @@ function isIdleTrackerStats(stats) {
|
|
|
60961
60954
|
}
|
|
60962
60955
|
/** Shared empty — a fold is rare and every other frame would allocate. */
|
|
60963
60956
|
var EMPTY_RIDER_FOLDS = [];
|
|
60964
|
-
/** The steps a detection's linked labels stand in for (D715), or `undefined` for none. */
|
|
60965
|
-
function linkedStepsOf(labels) {
|
|
60966
|
-
if (labels === void 0) return void 0;
|
|
60967
|
-
const steps = labels.flatMap((l) => {
|
|
60968
|
-
const step = linkedStepOf(l.stepId);
|
|
60969
|
-
return step === void 0 ? [] : [step];
|
|
60970
|
-
});
|
|
60971
|
-
return steps.length > 0 ? steps : void 0;
|
|
60972
|
-
}
|
|
60973
60957
|
/** The tape observation of a dropped frame: no gate verdict, nothing bound. */
|
|
60974
60958
|
var DROPPED_FRAME_OBSERVATION = {
|
|
60975
60959
|
gate: {
|
|
@@ -61520,6 +61504,7 @@ var FrameProcessor = class {
|
|
|
61520
61504
|
const nativeRecoveryByBbox = /* @__PURE__ */ new Map();
|
|
61521
61505
|
const birthEvidenceByBbox = /* @__PURE__ */ new Map();
|
|
61522
61506
|
const faceBearingBoxes = /* @__PURE__ */ new Set();
|
|
61507
|
+
const rootChildBoxesByBbox = /* @__PURE__ */ new Map();
|
|
61523
61508
|
const flatDetections = frame.detections.filter((d) => d.kind === "first-level").map((det) => {
|
|
61524
61509
|
const bbox = {
|
|
61525
61510
|
x: det.bbox.x,
|
|
@@ -61600,6 +61585,23 @@ var FrameProcessor = class {
|
|
|
61600
61585
|
}
|
|
61601
61586
|
});
|
|
61602
61587
|
}
|
|
61588
|
+
for (const det of frame.detections) {
|
|
61589
|
+
if (det.kind !== "detail" || det.rootSupplied === void 0 || !det.parentId) continue;
|
|
61590
|
+
const parentBbox = firstLevelBboxById.get(det.parentId);
|
|
61591
|
+
if (parentBbox === void 0) continue;
|
|
61592
|
+
const boxes = rootChildBoxesByBbox.get(parentBbox) ?? [];
|
|
61593
|
+
rootChildBoxesByBbox.set(parentBbox, [...boxes, {
|
|
61594
|
+
stepId: det.rootSupplied.stepId,
|
|
61595
|
+
modelId: det.rootSupplied.modelId,
|
|
61596
|
+
score: det.score,
|
|
61597
|
+
bbox: {
|
|
61598
|
+
x: det.bbox.x,
|
|
61599
|
+
y: det.bbox.y,
|
|
61600
|
+
w: det.bbox.width,
|
|
61601
|
+
h: det.bbox.height
|
|
61602
|
+
}
|
|
61603
|
+
}]);
|
|
61604
|
+
}
|
|
61603
61605
|
const { passed, excluded } = this.zoneEngine.filterDetections(flatDetections, this.zones, this.detectionRules, frameWidth, frameHeight, (fd) => fd.detection.class);
|
|
61604
61606
|
this.reportZoneFiltered(excluded);
|
|
61605
61607
|
let filteredDetections = passed.map((fd) => fd.detection);
|
|
@@ -61646,6 +61648,8 @@ var FrameProcessor = class {
|
|
|
61646
61648
|
if (mask !== void 0) maskByBbox.set(to, mask);
|
|
61647
61649
|
const plate = plateByBbox.get(from);
|
|
61648
61650
|
if (plate !== void 0) plateByBbox.set(to, plate);
|
|
61651
|
+
const rootChildren = rootChildBoxesByBbox.get(from);
|
|
61652
|
+
if (rootChildren !== void 0) rootChildBoxesByBbox.set(to, rootChildren);
|
|
61649
61653
|
const faceBbox = faceBboxByBbox.get(from);
|
|
61650
61654
|
if (faceBbox !== void 0) faceBboxByBbox.set(to, faceBbox);
|
|
61651
61655
|
const faceSize = nativeFaceSizeByBbox.get(from);
|
|
@@ -61877,7 +61881,7 @@ var FrameProcessor = class {
|
|
|
61877
61881
|
const sourceDetectionId = sourceIdByBbox.get(td.bbox);
|
|
61878
61882
|
const nativeRecovery = td.matchedThisFrame !== false ? nativeRecoveryByBbox.get(td.bbox) : void 0;
|
|
61879
61883
|
const birthEvidence = td.matchedThisFrame !== false ? birthEvidenceByBbox.get(td.bbox) : void 0;
|
|
61880
|
-
const
|
|
61884
|
+
const rootChildBoxes = td.matchedThisFrame !== false ? rootChildBoxesByBbox.get(td.bbox) : void 0;
|
|
61881
61885
|
return {
|
|
61882
61886
|
trackId: td.trackId,
|
|
61883
61887
|
...sourceDetectionId !== void 0 ? { sourceDetectionId } : {},
|
|
@@ -61904,7 +61908,7 @@ var FrameProcessor = class {
|
|
|
61904
61908
|
} : {},
|
|
61905
61909
|
...nativeRecovery !== void 0 ? { nativeRecovery } : {},
|
|
61906
61910
|
...birthEvidence !== void 0 ? { birthEvidence } : {},
|
|
61907
|
-
...
|
|
61911
|
+
...rootChildBoxes !== void 0 ? { rootChildBoxes } : {}
|
|
61908
61912
|
};
|
|
61909
61913
|
});
|
|
61910
61914
|
this.lastLabelWriteRefusals = refusals;
|
|
@@ -78182,14 +78186,20 @@ var DetailScheduler = class {
|
|
|
78182
78186
|
if (this.underMaxPerTrack(state)) state.retryPending = true;
|
|
78183
78187
|
}
|
|
78184
78188
|
/**
|
|
78185
|
-
* The root model the announce says
|
|
78186
|
-
* Read from the announce the track was scheduled with.
|
|
78189
|
+
* The root model the announce says SUPPLIES this (track, step), and how
|
|
78190
|
+
* (D730). Read from the announce the track was scheduled with. An announce
|
|
78191
|
+
* from a runner that predates `filledAs` named only label supplies.
|
|
78187
78192
|
*/
|
|
78188
|
-
|
|
78189
|
-
|
|
78193
|
+
rootSupply(trackId, stepId) {
|
|
78194
|
+
const announce = this.tracks.get(trackId)?.get(stepId)?.announce;
|
|
78195
|
+
if (announce?.filledBy === void 0) return void 0;
|
|
78196
|
+
return {
|
|
78197
|
+
modelId: announce.filledBy,
|
|
78198
|
+
kind: announce.filledAs ?? "label"
|
|
78199
|
+
};
|
|
78190
78200
|
}
|
|
78191
78201
|
/**
|
|
78192
|
-
* The
|
|
78202
|
+
* The root model already produced this step's effect for the track (D730):
|
|
78193
78203
|
* the step is settled for the track's life — no retry, improve or periodic
|
|
78194
78204
|
* re-fire. Same terminal state as a confident result.
|
|
78195
78205
|
*/
|
|
@@ -78251,6 +78261,35 @@ function composeDetailSteps(req, hasTrackLabel) {
|
|
|
78251
78261
|
if (req.stepId === "plate-detection") return ["plate-detection", "plate-ocr"];
|
|
78252
78262
|
return [req.stepId];
|
|
78253
78263
|
}
|
|
78264
|
+
/** The children a root-supplied crop step still feeds (`rootSupplyServes`). */
|
|
78265
|
+
function servedChildren(stepId) {
|
|
78266
|
+
if (!isRootSuppliableStepId(stepId)) return [];
|
|
78267
|
+
if (stepId !== "plate-detection" && stepId !== "face-detection") return [];
|
|
78268
|
+
return rootSupplyServes(stepId);
|
|
78269
|
+
}
|
|
78270
|
+
/**
|
|
78271
|
+
* Carry the root's frame-space boxes into a parcel's pixel space, by the same
|
|
78272
|
+
* mapping that took the subject's box there (`parked.bbox` is `frame.bbox`
|
|
78273
|
+
* rescaled). Pure.
|
|
78274
|
+
*/
|
|
78275
|
+
function suppliedInParcel(supplied, frameBox, parcelBox) {
|
|
78276
|
+
const sx = frameBox.w > 0 ? parcelBox.w / frameBox.w : 1;
|
|
78277
|
+
const sy = frameBox.h > 0 ? parcelBox.h / frameBox.h : 1;
|
|
78278
|
+
const [first, ...rest] = supplied.boxes.map((b) => ({
|
|
78279
|
+
score: b.score,
|
|
78280
|
+
bbox: {
|
|
78281
|
+
x: parcelBox.x + (b.bbox.x - frameBox.x) * sx,
|
|
78282
|
+
y: parcelBox.y + (b.bbox.y - frameBox.y) * sy,
|
|
78283
|
+
w: b.bbox.w * sx,
|
|
78284
|
+
h: b.bbox.h * sy
|
|
78285
|
+
}
|
|
78286
|
+
}));
|
|
78287
|
+
if (first === void 0) return supplied;
|
|
78288
|
+
return {
|
|
78289
|
+
...supplied,
|
|
78290
|
+
boxes: [first, ...rest]
|
|
78291
|
+
};
|
|
78292
|
+
}
|
|
78254
78293
|
/**
|
|
78255
78294
|
* Does `steps` name a nested-enrichment chain (root detector + a child that
|
|
78256
78295
|
* produces a `label`/`embedding`), i.e. more than the bare root step? Used to
|
|
@@ -78335,6 +78374,7 @@ var TrackDetailDispatcher = class {
|
|
|
78335
78374
|
dev.scheduler.onTrackEnded(trackId);
|
|
78336
78375
|
dev.tracks.delete(trackId);
|
|
78337
78376
|
dev.parcelEnriched.delete(trackId);
|
|
78377
|
+
for (const key of dev.rootBoxMissLogged) if (key.startsWith(`${trackId}:`)) dev.rootBoxMissLogged.delete(key);
|
|
78338
78378
|
dev.candidateBest.delete(trackId);
|
|
78339
78379
|
if (dev.tracks.size === 0) this.clearTimer(dev);
|
|
78340
78380
|
}
|
|
@@ -78366,7 +78406,8 @@ var TrackDetailDispatcher = class {
|
|
|
78366
78406
|
inFlight: 0,
|
|
78367
78407
|
timer: null,
|
|
78368
78408
|
lastFailWarnAt: 0,
|
|
78369
|
-
lastEnrichWarnAt: 0
|
|
78409
|
+
lastEnrichWarnAt: 0,
|
|
78410
|
+
rootBoxMissLogged: /* @__PURE__ */ new Set()
|
|
78370
78411
|
};
|
|
78371
78412
|
this.devices.set(deviceId, dev);
|
|
78372
78413
|
}
|
|
@@ -78431,30 +78472,56 @@ var TrackDetailDispatcher = class {
|
|
|
78431
78472
|
this.pump(deviceId, dev);
|
|
78432
78473
|
}
|
|
78433
78474
|
/**
|
|
78434
|
-
*
|
|
78435
|
-
*
|
|
78436
|
-
* the
|
|
78437
|
-
* settled for the track, which is what makes the line below fire once per
|
|
78438
|
-
* (track, step)
|
|
78439
|
-
*
|
|
78440
|
-
* before.
|
|
78475
|
+
* D730: the root model supplies this step (the announce's `filledBy`), so it
|
|
78476
|
+
* is never inferred as-is. A LABEL supply — or a crop supply none of whose
|
|
78477
|
+
* children the root's box can feed — has nothing left to dispatch: the step
|
|
78478
|
+
* is settled for the track, which is what makes the line below fire once per
|
|
78479
|
+
* (track, step). A crop supply WITH served children (a plate → its reader, a
|
|
78480
|
+
* face → refinement + embedder) is dispatched, with the root's box.
|
|
78441
78481
|
*/
|
|
78442
78482
|
skipFilled(deviceId, dev, req) {
|
|
78443
|
-
const
|
|
78444
|
-
if (
|
|
78445
|
-
if (
|
|
78483
|
+
const supply = dev.scheduler.rootSupply(req.trackId, req.stepId);
|
|
78484
|
+
if (supply === void 0) return false;
|
|
78485
|
+
if (supply.kind === "crop" && servedChildren(req.stepId).length > 0) return false;
|
|
78446
78486
|
dev.scheduler.markFilled(req.trackId, req.stepId);
|
|
78447
|
-
this.deps.logger.info("detail step
|
|
78487
|
+
this.deps.logger.info("detail step not dispatched — the root model supplies it", {
|
|
78448
78488
|
tags: { deviceId },
|
|
78449
78489
|
meta: {
|
|
78450
78490
|
trackId: req.trackId,
|
|
78451
78491
|
stepId: req.stepId,
|
|
78452
|
-
filledBy,
|
|
78492
|
+
filledBy: supply.modelId,
|
|
78493
|
+
kind: supply.kind,
|
|
78453
78494
|
reason: req.reason
|
|
78454
78495
|
}
|
|
78455
78496
|
});
|
|
78456
78497
|
return true;
|
|
78457
78498
|
}
|
|
78499
|
+
/**
|
|
78500
|
+
* The root-supplied form of a crop request (D730): the step plus the
|
|
78501
|
+
* children its root box serves, and that box. `'no-box'` when the root drew
|
|
78502
|
+
* none inside this subject on its freshest frame — the same outcome as the
|
|
78503
|
+
* step's own model finding nothing, so the scheduler retries per cadence.
|
|
78504
|
+
* `undefined` for every request the root does not supply.
|
|
78505
|
+
*/
|
|
78506
|
+
rootSuppliedDispatch(dev, req, frame) {
|
|
78507
|
+
const supply = dev.scheduler.rootSupply(req.trackId, req.stepId);
|
|
78508
|
+
if (supply?.kind !== "crop") return void 0;
|
|
78509
|
+
const served = servedChildren(req.stepId);
|
|
78510
|
+
const composed = composeDetailSteps(req, (id) => this.deps.hasTrackLabel?.(id) ?? false);
|
|
78511
|
+
const [first, ...rest] = (frame.rootChildBoxes ?? []).filter((b) => b.stepId === req.stepId).map((b) => ({
|
|
78512
|
+
bbox: { ...b.bbox },
|
|
78513
|
+
score: b.score
|
|
78514
|
+
}));
|
|
78515
|
+
if (first === void 0) return "no-box";
|
|
78516
|
+
return {
|
|
78517
|
+
steps: [req.stepId, ...composed.filter((s) => served.includes(s))],
|
|
78518
|
+
supplied: {
|
|
78519
|
+
stepId: req.stepId,
|
|
78520
|
+
modelId: supply.modelId,
|
|
78521
|
+
boxes: [first, ...rest]
|
|
78522
|
+
}
|
|
78523
|
+
};
|
|
78524
|
+
}
|
|
78458
78525
|
pump(deviceId, dev) {
|
|
78459
78526
|
while (dev.inFlight < this.maxInFlight && dev.queue.length > 0) {
|
|
78460
78527
|
const req = dev.queue.shift();
|
|
@@ -78469,7 +78536,24 @@ var TrackDetailDispatcher = class {
|
|
|
78469
78536
|
}
|
|
78470
78537
|
}
|
|
78471
78538
|
async dispatch(deviceId, dev, req, frame) {
|
|
78472
|
-
const
|
|
78539
|
+
const rootSupplied = this.rootSuppliedDispatch(dev, req, frame);
|
|
78540
|
+
if (rootSupplied === "no-box") {
|
|
78541
|
+
const key = `${req.trackId}:${req.stepId}`;
|
|
78542
|
+
if (!dev.rootBoxMissLogged.has(key)) {
|
|
78543
|
+
dev.rootBoxMissLogged.add(key);
|
|
78544
|
+
this.deps.logger.info("detail step waits — the root model drew no box in this subject yet", {
|
|
78545
|
+
tags: { deviceId },
|
|
78546
|
+
meta: {
|
|
78547
|
+
trackId: req.trackId,
|
|
78548
|
+
stepId: req.stepId,
|
|
78549
|
+
reason: req.reason
|
|
78550
|
+
}
|
|
78551
|
+
});
|
|
78552
|
+
}
|
|
78553
|
+
dev.scheduler.onResult(req.trackId, req.stepId, null, Date.now());
|
|
78554
|
+
return;
|
|
78555
|
+
}
|
|
78556
|
+
const details = await this.runOnce(deviceId, dev, req, frame, rootSupplied);
|
|
78473
78557
|
if (details === null) {
|
|
78474
78558
|
dev.scheduler.onFrameMiss(req.trackId, req.stepId, Date.now());
|
|
78475
78559
|
return;
|
|
@@ -78524,19 +78608,21 @@ var TrackDetailDispatcher = class {
|
|
|
78524
78608
|
* the same missing lease). Walking them anyway is what burned two extra
|
|
78525
78609
|
* cross-node RPCs per refusal, ~600–900 times an hour fleet-wide.
|
|
78526
78610
|
*/
|
|
78527
|
-
async runOnce(deviceId, dev, req, frame) {
|
|
78611
|
+
async runOnce(deviceId, dev, req, frame, rootSupplied) {
|
|
78528
78612
|
const parent = {
|
|
78529
78613
|
bbox: { ...frame.bbox },
|
|
78530
78614
|
className: frame.className
|
|
78531
78615
|
};
|
|
78532
|
-
const steps = composeDetailSteps(req, (trackId) => this.deps.hasTrackLabel?.(trackId) ?? false);
|
|
78616
|
+
const steps = rootSupplied ? [...rootSupplied.steps] : composeDetailSteps(req, (trackId) => this.deps.hasTrackLabel?.(trackId) ?? false);
|
|
78617
|
+
const supplied = rootSupplied ? { supplied: rootSupplied.supplied } : {};
|
|
78533
78618
|
let handleRefused = false;
|
|
78534
78619
|
if (frame.frameHandle !== void 0) try {
|
|
78535
78620
|
const primary = await this.deps.runDetailSubtree({
|
|
78536
78621
|
deviceId,
|
|
78537
78622
|
frameHandle: frame.frameHandle,
|
|
78538
78623
|
parent,
|
|
78539
|
-
steps
|
|
78624
|
+
steps,
|
|
78625
|
+
...supplied
|
|
78540
78626
|
}, frame.nodeId);
|
|
78541
78627
|
if (primary !== null) return primary.details;
|
|
78542
78628
|
} catch (err) {
|
|
@@ -78574,7 +78660,8 @@ var TrackDetailDispatcher = class {
|
|
|
78574
78660
|
bbox: { ...parked.bbox },
|
|
78575
78661
|
className: frame.className
|
|
78576
78662
|
},
|
|
78577
|
-
steps
|
|
78663
|
+
steps,
|
|
78664
|
+
...rootSupplied ? { supplied: suppliedInParcel(rootSupplied.supplied, frame.bbox, parked.bbox) } : {}
|
|
78578
78665
|
}, parked.nodeId);
|
|
78579
78666
|
if (derived !== null) {
|
|
78580
78667
|
const perStep = dev.parcelEnriched.get(req.trackId) ?? /* @__PURE__ */ new Map();
|
|
@@ -78604,7 +78691,8 @@ var TrackDetailDispatcher = class {
|
|
|
78604
78691
|
deviceId,
|
|
78605
78692
|
cropJpeg,
|
|
78606
78693
|
parent,
|
|
78607
|
-
steps
|
|
78694
|
+
steps,
|
|
78695
|
+
...supplied
|
|
78608
78696
|
}, frame.nodeId);
|
|
78609
78697
|
if (retry !== null) return retry.details;
|
|
78610
78698
|
}
|
|
@@ -102131,7 +102219,7 @@ function buildDetectionSettingsSections() {
|
|
|
102131
102219
|
{
|
|
102132
102220
|
id: "tracking",
|
|
102133
102221
|
title: "Tracking",
|
|
102134
|
-
description: "Per-device tracker tuning
|
|
102222
|
+
description: "Per-device tracker tuning: association, coasting, spawn floors, sub-floor continuation and detector-dropout handling. Use the deviceId-tagged logs (track started/lost/ended, frame processed) to measure the effect.",
|
|
102135
102223
|
columns: 2,
|
|
102136
102224
|
fields: [
|
|
102137
102225
|
{
|
|
@@ -102313,7 +102401,7 @@ function buildDetectionSettingsSections() {
|
|
|
102313
102401
|
type: "number",
|
|
102314
102402
|
key: "byteTrackLowIouThreshold",
|
|
102315
102403
|
label: "Sub-floor recovery IoU",
|
|
102316
|
-
description: "The IoU a sub-floor box needs with a moving tracklet’s prediction to re-attach it
|
|
102404
|
+
description: "The IoU a sub-floor box needs with a moving tracklet’s prediction to re-attach it. Which boxes count as sub-floor is decided by the \"keep tracks through low-confidence frames\" option below.",
|
|
102317
102405
|
min: 0,
|
|
102318
102406
|
max: 1,
|
|
102319
102407
|
step: .05,
|
|
@@ -106525,7 +106613,6 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
|
|
|
106525
106613
|
async ncEndpoints() {
|
|
106526
106614
|
return collectArtifactEndpoints({
|
|
106527
106615
|
markedBaseUrl: await this.markedNotificationEndpoint(),
|
|
106528
|
-
configuredPublicUrl: process.env["CAMSTACK_HUB_PUBLIC_URL"],
|
|
106529
106616
|
getConnected: async () => {
|
|
106530
106617
|
const status = await this.ctx.api.networkAccess.getStatus.query();
|
|
106531
106618
|
this.ctx.logger.debug("artifact base-url: connected ingress", { meta: {
|
|
@@ -110192,7 +110279,7 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
|
|
|
110192
110279
|
this.ctx.logger.error("artifacts storage location is NOT available — enrolling a face, a plate or a scene reference will FAIL until it is", { meta: {
|
|
110193
110280
|
location: ARTIFACTS_MEDIA_LOCATION,
|
|
110194
110281
|
error: errMsg(err),
|
|
110195
|
-
hint: "the declaration is seeded when a storage-provider registers; restart this node so the manifest is re-read, or create an artifacts location. Refusing the write is deliberate — the
|
|
110282
|
+
hint: "the declaration is seeded when a storage-provider registers; restart this node so the manifest is re-read, or create an artifacts location. Refusing the write is deliberate — the gallery is never written to the footage volume, and the addon data dir carries no media."
|
|
110196
110283
|
} });
|
|
110197
110284
|
return;
|
|
110198
110285
|
}
|
|
@@ -111603,7 +111690,7 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
|
|
|
111603
111690
|
frameHandle,
|
|
111604
111691
|
nodeId: frameHandle.nodeId
|
|
111605
111692
|
} : {},
|
|
111606
|
-
...t.
|
|
111693
|
+
...t.rootChildBoxes !== void 0 ? { rootChildBoxes: t.rootChildBoxes } : {}
|
|
111607
111694
|
};
|
|
111608
111695
|
if (prevIds.has(t.trackId)) dispatcher.onFrame(deviceId, t.trackId, steps, detailFrame, result.timestamp);
|
|
111609
111696
|
else dispatcher.onTrackStarted(deviceId, t.trackId, t.className, steps, detailFrame, result.timestamp);
|
|
@@ -116474,8 +116561,8 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
|
|
|
116474
116561
|
const mediaStore = this.mediaStore;
|
|
116475
116562
|
if (!mediaStore) throw new Error("embedding.reembedFaces: the media store is not ready");
|
|
116476
116563
|
if (this.faceReembedRunning) throw new Error("embedding.reembedFaces: a face re-embed pass is already running");
|
|
116477
|
-
if (this.faceAlignmentJobs?.isPhotoPassRunning === true) throw new Error("embedding.reembedFaces: a photo re-enrol pass is running
|
|
116478
|
-
if (this.faceAlignmentJobs?.isResetRunning === true) throw new Error("embedding.reembedFaces: a face gallery reset is running
|
|
116564
|
+
if (this.faceAlignmentJobs?.isPhotoPassRunning === true) throw new Error("embedding.reembedFaces: a photo re-enrol pass is running");
|
|
116565
|
+
if (this.faceAlignmentJobs?.isResetRunning === true) throw new Error("embedding.reembedFaces: a face gallery reset is running");
|
|
116479
116566
|
this.faceReembedRunning = true;
|
|
116480
116567
|
try {
|
|
116481
116568
|
let targetModelId = confirmedTargetModelId;
|
|
@@ -116545,8 +116632,8 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
|
|
|
116545
116632
|
const mediaStore = this.mediaStore;
|
|
116546
116633
|
if (!mediaStore) throw new Error("faceGallery.reembedSamples: the media store is not ready");
|
|
116547
116634
|
if (this.faceReembedRunning) throw new Error("faceGallery.reembedSamples: a face re-embed pass is already running");
|
|
116548
|
-
if (this.faceAlignmentJobs?.isPhotoPassRunning === true) throw new Error("faceGallery.reembedSamples: a photo re-enrol pass is running
|
|
116549
|
-
if (this.faceAlignmentJobs?.isResetRunning === true) throw new Error("faceGallery.reembedSamples: a face gallery reset is running
|
|
116635
|
+
if (this.faceAlignmentJobs?.isPhotoPassRunning === true) throw new Error("faceGallery.reembedSamples: a photo re-enrol pass is running");
|
|
116636
|
+
if (this.faceAlignmentJobs?.isResetRunning === true) throw new Error("faceGallery.reembedSamples: a face gallery reset is running");
|
|
116550
116637
|
this.faceReembedRunning = true;
|
|
116551
116638
|
try {
|
|
116552
116639
|
const embedder = new FaceReembedEmbedder({
|
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DGaCYQ8R.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-post-analysis",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.337",
|
|
4
4
|
"description": "Post-Analysis bundle — enrichment, embedding-encoder, pipeline-analytics. Multi-entry npm package shipping addons that consume pipeline output.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"id": "artifacts",
|
|
118
118
|
"displayName": "Artifacts",
|
|
119
119
|
"cardinality": "single",
|
|
120
|
-
"description": "Notification artifacts (stills, GIFs, clips, timelapses behind signed links and the viewer's artifact library), operator-exported video clips, the enrolled gallery (face/plate reference crops and scene photographs) and the tracking tapes (pixel-free per-camera tracker input
|
|
120
|
+
"description": "Notification artifacts (stills, GIFs, clips, timelapses behind signed links and the viewer's artifact library), operator-exported video clips, the enrolled gallery (face/plate reference crops and scene photographs) and the tracking tapes (pixel-free per-camera tracker input), in disjoint subtrees of ONE root. Each tenant keeps its OWN retention — the notification shelf's bounds (6 h send scratch; 14 d / 2000 / 2 GiB retained), per-export expiry + delete-after-download, NONE for the gallery (enrolled samples survive every sweep), 24 h for tape segments and none for promoted tapes (the operator deletes them once the case is committed) — and no media-class retention may attach to any of them. Exactly ONE location (singleton). Not part of the system backup, gallery included — a deliberate operator decision: media locations are operator-managed; a remote-media-backup cap is the intended future answer.",
|
|
121
121
|
"defaultRoot": "media"
|
|
122
122
|
}
|
|
123
123
|
],
|