@trillboards/edge-sdk 0.2.267 → 0.2.276
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/deploy/detector/pyproject.toml +1 -1
- package/deploy/detector/tests/test_loader.py +1 -1
- package/deploy/detector/tests/test_staff_uniform.py +342 -0
- package/deploy/detector/trillboards_detector/_version.py +2 -2
- package/deploy/detector/trillboards_detector/loader.py +6 -0
- package/deploy/detector/trillboards_detector/registry.py +30 -1
- package/deploy/detector/trillboards_detector/server.py +43 -0
- package/deploy/detector/trillboards_detector/staff_uniform.py +190 -0
- package/deploy/detector/trillboards_detector/tasks.py +9 -1
- package/deploy/windows/build-windows.ps1 +3 -0
- package/deploy/windows/ci/test-published-install.ps1 +1 -1
- package/deploy/windows/e2e/test-recorder-family.ps1 +1 -1
- package/deploy/windows/process-priority.ps1 +229 -0
- package/dist/ActorPerception.d.ts.map +1 -1
- package/dist/ActorPerception.js +3 -1
- package/dist/ActorPerception.js.map +1 -1
- package/dist/AlertClips.d.ts +120 -0
- package/dist/AlertClips.d.ts.map +1 -1
- package/dist/AlertClips.js +296 -17
- package/dist/AlertClips.js.map +1 -1
- package/dist/AudienceAnalyzeClient.d.ts +34 -0
- package/dist/AudienceAnalyzeClient.d.ts.map +1 -1
- package/dist/AudienceAnalyzeClient.js +89 -15
- package/dist/AudienceAnalyzeClient.js.map +1 -1
- package/dist/CctvLiveViewCoordinator.d.ts +23 -2
- package/dist/CctvLiveViewCoordinator.d.ts.map +1 -1
- package/dist/CctvLiveViewCoordinator.js +50 -0
- package/dist/CctvLiveViewCoordinator.js.map +1 -1
- package/dist/ConnectorStatusClient.d.ts +8 -0
- package/dist/ConnectorStatusClient.d.ts.map +1 -1
- package/dist/ConnectorStatusClient.js +3 -0
- package/dist/ConnectorStatusClient.js.map +1 -1
- package/dist/DetectorFields.d.ts +114 -7
- package/dist/DetectorFields.d.ts.map +1 -1
- package/dist/DetectorFields.js +168 -43
- package/dist/DetectorFields.js.map +1 -1
- package/dist/EdgeAgent.js +1 -1
- package/dist/FloorObjects.d.ts +131 -8
- package/dist/FloorObjects.d.ts.map +1 -1
- package/dist/FloorObjects.js +396 -24
- package/dist/FloorObjects.js.map +1 -1
- package/dist/LocalDetectorClient.d.ts +21 -0
- package/dist/LocalDetectorClient.d.ts.map +1 -1
- package/dist/LocalDetectorClient.js +43 -0
- package/dist/LocalDetectorClient.js.map +1 -1
- package/dist/NativeReadiness.d.ts.map +1 -1
- package/dist/NativeReadiness.js +8 -3
- package/dist/NativeReadiness.js.map +1 -1
- package/dist/QueueDwell.d.ts +87 -0
- package/dist/QueueDwell.d.ts.map +1 -0
- package/dist/QueueDwell.js +167 -0
- package/dist/QueueDwell.js.map +1 -0
- package/dist/ScopedVlmReview.d.ts +21 -2
- package/dist/ScopedVlmReview.d.ts.map +1 -1
- package/dist/ScopedVlmReview.js +68 -10
- package/dist/ScopedVlmReview.js.map +1 -1
- package/dist/SensingProfileClient.d.ts +7 -0
- package/dist/SensingProfileClient.d.ts.map +1 -1
- package/dist/SensingProfileClient.js +1 -0
- package/dist/SensingProfileClient.js.map +1 -1
- package/dist/VideoSegmentUploader.d.ts +6 -0
- package/dist/VideoSegmentUploader.d.ts.map +1 -1
- package/dist/VideoSegmentUploader.js +31 -4
- package/dist/VideoSegmentUploader.js.map +1 -1
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/connectorUpdate.d.ts +6 -0
- package/dist/connectorUpdate.d.ts.map +1 -1
- package/dist/connectorUpdate.js +8 -1
- package/dist/connectorUpdate.js.map +1 -1
- package/dist/diagnose.d.ts +1 -1
- package/dist/diagnose.js +1 -1
- package/dist/enterpriseNetwork.d.ts +9 -0
- package/dist/enterpriseNetwork.d.ts.map +1 -1
- package/dist/enterpriseNetwork.js +14 -0
- package/dist/enterpriseNetwork.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/localSensing.d.ts +29 -1
- package/dist/localSensing.d.ts.map +1 -1
- package/dist/localSensing.js +64 -6
- package/dist/localSensing.js.map +1 -1
- package/dist/mainThreadStall.d.ts +11 -0
- package/dist/mainThreadStall.d.ts.map +1 -1
- package/dist/mainThreadStall.js +35 -0
- package/dist/mainThreadStall.js.map +1 -1
- package/dist/pipelineSwitches.d.ts +61 -2
- package/dist/pipelineSwitches.d.ts.map +1 -1
- package/dist/pipelineSwitches.js +93 -15
- package/dist/pipelineSwitches.js.map +1 -1
- package/dist/processPriority.d.ts +75 -0
- package/dist/processPriority.d.ts.map +1 -0
- package/dist/processPriority.js +380 -0
- package/dist/processPriority.js.map +1 -0
- package/dist/sensingRunMode.d.ts.map +1 -1
- package/dist/sensingRunMode.js +22 -3
- package/dist/sensingRunMode.js.map +1 -1
- package/dist/vehicleEndWarmup.d.ts +60 -0
- package/dist/vehicleEndWarmup.d.ts.map +1 -0
- package/dist/vehicleEndWarmup.js +209 -0
- package/dist/vehicleEndWarmup.js.map +1 -0
- package/dist/windowsLiveView.d.ts +3 -1
- package/dist/windowsLiveView.d.ts.map +1 -1
- package/dist/windowsLiveView.js +2 -0
- package/dist/windowsLiveView.js.map +1 -1
- package/package.json +4 -4
- package/retained/RetainedCaptureClient.cjs +30 -4
- package/retained/__tests__/archive-lifecycle.test.cjs +44 -0
- package/retained/__tests__/held-frames.test.cjs +94 -0
- package/retained/__tests__/paired-theft-manager.test.cjs +24 -0
- package/retained/__tests__/queue-dwell.test.cjs +238 -0
- package/retained/__tests__/support/theft-builder.cjs +3 -1
- package/retained/held-frames.cjs +39 -0
- package/retained/manager.cjs +15 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"""Whether a person wears the store's staff uniform: the pinned uniform student, on each person's own crop.
|
|
2
|
+
|
|
3
|
+
The artifact is the uniform student m2: a MobileNetV3-Large crop classifier at 192 x 96 (timm
|
|
4
|
+
mobilenetv3_large_100 at ImageNet weights, fine-tuned on Texas person crops labelled by the record-mode
|
|
5
|
+
teacher and by eye, from days disjoint from the seven recorded eval days; fp32 ONNX, opset 17). It returns,
|
|
6
|
+
per person box, P(staff) from its two-class softmax. Its crop is its training crop exactly, the preparation
|
|
7
|
+
the server's person read makes (services/trillboards-siglip-embedder contract section 7):
|
|
8
|
+
|
|
9
|
+
1. the original JPEG decoded by Pillow to RGB;
|
|
10
|
+
2. the box [x, y, width, height] plus 10% of its width and height each side, clipped to the frame, every
|
|
11
|
+
edge floored;
|
|
12
|
+
3. that rectangle saved as a Pillow JPEG of quality 92 and decoded again (without this round trip P(staff)
|
|
13
|
+
moved by a median 0.025 and crossed the deciding bar on 15 of 449 eval crops);
|
|
14
|
+
4. letterboxed to 96 x 192: scaled by min(96 / w, 192 / h), each side rounded, Pillow BILINEAR, pasted
|
|
15
|
+
centred on (124, 116, 104);
|
|
16
|
+
5. (x / 255 - mean) / std with the ImageNet mean and std, float32, [1, 3, 192, 96].
|
|
17
|
+
|
|
18
|
+
The decision (a red-rule staff read below the camera method's vetoBelow becomes a customer) lives with the
|
|
19
|
+
connector's uniform_colour_absence_v5, not here. docs/runbooks/cctv-detector-tier.md section 5m.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from __future__ import annotations
|
|
23
|
+
|
|
24
|
+
import hashlib
|
|
25
|
+
import io
|
|
26
|
+
import math
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
import threading
|
|
29
|
+
import time
|
|
30
|
+
|
|
31
|
+
from .errors import ModelContractError
|
|
32
|
+
|
|
33
|
+
MODEL_ID = "staff_uniform_student_m2"
|
|
34
|
+
MODEL_SHA256 = "bbbb24b90e5201dcb3317f4a0947320bd658e59ed14afe379a9cf9576621d13f"
|
|
35
|
+
PREPROCESSING = "pil-rgb-box-plus-10pct-clip-floor-jpeg92-letterbox-96x192-bilinear-fill-7c7468-imagenet-v1"
|
|
36
|
+
MAX_BOXES = 32
|
|
37
|
+
SIZE = (96, 192)
|
|
38
|
+
MARGIN = 0.10
|
|
39
|
+
JPEG_QUALITY = 92
|
|
40
|
+
FILL = (124, 116, 104)
|
|
41
|
+
MEAN = (0.485, 0.456, 0.406)
|
|
42
|
+
STD = (0.229, 0.224, 0.225)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def student_bounds(box, width, height):
|
|
46
|
+
"""The student's crop of [x, y, w, h] on a width x height frame: 10% of the box added each side, clipped to
|
|
47
|
+
the frame, every edge floored (the training crops' rectangle: int() of each clipped edge)."""
|
|
48
|
+
x, y, w, h = (float(v) for v in box)
|
|
49
|
+
mx, my = MARGIN * w, MARGIN * h
|
|
50
|
+
return (max(0, math.floor(x - mx)), max(0, math.floor(y - my)),
|
|
51
|
+
min(width, math.floor(x + w + mx)), min(height, math.floor(y + h + my)))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def student_input(image, box):
|
|
55
|
+
"""float32 [1, 3, 192, 96] for one person of a decoded RGB frame, or None when its crop is under 2 x 2."""
|
|
56
|
+
import numpy as np
|
|
57
|
+
from PIL import Image
|
|
58
|
+
|
|
59
|
+
left, top, right, bottom = student_bounds(box, image.width, image.height)
|
|
60
|
+
if right - left < 2 or bottom - top < 2:
|
|
61
|
+
return None, (left, top, right, bottom)
|
|
62
|
+
out = io.BytesIO()
|
|
63
|
+
image.crop((left, top, right, bottom)).save(out, format="JPEG", quality=JPEG_QUALITY)
|
|
64
|
+
with Image.open(io.BytesIO(out.getvalue())) as decoded:
|
|
65
|
+
crop = decoded.convert("RGB")
|
|
66
|
+
out_w, out_h = SIZE
|
|
67
|
+
w, h = crop.size
|
|
68
|
+
scale = min(out_w / w, out_h / h)
|
|
69
|
+
nw, nh = max(1, round(w * scale)), max(1, round(h * scale))
|
|
70
|
+
canvas = Image.new("RGB", (out_w, out_h), FILL)
|
|
71
|
+
canvas.paste(crop.resize((nw, nh), Image.BILINEAR), ((out_w - nw) // 2, (out_h - nh) // 2))
|
|
72
|
+
mean = np.asarray(MEAN, dtype=np.float32)
|
|
73
|
+
std = np.asarray(STD, dtype=np.float32)
|
|
74
|
+
pixels = (np.asarray(canvas, dtype=np.float32) / 255.0 - mean) / std
|
|
75
|
+
return np.ascontiguousarray(pixels.transpose(2, 0, 1)[None], dtype=np.float32), (left, top, right, bottom)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _sha256_file(path):
|
|
79
|
+
digest = hashlib.sha256()
|
|
80
|
+
with open(path, "rb") as handle:
|
|
81
|
+
for chunk in iter(lambda: handle.read(8 << 20), b""):
|
|
82
|
+
digest.update(chunk)
|
|
83
|
+
return digest.hexdigest()
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def _valid_box(box, width, height):
|
|
87
|
+
return (isinstance(box, (list, tuple)) and len(box) == 4
|
|
88
|
+
and all(not isinstance(v, bool) and isinstance(v, (int, float)) and math.isfinite(v) for v in box)
|
|
89
|
+
and box[0] >= 0 and box[1] >= 0 and box[2] > 0 and box[3] > 0
|
|
90
|
+
and box[0] + box[2] <= width + 0.01 and box[1] + box[3] <= height + 0.01)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class StaffUniformEstimator:
|
|
94
|
+
"""One immutable CPU artifact, loaded from its verified path."""
|
|
95
|
+
|
|
96
|
+
model_name = MODEL_ID
|
|
97
|
+
model_sha256 = MODEL_SHA256
|
|
98
|
+
|
|
99
|
+
def __init__(self, model_path, *, intra_op_threads=4, accelerator="cpu"):
|
|
100
|
+
if type(intra_op_threads) is not int or not 1 <= intra_op_threads <= 8:
|
|
101
|
+
raise ValueError("Invalid bounded staff-uniform thread count")
|
|
102
|
+
if accelerator != "cpu":
|
|
103
|
+
raise ModelContractError("This staff-uniform artifact is qualified for native CPU execution")
|
|
104
|
+
path = str(Path(model_path))
|
|
105
|
+
if _sha256_file(path) != MODEL_SHA256:
|
|
106
|
+
raise ModelContractError("Staff-uniform artifact differs from the pinned export")
|
|
107
|
+
import onnxruntime as ort
|
|
108
|
+
|
|
109
|
+
options = ort.SessionOptions()
|
|
110
|
+
options.intra_op_num_threads = intra_op_threads
|
|
111
|
+
options.inter_op_num_threads = 1
|
|
112
|
+
options.log_severity_level = 3
|
|
113
|
+
self._session = ort.InferenceSession(path, sess_options=options, providers=["CPUExecutionProvider"])
|
|
114
|
+
if _sha256_file(path) != MODEL_SHA256:
|
|
115
|
+
raise ModelContractError("Staff-uniform artifact changed while it was loading")
|
|
116
|
+
inputs, outputs = self._session.get_inputs(), self._session.get_outputs()
|
|
117
|
+
if (len(inputs) != 1 or inputs[0].name != "crop" or list(inputs[0].shape[1:]) != [3, 192, 96]
|
|
118
|
+
or inputs[0].type != "tensor(float)" or len(outputs) != 1 or outputs[0].name != "prob"
|
|
119
|
+
or list(outputs[0].shape[1:]) != [2] or outputs[0].type != "tensor(float)"):
|
|
120
|
+
raise ModelContractError("Staff-uniform graph differs from its crop -> prob contract")
|
|
121
|
+
self._lock = threading.Lock()
|
|
122
|
+
self.acceleration = {"requested": "cpu", "backend": "cpu", "providers": ["CPUExecutionProvider"],
|
|
123
|
+
"fallback_reason": None}
|
|
124
|
+
|
|
125
|
+
def estimate(self, jpeg, boxes):
|
|
126
|
+
import numpy as np
|
|
127
|
+
from PIL import Image
|
|
128
|
+
|
|
129
|
+
if (not isinstance(jpeg, bytes) or not 0 < len(jpeg) <= 16 * 1024**2
|
|
130
|
+
or not isinstance(boxes, list) or not 1 <= len(boxes) <= MAX_BOXES):
|
|
131
|
+
raise ValueError("Invalid bounded staff-uniform request")
|
|
132
|
+
try:
|
|
133
|
+
with Image.open(io.BytesIO(jpeg)) as header:
|
|
134
|
+
width, height = header.size
|
|
135
|
+
if header.format != "JPEG" or not 2 <= width <= 8192 or not 2 <= height <= 8192:
|
|
136
|
+
raise ValueError("Staff uniform requires a bounded original JPEG")
|
|
137
|
+
except Exception as error:
|
|
138
|
+
raise ValueError("Invalid original staff-uniform JPEG") from error
|
|
139
|
+
for box in boxes:
|
|
140
|
+
if not _valid_box(box, width, height):
|
|
141
|
+
raise ValueError("Person rectangle is outside the original frame")
|
|
142
|
+
started = time.monotonic()
|
|
143
|
+
people = []
|
|
144
|
+
with self._lock:
|
|
145
|
+
with Image.open(io.BytesIO(jpeg)) as decoded:
|
|
146
|
+
decoded.load()
|
|
147
|
+
image = decoded.convert("RGB")
|
|
148
|
+
for index, box in enumerate(boxes):
|
|
149
|
+
tensor, crop = student_input(image, box)
|
|
150
|
+
if tensor is None:
|
|
151
|
+
# A crop under 2 x 2 has no student read: the caller keeps the red rule's read of the person.
|
|
152
|
+
people.append({"boxIndex": index, "crop": list(crop), "inputSha256": None, "pStaff": None})
|
|
153
|
+
continue
|
|
154
|
+
value = self._session.run(["prob"], {"crop": tensor})[0]
|
|
155
|
+
row = np.asarray(value, dtype=np.float64).reshape(-1)
|
|
156
|
+
if (value.shape != (1, 2) or not np.isfinite(row).all() or row.min() < -1e-6
|
|
157
|
+
or abs(row.sum() - 1.0) > 1e-3):
|
|
158
|
+
raise ModelContractError("Native staff-uniform output is not a two-class probability")
|
|
159
|
+
people.append({"boxIndex": index, "crop": list(crop),
|
|
160
|
+
"inputSha256": hashlib.sha256(tensor.tobytes()).hexdigest(),
|
|
161
|
+
"pStaff": float(min(1.0, max(0.0, row[1])))})
|
|
162
|
+
return {"version": 1, "modelId": MODEL_ID, "modelSha256": MODEL_SHA256, "preprocessing": PREPROCESSING,
|
|
163
|
+
"imageSha256": hashlib.sha256(jpeg).hexdigest(), "frameSize": {"width": width, "height": height},
|
|
164
|
+
"people": people, "inferenceMs": (time.monotonic() - started) * 1000}
|
|
165
|
+
|
|
166
|
+
def probe(self):
|
|
167
|
+
"""A forward pass completes (the loader's admission check); no claim about any decision."""
|
|
168
|
+
from PIL import Image
|
|
169
|
+
|
|
170
|
+
buffer = io.BytesIO()
|
|
171
|
+
Image.new("RGB", (64, 48), (128, 128, 128)).save(buffer, "JPEG")
|
|
172
|
+
self.estimate(buffer.getvalue(), [[8.0, 4.0, 20.0, 40.0]])
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def validate_staff_uniform_request(body):
|
|
176
|
+
"""`/staff-uniform` body: the pinned model and 1..32 original-frame person boxes [x, y, width, height]."""
|
|
177
|
+
if not isinstance(body, dict) or set(body) != {"image_b64", "model", "boxes"}:
|
|
178
|
+
raise ValueError("staff-uniform request needs exactly image_b64, model and boxes")
|
|
179
|
+
model = body["model"]
|
|
180
|
+
if not isinstance(model, dict) or set(model) != {"modelId", "sha256"}:
|
|
181
|
+
raise ValueError("staff-uniform model must name modelId and sha256")
|
|
182
|
+
boxes = body["boxes"]
|
|
183
|
+
if not isinstance(boxes, list) or not 1 <= len(boxes) <= MAX_BOXES:
|
|
184
|
+
raise ValueError("staff-uniform needs 1..%d boxes" % MAX_BOXES)
|
|
185
|
+
for box in boxes:
|
|
186
|
+
if (not isinstance(box, list) or len(box) != 4
|
|
187
|
+
or any(isinstance(v, bool) or not isinstance(v, (int, float)) or not math.isfinite(v) for v in box)
|
|
188
|
+
or box[2] <= 0 or box[3] <= 0 or box[0] < 0 or box[1] < 0):
|
|
189
|
+
raise ValueError("staff-uniform boxes are [x, y, width, height] in original pixels")
|
|
190
|
+
return model, boxes
|
|
@@ -3,6 +3,7 @@ from .registry import TaskModelContract
|
|
|
3
3
|
from .actor_identity import MODEL_ID as APPEARANCE_MODEL_ID, MODEL_SHA256 as APPEARANCE_SHA256, PREPROCESSING as APPEARANCE_PREPROCESSING
|
|
4
4
|
from .actor_action_contract import ActorActionModelContract,ActorActionOutput,ActorActionWindowContract,CONTACT_PREPROCESSING
|
|
5
5
|
from .vehicle_end import MODEL_ID as VEHICLE_END_MODEL_ID, MODEL_SHA256 as VEHICLE_END_SHA256, PREPROCESSING as VEHICLE_END_PREPROCESSING
|
|
6
|
+
from .staff_uniform import MODEL_ID as STAFF_UNIFORM_MODEL_ID, MODEL_SHA256 as STAFF_UNIFORM_SHA256, PREPROCESSING as STAFF_UNIFORM_PREPROCESSING
|
|
6
7
|
from .face_contract import (FACE_DETECTOR_MODEL_ID, FACE_DETECTOR_SHA256, FACE_DETECT_PREPROCESSING, FACE_DETECT_TASK,
|
|
7
8
|
FACE_EMBEDDER_MODEL_ID, FACE_EMBEDDER_SHA256, FACE_EMBED_PREPROCESSING, FACE_EMBED_TASK)
|
|
8
9
|
|
|
@@ -43,7 +44,14 @@ FACE_DETECTOR = TaskModelContract(
|
|
|
43
44
|
FACE_DETECTOR_MODEL_ID, FACE_DETECT_TASK, FACE_DETECTOR_SHA256, 256 * 1024**2, FACE_DETECT_PREPROCESSING)
|
|
44
45
|
FACE_EMBEDDER = TaskModelContract(
|
|
45
46
|
FACE_EMBEDDER_MODEL_ID, FACE_EMBED_TASK, FACE_EMBEDDER_SHA256, 96 * 1024**2, FACE_EMBED_PREPROCESSING)
|
|
46
|
-
|
|
47
|
+
# The uniform student (staff_uniform.py): P(staff) of a person the red rule reads as staff. Resident cost MEASURED
|
|
48
|
+
# on the devbox (proc-statm, fresh process after the service's imports): +68.3 MiB loaded, +79.0 MiB after the largest
|
|
49
|
+
# request (32 people on a 1920x1080 frame), unchanged after six more; 3.5-4.1 ms a person at 4 threads. The
|
|
50
|
+
# reservation is that peak plus headroom. No field ownership: the connector's uniform_colour_absence_v5 vetoes a
|
|
51
|
+
# red-rule staff read with it.
|
|
52
|
+
STAFF_UNIFORM = TaskModelContract(
|
|
53
|
+
STAFF_UNIFORM_MODEL_ID, "staff_uniform", STAFF_UNIFORM_SHA256, 128 * 1024**2, STAFF_UNIFORM_PREPROCESSING)
|
|
54
|
+
BUILTIN_TASK_MODELS = (RTMPOSE_BODY7, PERSON_APPEARANCE, VEHICLE_END, FACE_DETECTOR, FACE_EMBEDDER, STAFF_UNIFORM)
|
|
47
55
|
|
|
48
56
|
COCO17 = ("nose", "left_eye", "right_eye", "left_ear", "right_ear",
|
|
49
57
|
"left_shoulder", "right_shoulder", "left_elbow", "right_elbow",
|
|
@@ -241,6 +241,9 @@ Copy-Item -Force "$Here\install-update.ps1" "$Payload\bin\install-update.ps1"
|
|
|
241
241
|
# replacement; being here is also what puts it in the Authenticode signing set,
|
|
242
242
|
# which list-shipped-scripts.ps1 derives from these Copy-Item calls.
|
|
243
243
|
Copy-Item -Force "$Here\apply-update.ps1" "$Payload\bin\apply-update.ps1"
|
|
244
|
+
# The served process-priority switch's helper (CCTV_PROCESS_PRIORITY, src/processPriority.ts):
|
|
245
|
+
# beside node.exe, where the connector finds it, and so in the signing set.
|
|
246
|
+
Copy-Item -Force "$Here\process-priority.ps1" "$Payload\bin\process-priority.ps1"
|
|
244
247
|
|
|
245
248
|
# Construct the real customer window with Windows PowerShell before packaging.
|
|
246
249
|
# -SmokeTest creates and validates every control but never displays the form or
|
|
@@ -812,7 +812,7 @@ try {
|
|
|
812
812
|
'--ffmpeg', $ffmpeg, '--capture', $captureModule, '--out', $captureReceipt) -LogName 'installed-live-capture-startup.log' -TimeoutSeconds 90
|
|
813
813
|
$capture = Get-Content -LiteralPath $captureReceipt -Raw | ConvertFrom-Json
|
|
814
814
|
if (-not $capture.passed -or -not $capture.ownedChildrenStopped -or -not $capture.ownedListenersStopped -or
|
|
815
|
-
@($capture.cases).Count -ne
|
|
815
|
+
@($capture.cases).Count -ne 6 -or @($capture.cases | Where-Object { -not $_.passed }).Count -or
|
|
816
816
|
$capture.captureModuleSha256 -cne (Get-FileHash -LiteralPath $captureModule -Algorithm SHA256).Hash.ToLowerInvariant() -or
|
|
817
817
|
$capture.ffmpegSha256 -cne (Get-FileHash -LiteralPath $ffmpeg -Algorithm SHA256).Hash.ToLowerInvariant() -or
|
|
818
818
|
([Version]$capture.node.TrimStart('v')).Major -ne 22) {
|
|
@@ -78,7 +78,7 @@ try {
|
|
|
78
78
|
if ($LASTEXITCODE -ne 0) { throw "Native live capture startup failed. See $captureReceipt" }
|
|
79
79
|
$captureResult = Get-Content -LiteralPath $captureReceipt -Raw | ConvertFrom-Json
|
|
80
80
|
if (-not $captureResult.passed -or -not $captureResult.ownedChildrenStopped -or
|
|
81
|
-
-not $captureResult.ownedListenersStopped -or @($captureResult.cases).Count -ne
|
|
81
|
+
-not $captureResult.ownedListenersStopped -or @($captureResult.cases).Count -ne 6) {
|
|
82
82
|
throw 'The native live capture startup receipt is incomplete.'
|
|
83
83
|
}
|
|
84
84
|
$summary = @{ passed = $true; nativeBehaviorCases = $count; nativeLiveCaptureCases = @($captureResult.cases).Count; compiledProbe = $module; nodeVersion = $nodeVersion;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<#
|
|
2
|
+
process-priority.ps1 -- read, raise or restore the Windows scheduling priorities of
|
|
3
|
+
the connector, its ffmpeg children and the object detector (plan v7 W8,
|
|
4
|
+
runtime_config CCTV_PROCESS_PRIORITY). Run by the connector (processPriority.ts),
|
|
5
|
+
never by a person; prints ONE JSON line.
|
|
6
|
+
|
|
7
|
+
WHY. Neither TrillboardsEdge (register-task.ps1) nor TrillboardsDetector
|
|
8
|
+
(register-detector-task.ps1) sets a task priority, so Task Scheduler starts both
|
|
9
|
+
at its default, 7: below-normal CPU priority class with low I/O and low memory
|
|
10
|
+
priority, and every process they start inherits that. The live-view runbook
|
|
11
|
+
(docs/runbooks/cctv-live-view.md) states the detector, monitoring and the
|
|
12
|
+
connector keep NORMAL priority, so a live view, which lowers itself, never takes
|
|
13
|
+
CPU from an alert look. Under priority 7 they sit level with it.
|
|
14
|
+
|
|
15
|
+
A RUNNING PROCESS, NOT THE TASK. A task's priority applies only when Task
|
|
16
|
+
Scheduler starts the task, and changing it means re-registering the task. This
|
|
17
|
+
script changes the running processes instead, through the same calls Process
|
|
18
|
+
Explorer uses, so the served switch takes effect within one run and is reverted
|
|
19
|
+
the same way, with no restart. A process its task starts again begins at 7, and
|
|
20
|
+
the connector's next run raises it.
|
|
21
|
+
|
|
22
|
+
MODES
|
|
23
|
+
read report each target's levels.
|
|
24
|
+
normal raise each target where it is below normal: CPU class idle or below
|
|
25
|
+
normal -> normal; memory priority below 5 -> 5 (normal); I/O priority
|
|
26
|
+
below normal -> normal. Nothing is ever lowered.
|
|
27
|
+
restore put back the levels given: -ConnectorLevels on the connector and its
|
|
28
|
+
ffmpeg children, -DetectorLevels on the detector only while it is
|
|
29
|
+
still process -DetectorPid (a detector its task restarted is already
|
|
30
|
+
back at its task's levels).
|
|
31
|
+
Every mode reads each target before and after.
|
|
32
|
+
|
|
33
|
+
TARGETS, and only these: the connector (-ConnectorPid); its DIRECT ffmpeg.exe
|
|
34
|
+
children (camera capture); the process listening on TCP -DetectorPort (the
|
|
35
|
+
detector service). The live view's media worker is a node.exe child and its
|
|
36
|
+
ffmpeg a grandchild, both deliberately below normal; the retained phone-embedding
|
|
37
|
+
server lowers itself too. None of them is touched.
|
|
38
|
+
|
|
39
|
+
LEVELS, as printed: cpu is the priority class (idle, below_normal, normal,
|
|
40
|
+
above_normal, high, realtime); memory is the memory priority, 1 (very low) to
|
|
41
|
+
5 (normal); io is the I/O priority, 0 (very low), 1 (low), 2 (normal), 3 (high).
|
|
42
|
+
null means the value could not be read.
|
|
43
|
+
|
|
44
|
+
Windows PowerShell 5.1 (the connector's host): no ternaries, no null-coalescing,
|
|
45
|
+
and no @() around a List[object]: PowerShell's array binder throws "Argument
|
|
46
|
+
types do not match" on it (5.1 and 7.4 alike), outside every try, so the run
|
|
47
|
+
printed nothing. The result's lists go out through .ToArray().
|
|
48
|
+
#>
|
|
49
|
+
[CmdletBinding()]
|
|
50
|
+
param(
|
|
51
|
+
[Parameter(Mandatory = $true)][ValidateSet('read', 'normal', 'restore')][string]$Mode,
|
|
52
|
+
[Parameter(Mandatory = $true)][ValidateRange(1, 2147483647)][int]$ConnectorPid,
|
|
53
|
+
[ValidateRange(1, 65535)][int]$DetectorPort = 9380,
|
|
54
|
+
# restore only: "<cpu>,<memory>,<io>" as printed by a read, e.g. below_normal,2,1
|
|
55
|
+
[string]$ConnectorLevels = '',
|
|
56
|
+
[string]$DetectorLevels = '',
|
|
57
|
+
[int]$DetectorPid = 0
|
|
58
|
+
)
|
|
59
|
+
$ErrorActionPreference = 'Stop'
|
|
60
|
+
|
|
61
|
+
$classNames = @{ 64 = 'idle'; 16384 = 'below_normal'; 32 = 'normal'; 32768 = 'above_normal'; 128 = 'high'; 256 = 'realtime' }
|
|
62
|
+
$classValues = @{ 'idle' = 64; 'below_normal' = 16384; 'normal' = 32; 'above_normal' = 32768; 'high' = 128; 'realtime' = 256 }
|
|
63
|
+
|
|
64
|
+
function Write-Result($value) {
|
|
65
|
+
[Console]::Out.WriteLine(($value | ConvertTo-Json -Compress -Depth 6))
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
$source = @'
|
|
69
|
+
using System;
|
|
70
|
+
using System.Runtime.InteropServices;
|
|
71
|
+
public static class TrillboardsProcessPriority {
|
|
72
|
+
const uint QueryInformation = 0x0400;
|
|
73
|
+
const uint SetInformation = 0x0200;
|
|
74
|
+
const int ProcessMemoryPriority = 0;
|
|
75
|
+
const int ProcessIoPriority = 33;
|
|
76
|
+
[DllImport("kernel32.dll", SetLastError = true)] static extern IntPtr OpenProcess(uint access, bool inherit, int pid);
|
|
77
|
+
[DllImport("kernel32.dll", SetLastError = true)] static extern bool CloseHandle(IntPtr handle);
|
|
78
|
+
[DllImport("kernel32.dll", SetLastError = true)] static extern uint GetPriorityClass(IntPtr handle);
|
|
79
|
+
[DllImport("kernel32.dll", SetLastError = true)] static extern bool SetPriorityClass(IntPtr handle, uint priorityClass);
|
|
80
|
+
[DllImport("kernel32.dll", SetLastError = true)] static extern bool GetProcessInformation(IntPtr handle, int infoClass, ref uint info, uint size);
|
|
81
|
+
[DllImport("kernel32.dll", SetLastError = true)] static extern bool SetProcessInformation(IntPtr handle, int infoClass, ref uint info, uint size);
|
|
82
|
+
[DllImport("ntdll.dll")] static extern int NtQueryInformationProcess(IntPtr handle, int infoClass, ref int info, int size, IntPtr returned);
|
|
83
|
+
[DllImport("ntdll.dll")] static extern int NtSetInformationProcess(IntPtr handle, int infoClass, ref int info, int size);
|
|
84
|
+
|
|
85
|
+
// { priority class, memory priority 1-5, I/O priority 0-4 }; -1 where it could not be read.
|
|
86
|
+
public static long[] Read(int pid) {
|
|
87
|
+
long[] levels = new long[] { -1, -1, -1 };
|
|
88
|
+
IntPtr handle = OpenProcess(QueryInformation, false, pid);
|
|
89
|
+
if (handle == IntPtr.Zero) return levels;
|
|
90
|
+
try {
|
|
91
|
+
uint cls = GetPriorityClass(handle);
|
|
92
|
+
if (cls != 0) levels[0] = cls;
|
|
93
|
+
uint memory = 0;
|
|
94
|
+
try { if (GetProcessInformation(handle, ProcessMemoryPriority, ref memory, 4)) levels[1] = memory; } catch (EntryPointNotFoundException) { }
|
|
95
|
+
int io = 0;
|
|
96
|
+
if (NtQueryInformationProcess(handle, ProcessIoPriority, ref io, 4, IntPtr.Zero) == 0) levels[2] = io;
|
|
97
|
+
} finally { CloseHandle(handle); }
|
|
98
|
+
return levels;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Sets each level given (class 0, memory -1, io -1 = leave it); returns "" or what failed.
|
|
102
|
+
public static string Set(int pid, uint cls, int memory, int io) {
|
|
103
|
+
IntPtr handle = OpenProcess(SetInformation | QueryInformation, false, pid);
|
|
104
|
+
if (handle == IntPtr.Zero) return "open " + Marshal.GetLastWin32Error();
|
|
105
|
+
string failed = "";
|
|
106
|
+
try {
|
|
107
|
+
if (cls != 0 && !SetPriorityClass(handle, cls)) failed += " class " + Marshal.GetLastWin32Error();
|
|
108
|
+
if (memory >= 0) {
|
|
109
|
+
uint value = (uint)memory;
|
|
110
|
+
try { if (!SetProcessInformation(handle, ProcessMemoryPriority, ref value, 4)) failed += " memory " + Marshal.GetLastWin32Error(); }
|
|
111
|
+
catch (EntryPointNotFoundException) { failed += " memory unsupported"; }
|
|
112
|
+
}
|
|
113
|
+
if (io >= 0) {
|
|
114
|
+
int value = io;
|
|
115
|
+
int status = NtSetInformationProcess(handle, ProcessIoPriority, ref value, 4);
|
|
116
|
+
if (status != 0) failed += " io 0x" + status.ToString("x8");
|
|
117
|
+
}
|
|
118
|
+
} finally { CloseHandle(handle); }
|
|
119
|
+
return failed.Trim();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
'@
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
if (-not ('TrillboardsProcessPriority' -as [type])) { Add-Type -TypeDefinition $source -Language CSharp }
|
|
126
|
+
} catch {
|
|
127
|
+
Write-Result ([ordered]@{ version = 1; mode = $Mode; fatal = ('compile: ' + $_.Exception.Message) })
|
|
128
|
+
exit 2
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function Read-Levels([int]$ProcessId) {
|
|
132
|
+
$raw = [TrillboardsProcessPriority]::Read($ProcessId)
|
|
133
|
+
$cpu = $null
|
|
134
|
+
if ($classNames.ContainsKey([int]$raw[0])) { $cpu = $classNames[[int]$raw[0]] }
|
|
135
|
+
$memory = $null
|
|
136
|
+
if ($raw[1] -ge 0) { $memory = [int]$raw[1] }
|
|
137
|
+
$io = $null
|
|
138
|
+
if ($raw[2] -ge 0) { $io = [int]$raw[2] }
|
|
139
|
+
[ordered]@{ cpu = $cpu; memory = $memory; io = $io }
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function Get-RaiseError([int]$ProcessId) {
|
|
143
|
+
$raw = [TrillboardsProcessPriority]::Read($ProcessId)
|
|
144
|
+
$class = 0
|
|
145
|
+
if ($raw[0] -eq 64 -or $raw[0] -eq 16384) { $class = 32 }
|
|
146
|
+
$memory = -1
|
|
147
|
+
if ($raw[1] -ge 0 -and $raw[1] -lt 5) { $memory = 5 }
|
|
148
|
+
$io = -1
|
|
149
|
+
if ($raw[2] -ge 0 -and $raw[2] -lt 2) { $io = 2 }
|
|
150
|
+
if ($class -eq 0 -and $memory -lt 0 -and $io -lt 0) { return '' }
|
|
151
|
+
[TrillboardsProcessPriority]::Set($ProcessId, [uint32]$class, $memory, $io)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function ConvertFrom-Levels([string]$Text) {
|
|
155
|
+
$parts = $Text.Split(',')
|
|
156
|
+
if ($parts.Count -ne 3) { throw "levels must be <cpu>,<memory>,<io>: '$Text'" }
|
|
157
|
+
$class = 0
|
|
158
|
+
if ($parts[0] -and $parts[0] -ne 'null') {
|
|
159
|
+
if (-not $classValues.ContainsKey($parts[0])) { throw "unknown priority class '$($parts[0])'" }
|
|
160
|
+
$class = $classValues[$parts[0]]
|
|
161
|
+
}
|
|
162
|
+
$memory = -1
|
|
163
|
+
if ($parts[1] -and $parts[1] -ne 'null') { $memory = [int]$parts[1]; if ($memory -lt 1 -or $memory -gt 5) { throw "memory priority out of range: $memory" } }
|
|
164
|
+
$io = -1
|
|
165
|
+
if ($parts[2] -and $parts[2] -ne 'null') { $io = [int]$parts[2]; if ($io -lt 0 -or $io -gt 2) { throw "I/O priority out of range: $io" } }
|
|
166
|
+
@{ class = $class; memory = $memory; io = $io }
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
$errors = New-Object System.Collections.Generic.List[string]
|
|
170
|
+
|
|
171
|
+
$ffmpegPids = @()
|
|
172
|
+
try {
|
|
173
|
+
$ffmpegPids = @(Get-CimInstance -ClassName Win32_Process -Filter "ParentProcessId = $ConnectorPid AND Name = 'ffmpeg.exe'" -OperationTimeoutSec 15 -ErrorAction Stop |
|
|
174
|
+
ForEach-Object { [int]$_.ProcessId })
|
|
175
|
+
} catch { $errors.Add('ffmpeg list: ' + $_.Exception.Message) }
|
|
176
|
+
|
|
177
|
+
$detectorPidNow = 0
|
|
178
|
+
try {
|
|
179
|
+
$listeners = @(Get-NetTCPConnection -LocalPort $DetectorPort -State Listen -ErrorAction SilentlyContinue |
|
|
180
|
+
Select-Object -ExpandProperty OwningProcess -Unique)
|
|
181
|
+
if ($listeners.Count -ge 1) { $detectorPidNow = [int]$listeners[0] }
|
|
182
|
+
} catch { $errors.Add('detector listener: ' + $_.Exception.Message) }
|
|
183
|
+
|
|
184
|
+
$targets = New-Object System.Collections.Generic.List[object]
|
|
185
|
+
$targets.Add(@{ role = 'connector'; pid = $ConnectorPid })
|
|
186
|
+
foreach ($id in $ffmpegPids) { $targets.Add(@{ role = 'ffmpeg'; pid = $id }) }
|
|
187
|
+
if ($detectorPidNow -gt 0) { $targets.Add(@{ role = 'detector'; pid = $detectorPidNow }) }
|
|
188
|
+
|
|
189
|
+
$connectorRestore = $null
|
|
190
|
+
$detectorRestore = $null
|
|
191
|
+
if ($Mode -eq 'restore') {
|
|
192
|
+
try { if ($ConnectorLevels) { $connectorRestore = ConvertFrom-Levels $ConnectorLevels } } catch { $errors.Add('connector levels: ' + $_.Exception.Message) }
|
|
193
|
+
try { if ($DetectorLevels) { $detectorRestore = ConvertFrom-Levels $DetectorLevels } } catch { $errors.Add('detector levels: ' + $_.Exception.Message) }
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
$results = @{ connector = $null; detector = $null; ffmpeg = New-Object System.Collections.Generic.List[object] }
|
|
197
|
+
foreach ($target in $targets) {
|
|
198
|
+
$entry = [ordered]@{ pid = $target.pid; before = $null; after = $null; error = $null }
|
|
199
|
+
try {
|
|
200
|
+
$entry.before = Read-Levels $target.pid
|
|
201
|
+
$failed = ''
|
|
202
|
+
if ($Mode -eq 'normal') {
|
|
203
|
+
$failed = Get-RaiseError $target.pid
|
|
204
|
+
} elseif ($Mode -eq 'restore') {
|
|
205
|
+
$levels = $null
|
|
206
|
+
if ($target.role -eq 'detector') {
|
|
207
|
+
if ($detectorRestore -and $DetectorPid -eq $target.pid) { $levels = $detectorRestore }
|
|
208
|
+
} else {
|
|
209
|
+
$levels = $connectorRestore
|
|
210
|
+
}
|
|
211
|
+
if ($levels) { $failed = [TrillboardsProcessPriority]::Set($target.pid, [uint32]$levels.class, $levels.memory, $levels.io) }
|
|
212
|
+
}
|
|
213
|
+
if ($failed) { $entry.error = $failed }
|
|
214
|
+
$entry.after = Read-Levels $target.pid
|
|
215
|
+
} catch {
|
|
216
|
+
$entry.error = $_.Exception.Message
|
|
217
|
+
}
|
|
218
|
+
if ($target.role -eq 'ffmpeg') { $results.ffmpeg.Add($entry) } else { $results[$target.role] = $entry }
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
Write-Result ([ordered]@{
|
|
222
|
+
version = 1
|
|
223
|
+
mode = $Mode
|
|
224
|
+
connector = $results.connector
|
|
225
|
+
detector = $results.detector
|
|
226
|
+
ffmpeg = $results.ffmpeg.ToArray()
|
|
227
|
+
errors = $errors.ToArray()
|
|
228
|
+
})
|
|
229
|
+
exit 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorPerception.d.ts","sourceRoot":"","sources":["../src/ActorPerception.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAqB,KAAK,YAAY,EAAC,KAAK,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAEpG,OAAO,EAA2C,KAAK,YAAY,EAAC,MAAM,aAAa,CAAC;AAIxF,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAC,CAAC,CAAC;IAAA,QAAQ,EAAC,MAAM,CAAC;IAAA,QAAQ,EAAC,MAAM,CAAC;IAC1C,QAAQ,EAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAA,MAAM,EAAC,MAAM,CAAA;KAAC,CAAC;IAAA,IAAI,CAAC,EAAC,YAAY,CAAC;IAAA,UAAU,CAAC,EAAC,kBAAkB,CAAC;IAAA,aAAa,EAAC,MAAM,CAAC;CAChH;AACD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAC,MAAM,CAAC;IAAA,YAAY,EAAC,MAAM,CAAC;IAAA,IAAI,EAAC,MAAM,CAAC;IAAA,aAAa,EAAC,MAAM,CAAC;CACrE;AACD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAC,CAAC,CAAC;IAAA,YAAY,EAAC,MAAM,CAAC;IAAA,aAAa,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,YAAY,CAAC;CACxE;AAMD,wBAAgB,0BAA0B,CAAC,KAAK,EAAC,OAAO,GAAE,qBAAqB,CAc9E;AAED,+FAA+F;AAC/F,wBAAgB,kCAAkC,CAAC,KA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AC,MAAM,CAAA;KAAC,EAC3C,SAAS,GAAC;QAAC,OAAO,CAAC,EAAC,MAAM,CAAC;QAAA,SAAS,CAAC,EAAC,MAAM,CAAC;QAAA,MAAM,CAAC,EAAC,kBAAkB,CAAA;KAAI;IAI9F,gBAAgB,CAAC,OAAO,EAAC,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,GAAC,SAAS,GAAE,qBAAqB,GAAC,IAAI;IAGrF,OAAO,CAAC,MAAM;IAKd,QAAQ,CAAC,KAAK,EAAC,oBAAoB,EAAC,MAAM,EAAC,qBAAqB,GAAE,OAAO,CAAC,oBAAoB,CAAC;IAG/F,QAAQ,CAAC,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,oBAAoB,EAAC,MAAM,EAAC,qBAAqB,GAAE,oBAAoB;CAGrG"}
|
package/dist/ActorPerception.js
CHANGED
|
@@ -71,7 +71,9 @@ class ActorPerceptionClient {
|
|
|
71
71
|
const policy = parseActorPerceptionPolicy(value), tracking = this.request(input, policy);
|
|
72
72
|
const detector = new LocalDetectorClient_1.LocalDetectorClient({ baseUrl: this.transport.baseUrl, timeoutMs: this.transport.timeoutMs,
|
|
73
73
|
expectedModel: policy.detector, classes: ['person'], minConfidence: policy.minConfidence }, this.transport.poster);
|
|
74
|
-
|
|
74
|
+
// The detector client validates optional running track records for its consumers.
|
|
75
|
+
// The archive needs only this frame's associations and boxes, including on older readers.
|
|
76
|
+
const { tracks: _tracks, ...result } = await detector.detect(input.jpeg, tracking, policy.pose, policy.appearance);
|
|
75
77
|
return this.validate({ version: 1, policySha256: (0, ActorTracking_1.actorProofHash)(policy), contextSha256: input.contextSha256, result }, input, policy);
|
|
76
78
|
}
|
|
77
79
|
validate(value, input, policyValue = this.policy) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorPerception.js","sourceRoot":"","sources":["../src/ActorPerception.ts"],"names":[],"mappings":";;;AAuBA,gEAcC;AAGD,gFAgBC;AAxDD,mCAAkC;AAClC,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