@camstack/types 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +6105 -201
- package/dist/index.d.ts +6105 -201
- package/dist/index.js +466 -650
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +569 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -3
- package/dist/catalogs/index.d.mts +0 -1
- package/dist/catalogs/index.d.ts +0 -1
- package/dist/catalogs/index.js +0 -805
- package/dist/catalogs/index.js.map +0 -1
- package/dist/catalogs/index.mjs +0 -31
- package/dist/catalogs/index.mjs.map +0 -1
- package/dist/chunk-QNLZQW6W.mjs +0 -770
- package/dist/chunk-QNLZQW6W.mjs.map +0 -1
- package/dist/index-B9wf2RhV.d.mts +0 -89
- package/dist/index-B9wf2RhV.d.ts +0 -89
package/dist/index.mjs
CHANGED
|
@@ -1,37 +1,577 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
// src/interfaces/storage-backend.ts
|
|
2
|
+
var DEFAULT_LOCATION_SUBPATHS = {
|
|
3
|
+
"recordings-high": "recordings-high",
|
|
4
|
+
"recordings-low": "recordings-low",
|
|
5
|
+
"recordings-clips": "recordings-clips",
|
|
6
|
+
"event-images": "event-images",
|
|
7
|
+
"models": "models",
|
|
8
|
+
"addons-data": "addons-data",
|
|
9
|
+
"cache": "/tmp/camstack-cache",
|
|
10
|
+
"logs": "logs"
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// src/interfaces/addon-i18n.ts
|
|
14
|
+
function resolveTranslation(provider, locale, key) {
|
|
15
|
+
if (provider.getTranslations) {
|
|
16
|
+
const map = provider.getTranslations(locale);
|
|
17
|
+
if (map && key in map) return map[key];
|
|
18
|
+
if (locale !== "en") {
|
|
19
|
+
const fallback = provider.getTranslations("en");
|
|
20
|
+
if (fallback && key in fallback) return fallback[key];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (provider.getTranslationBundle) {
|
|
24
|
+
const bundle = provider.getTranslationBundle();
|
|
25
|
+
const map = bundle[locale];
|
|
26
|
+
if (map && key in map) return map[key];
|
|
27
|
+
if (locale !== "en") {
|
|
28
|
+
const fallback = bundle["en"];
|
|
29
|
+
if (fallback && key in fallback) return fallback[key];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return key;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// src/interfaces/feature-flags.ts
|
|
36
|
+
var DEFAULT_FEATURES = {
|
|
37
|
+
streaming: true,
|
|
38
|
+
notifications: true,
|
|
39
|
+
objectDetection: false,
|
|
40
|
+
remoteAccess: true,
|
|
41
|
+
agentCluster: false,
|
|
42
|
+
smartHome: true,
|
|
43
|
+
recordings: true,
|
|
44
|
+
backup: true,
|
|
45
|
+
repl: true
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// src/interfaces/agent-protocol.ts
|
|
49
|
+
var BINARY_FRAME_HEADER_SIZE = 29;
|
|
50
|
+
var BINARY_FRAME_TYPE = 1;
|
|
51
|
+
|
|
52
|
+
// src/interfaces/server-analysis.ts
|
|
53
|
+
var DETECTION_TYPES = ["person", "vehicle", "animal", "package"];
|
|
54
|
+
var SUB_DETECTION_TYPES = ["face", "plate"];
|
|
55
|
+
var RECOGNITION_TYPES = ["face", "plate", "clip", "custom"];
|
|
56
|
+
function createAnalysisContext(deviceId, frame, rawDetections) {
|
|
57
|
+
return {
|
|
58
|
+
deviceId,
|
|
59
|
+
frame,
|
|
60
|
+
timestamp: frame.timestamp,
|
|
61
|
+
rawDetections,
|
|
62
|
+
trackedDetections: [],
|
|
63
|
+
events: [],
|
|
64
|
+
metadata: {}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function enrichContext(ctx, updates) {
|
|
68
|
+
return {
|
|
69
|
+
...ctx,
|
|
70
|
+
trackedDetections: updates.trackedDetections ?? ctx.trackedDetections,
|
|
71
|
+
events: updates.events ?? ctx.events,
|
|
72
|
+
metadata: updates.metadata ? { ...ctx.metadata, ...updates.metadata } : ctx.metadata
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// src/interfaces/analysis-persistence.ts
|
|
77
|
+
var DEFAULT_RETENTION = {
|
|
78
|
+
cleanupIntervalMs: 60 * 60 * 1e3,
|
|
79
|
+
detectionEventsDays: 30,
|
|
80
|
+
audioLevelsDays: 7,
|
|
81
|
+
snapshotsDays: 14
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// src/schemas/system-settings-schemas.ts
|
|
85
|
+
var READ_ONLY_SECTIONS = /* @__PURE__ */ new Set([
|
|
86
|
+
"server"
|
|
87
|
+
]);
|
|
88
|
+
var SETTINGS_TABS = [
|
|
89
|
+
{ id: "server", label: "Server" },
|
|
90
|
+
{ id: "logging", label: "Logs" },
|
|
91
|
+
{ id: "recording", label: "Recording" },
|
|
92
|
+
{ id: "ffmpeg", label: "FFmpeg" },
|
|
93
|
+
{ id: "detection", label: "Detection" },
|
|
94
|
+
{ id: "auth", label: "Auth" },
|
|
95
|
+
{ id: "retention", label: "Retention" }
|
|
96
|
+
];
|
|
97
|
+
var SERVER_SCHEMA = {
|
|
98
|
+
sections: [
|
|
99
|
+
{
|
|
100
|
+
id: "server-info",
|
|
101
|
+
title: "Server",
|
|
102
|
+
description: "Core server connection settings (read-only)",
|
|
103
|
+
columns: 2,
|
|
104
|
+
fields: [
|
|
105
|
+
{
|
|
106
|
+
type: "info",
|
|
107
|
+
key: "server-restart-note",
|
|
108
|
+
label: "Restart required",
|
|
109
|
+
content: "Server settings are read-only. Change them in config.yaml and restart.",
|
|
110
|
+
variant: "warning"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: "text",
|
|
114
|
+
key: "port",
|
|
115
|
+
label: "Port",
|
|
116
|
+
disabled: true,
|
|
117
|
+
description: "Listening port"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: "text",
|
|
121
|
+
key: "host",
|
|
122
|
+
label: "Host",
|
|
123
|
+
disabled: true,
|
|
124
|
+
description: "Bind address"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: "text",
|
|
128
|
+
key: "dataPath",
|
|
129
|
+
label: "Data Path",
|
|
130
|
+
disabled: true,
|
|
131
|
+
description: "Root data directory",
|
|
132
|
+
span: 2
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
};
|
|
138
|
+
var STORAGE_SCHEMA = {
|
|
139
|
+
sections: []
|
|
140
|
+
};
|
|
141
|
+
var LOGGING_SCHEMA = {
|
|
142
|
+
sections: [
|
|
143
|
+
{
|
|
144
|
+
id: "logging-settings",
|
|
145
|
+
title: "Logging",
|
|
146
|
+
description: "Global log verbosity. Retention is managed per log-destination addon.",
|
|
147
|
+
columns: 1,
|
|
148
|
+
fields: [
|
|
149
|
+
{
|
|
150
|
+
type: "select",
|
|
151
|
+
key: "level",
|
|
152
|
+
label: "Log Level",
|
|
153
|
+
options: [
|
|
154
|
+
{ value: "debug", label: "Debug" },
|
|
155
|
+
{ value: "info", label: "Info" },
|
|
156
|
+
{ value: "warn", label: "Warn" },
|
|
157
|
+
{ value: "error", label: "Error" }
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
};
|
|
164
|
+
var RECORDING_SCHEMA = {
|
|
165
|
+
sections: [
|
|
166
|
+
{
|
|
167
|
+
id: "recording-settings",
|
|
168
|
+
title: "Recording",
|
|
169
|
+
description: "Video recording segment and retention defaults",
|
|
170
|
+
columns: 2,
|
|
171
|
+
fields: [
|
|
172
|
+
{
|
|
173
|
+
type: "number",
|
|
174
|
+
key: "segmentDurationSeconds",
|
|
175
|
+
label: "Segment Duration",
|
|
176
|
+
description: "Length of each recording segment",
|
|
177
|
+
min: 1,
|
|
178
|
+
max: 60,
|
|
179
|
+
step: 1,
|
|
180
|
+
unit: "seconds"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
type: "number",
|
|
184
|
+
key: "defaultRetentionDays",
|
|
185
|
+
label: "Default Retention",
|
|
186
|
+
description: "Days to keep recordings before auto-delete",
|
|
187
|
+
min: 1,
|
|
188
|
+
max: 365,
|
|
189
|
+
step: 1,
|
|
190
|
+
unit: "days"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
};
|
|
196
|
+
var FFMPEG_SCHEMA = {
|
|
197
|
+
sections: [
|
|
198
|
+
{
|
|
199
|
+
id: "ffmpeg-settings",
|
|
200
|
+
title: "FFmpeg",
|
|
201
|
+
description: "FFmpeg binary and hardware acceleration settings",
|
|
202
|
+
columns: 2,
|
|
203
|
+
fields: [
|
|
204
|
+
{
|
|
205
|
+
type: "text",
|
|
206
|
+
key: "binaryPath",
|
|
207
|
+
label: "Binary Path",
|
|
208
|
+
description: "Path to ffmpeg executable",
|
|
209
|
+
placeholder: "ffmpeg",
|
|
210
|
+
span: 2
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
type: "select",
|
|
214
|
+
key: "hwAccel",
|
|
215
|
+
label: "Hardware Acceleration",
|
|
216
|
+
description: "GPU decoding/encoding backend",
|
|
217
|
+
options: [
|
|
218
|
+
{ value: "auto", label: "Auto-detect" },
|
|
219
|
+
{ value: "none", label: "None (CPU only)" },
|
|
220
|
+
{ value: "videotoolbox", label: "VideoToolbox (macOS)" },
|
|
221
|
+
{ value: "vaapi", label: "VA-API (Linux Intel/AMD)" },
|
|
222
|
+
{ value: "qsv", label: "QSV (Intel Quick Sync)" },
|
|
223
|
+
{ value: "cuda", label: "CUDA (NVIDIA)" }
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
type: "number",
|
|
228
|
+
key: "threadCount",
|
|
229
|
+
label: "Thread Count",
|
|
230
|
+
description: "0 = auto (let FFmpeg decide)",
|
|
231
|
+
min: 0,
|
|
232
|
+
max: 16,
|
|
233
|
+
step: 1
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
};
|
|
239
|
+
var DETECTION_SCHEMA = {
|
|
240
|
+
sections: [
|
|
241
|
+
{
|
|
242
|
+
id: "detection-fps",
|
|
243
|
+
title: "Frame Rates",
|
|
244
|
+
description: "Default analysis frame rates for new cameras",
|
|
245
|
+
columns: 2,
|
|
246
|
+
fields: [
|
|
247
|
+
{
|
|
248
|
+
type: "number",
|
|
249
|
+
key: "defaultMotionFps",
|
|
250
|
+
label: "Motion FPS",
|
|
251
|
+
description: "Frames per second for motion detection",
|
|
252
|
+
min: 1,
|
|
253
|
+
max: 30,
|
|
254
|
+
step: 1,
|
|
255
|
+
unit: "fps"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
type: "number",
|
|
259
|
+
key: "defaultDetectionFps",
|
|
260
|
+
label: "Detection FPS",
|
|
261
|
+
description: "Frames per second for object detection",
|
|
262
|
+
min: 1,
|
|
263
|
+
max: 30,
|
|
264
|
+
step: 1,
|
|
265
|
+
unit: "fps"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: "detection-thresholds",
|
|
271
|
+
title: "Thresholds",
|
|
272
|
+
description: "Default confidence and cooldown for detections",
|
|
273
|
+
columns: 2,
|
|
274
|
+
fields: [
|
|
275
|
+
{
|
|
276
|
+
type: "slider",
|
|
277
|
+
key: "defaultConfidenceThreshold",
|
|
278
|
+
label: "Confidence Threshold",
|
|
279
|
+
description: "Minimum confidence to trigger a detection event",
|
|
280
|
+
min: 0.1,
|
|
281
|
+
max: 1,
|
|
282
|
+
step: 0.05,
|
|
283
|
+
showValue: true
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
type: "number",
|
|
287
|
+
key: "defaultCooldownSeconds",
|
|
288
|
+
label: "Cooldown",
|
|
289
|
+
description: "Seconds between duplicate events",
|
|
290
|
+
min: 0,
|
|
291
|
+
max: 300,
|
|
292
|
+
step: 1,
|
|
293
|
+
unit: "seconds"
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
id: "detection-tracker",
|
|
299
|
+
title: "Tracker",
|
|
300
|
+
description: "SORT/IoU tracker parameters",
|
|
301
|
+
columns: 3,
|
|
302
|
+
fields: [
|
|
303
|
+
{
|
|
304
|
+
type: "number",
|
|
305
|
+
key: "trackerMaxAgeFrames",
|
|
306
|
+
label: "Max Age",
|
|
307
|
+
description: "Frames before a lost track is removed",
|
|
308
|
+
min: 1,
|
|
309
|
+
max: 120,
|
|
310
|
+
step: 1,
|
|
311
|
+
unit: "frames"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
type: "number",
|
|
315
|
+
key: "trackerMinHits",
|
|
316
|
+
label: "Min Hits",
|
|
317
|
+
description: "Consecutive detections to confirm a track",
|
|
318
|
+
min: 1,
|
|
319
|
+
max: 20,
|
|
320
|
+
step: 1
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
type: "slider",
|
|
324
|
+
key: "trackerIouThreshold",
|
|
325
|
+
label: "IoU Threshold",
|
|
326
|
+
description: "Minimum IoU to associate detection with track",
|
|
327
|
+
min: 0.1,
|
|
328
|
+
max: 0.9,
|
|
329
|
+
step: 0.05,
|
|
330
|
+
showValue: true
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
]
|
|
335
|
+
};
|
|
336
|
+
var AUTH_SCHEMA = {
|
|
337
|
+
sections: [
|
|
338
|
+
{
|
|
339
|
+
id: "auth-settings",
|
|
340
|
+
title: "Authentication",
|
|
341
|
+
description: "Token and session settings",
|
|
342
|
+
columns: 1,
|
|
343
|
+
fields: [
|
|
344
|
+
{
|
|
345
|
+
type: "text",
|
|
346
|
+
key: "tokenExpiry",
|
|
347
|
+
label: "Token Expiry",
|
|
348
|
+
description: "JWT token lifetime (e.g. 24h, 7d, 1h)",
|
|
349
|
+
placeholder: "24h"
|
|
350
|
+
}
|
|
351
|
+
]
|
|
352
|
+
}
|
|
353
|
+
]
|
|
354
|
+
};
|
|
355
|
+
var RETENTION_SCHEMA = {
|
|
356
|
+
sections: [
|
|
357
|
+
{
|
|
358
|
+
id: "retention-settings",
|
|
359
|
+
title: "Retention",
|
|
360
|
+
description: "Data retention periods for analytics data",
|
|
361
|
+
columns: 1,
|
|
362
|
+
fields: [
|
|
363
|
+
{
|
|
364
|
+
type: "slider",
|
|
365
|
+
key: "detectionEventsDays",
|
|
366
|
+
label: "Detection Events Retention",
|
|
367
|
+
min: 1,
|
|
368
|
+
max: 365,
|
|
369
|
+
unit: "days",
|
|
370
|
+
showValue: true,
|
|
371
|
+
span: 1
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
type: "slider",
|
|
375
|
+
key: "audioLevelsDays",
|
|
376
|
+
label: "Audio Levels Retention",
|
|
377
|
+
min: 1,
|
|
378
|
+
max: 90,
|
|
379
|
+
unit: "days",
|
|
380
|
+
showValue: true,
|
|
381
|
+
span: 1
|
|
382
|
+
}
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
]
|
|
386
|
+
};
|
|
387
|
+
var SYSTEM_SETTINGS_SCHEMAS = {
|
|
388
|
+
server: SERVER_SCHEMA,
|
|
389
|
+
storage: STORAGE_SCHEMA,
|
|
390
|
+
logging: LOGGING_SCHEMA,
|
|
391
|
+
recording: RECORDING_SCHEMA,
|
|
392
|
+
ffmpeg: FFMPEG_SCHEMA,
|
|
393
|
+
detection: DETECTION_SCHEMA,
|
|
394
|
+
auth: AUTH_SCHEMA,
|
|
395
|
+
retention: RETENTION_SCHEMA,
|
|
396
|
+
// These sections have no UI form — managed programmatically or addon-specific
|
|
397
|
+
streaming: { sections: [] },
|
|
398
|
+
backup: { sections: [] },
|
|
399
|
+
features: { sections: [] },
|
|
400
|
+
addons: { sections: [] }
|
|
401
|
+
};
|
|
402
|
+
function getSystemSettingsSchema(section) {
|
|
403
|
+
return SYSTEM_SETTINGS_SCHEMAS[section];
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// src/constants.ts
|
|
407
|
+
var HF_REPO = "camstack/camstack-models";
|
|
408
|
+
var HF_BASE_URL = `https://huggingface.co/${HF_REPO}/resolve/main`;
|
|
409
|
+
|
|
410
|
+
// src/utils/hf-url.ts
|
|
411
|
+
function hfModelUrl(repo, path) {
|
|
412
|
+
return `https://huggingface.co/${repo}/resolve/main/${path}`;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// src/utils/cosine-similarity.ts
|
|
416
|
+
function cosineSimilarity(a, b) {
|
|
417
|
+
if (a.length !== b.length) return 0;
|
|
418
|
+
let dotProduct = 0;
|
|
419
|
+
let normA = 0;
|
|
420
|
+
let normB = 0;
|
|
421
|
+
for (let i = 0; i < a.length; i++) {
|
|
422
|
+
dotProduct += a[i] * b[i];
|
|
423
|
+
normA += a[i] * a[i];
|
|
424
|
+
normB += b[i] * b[i];
|
|
425
|
+
}
|
|
426
|
+
const denom = Math.sqrt(normA) * Math.sqrt(normB);
|
|
427
|
+
return denom === 0 ? 0 : dotProduct / denom;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// src/catalogs/coco-classmap.ts
|
|
431
|
+
var COCO_80_LABELS = [
|
|
432
|
+
{ id: "person", name: "Person" },
|
|
433
|
+
{ id: "bicycle", name: "Bicycle" },
|
|
434
|
+
{ id: "car", name: "Car" },
|
|
435
|
+
{ id: "motorcycle", name: "Motorcycle" },
|
|
436
|
+
{ id: "airplane", name: "Airplane" },
|
|
437
|
+
{ id: "bus", name: "Bus" },
|
|
438
|
+
{ id: "train", name: "Train" },
|
|
439
|
+
{ id: "truck", name: "Truck" },
|
|
440
|
+
{ id: "boat", name: "Boat" },
|
|
441
|
+
{ id: "traffic light", name: "Traffic Light" },
|
|
442
|
+
{ id: "fire hydrant", name: "Fire Hydrant" },
|
|
443
|
+
{ id: "stop sign", name: "Stop Sign" },
|
|
444
|
+
{ id: "parking meter", name: "Parking Meter" },
|
|
445
|
+
{ id: "bench", name: "Bench" },
|
|
446
|
+
{ id: "bird", name: "Bird" },
|
|
447
|
+
{ id: "cat", name: "Cat" },
|
|
448
|
+
{ id: "dog", name: "Dog" },
|
|
449
|
+
{ id: "horse", name: "Horse" },
|
|
450
|
+
{ id: "sheep", name: "Sheep" },
|
|
451
|
+
{ id: "cow", name: "Cow" },
|
|
452
|
+
{ id: "elephant", name: "Elephant" },
|
|
453
|
+
{ id: "bear", name: "Bear" },
|
|
454
|
+
{ id: "zebra", name: "Zebra" },
|
|
455
|
+
{ id: "giraffe", name: "Giraffe" },
|
|
456
|
+
{ id: "backpack", name: "Backpack" },
|
|
457
|
+
{ id: "umbrella", name: "Umbrella" },
|
|
458
|
+
{ id: "handbag", name: "Handbag" },
|
|
459
|
+
{ id: "tie", name: "Tie" },
|
|
460
|
+
{ id: "suitcase", name: "Suitcase" },
|
|
461
|
+
{ id: "frisbee", name: "Frisbee" },
|
|
462
|
+
{ id: "skis", name: "Skis" },
|
|
463
|
+
{ id: "snowboard", name: "Snowboard" },
|
|
464
|
+
{ id: "sports ball", name: "Sports Ball" },
|
|
465
|
+
{ id: "kite", name: "Kite" },
|
|
466
|
+
{ id: "baseball bat", name: "Baseball Bat" },
|
|
467
|
+
{ id: "baseball glove", name: "Baseball Glove" },
|
|
468
|
+
{ id: "skateboard", name: "Skateboard" },
|
|
469
|
+
{ id: "surfboard", name: "Surfboard" },
|
|
470
|
+
{ id: "tennis racket", name: "Tennis Racket" },
|
|
471
|
+
{ id: "bottle", name: "Bottle" },
|
|
472
|
+
{ id: "wine glass", name: "Wine Glass" },
|
|
473
|
+
{ id: "cup", name: "Cup" },
|
|
474
|
+
{ id: "fork", name: "Fork" },
|
|
475
|
+
{ id: "knife", name: "Knife" },
|
|
476
|
+
{ id: "spoon", name: "Spoon" },
|
|
477
|
+
{ id: "bowl", name: "Bowl" },
|
|
478
|
+
{ id: "banana", name: "Banana" },
|
|
479
|
+
{ id: "apple", name: "Apple" },
|
|
480
|
+
{ id: "sandwich", name: "Sandwich" },
|
|
481
|
+
{ id: "orange", name: "Orange" },
|
|
482
|
+
{ id: "broccoli", name: "Broccoli" },
|
|
483
|
+
{ id: "carrot", name: "Carrot" },
|
|
484
|
+
{ id: "hot dog", name: "Hot Dog" },
|
|
485
|
+
{ id: "pizza", name: "Pizza" },
|
|
486
|
+
{ id: "donut", name: "Donut" },
|
|
487
|
+
{ id: "cake", name: "Cake" },
|
|
488
|
+
{ id: "chair", name: "Chair" },
|
|
489
|
+
{ id: "couch", name: "Couch" },
|
|
490
|
+
{ id: "potted plant", name: "Potted Plant" },
|
|
491
|
+
{ id: "bed", name: "Bed" },
|
|
492
|
+
{ id: "dining table", name: "Dining Table" },
|
|
493
|
+
{ id: "toilet", name: "Toilet" },
|
|
494
|
+
{ id: "tv", name: "TV" },
|
|
495
|
+
{ id: "laptop", name: "Laptop" },
|
|
496
|
+
{ id: "mouse", name: "Mouse" },
|
|
497
|
+
{ id: "remote", name: "Remote" },
|
|
498
|
+
{ id: "keyboard", name: "Keyboard" },
|
|
499
|
+
{ id: "cell phone", name: "Cell Phone" },
|
|
500
|
+
{ id: "microwave", name: "Microwave" },
|
|
501
|
+
{ id: "oven", name: "Oven" },
|
|
502
|
+
{ id: "toaster", name: "Toaster" },
|
|
503
|
+
{ id: "sink", name: "Sink" },
|
|
504
|
+
{ id: "refrigerator", name: "Refrigerator" },
|
|
505
|
+
{ id: "book", name: "Book" },
|
|
506
|
+
{ id: "clock", name: "Clock" },
|
|
507
|
+
{ id: "vase", name: "Vase" },
|
|
508
|
+
{ id: "scissors", name: "Scissors" },
|
|
509
|
+
{ id: "teddy bear", name: "Teddy Bear" },
|
|
510
|
+
{ id: "hair drier", name: "Hair Drier" },
|
|
511
|
+
{ id: "toothbrush", name: "Toothbrush" }
|
|
512
|
+
];
|
|
513
|
+
var MACRO_LABELS = [
|
|
514
|
+
{ id: "person", name: "Person" },
|
|
515
|
+
{ id: "vehicle", name: "Vehicle" },
|
|
516
|
+
{ id: "animal", name: "Animal" }
|
|
517
|
+
];
|
|
518
|
+
var COCO_TO_MACRO = {
|
|
519
|
+
mapping: {
|
|
520
|
+
person: "person",
|
|
521
|
+
bicycle: "vehicle",
|
|
522
|
+
car: "vehicle",
|
|
523
|
+
motorcycle: "vehicle",
|
|
524
|
+
airplane: "vehicle",
|
|
525
|
+
bus: "vehicle",
|
|
526
|
+
train: "vehicle",
|
|
527
|
+
truck: "vehicle",
|
|
528
|
+
boat: "vehicle",
|
|
529
|
+
bird: "animal",
|
|
530
|
+
cat: "animal",
|
|
531
|
+
dog: "animal",
|
|
532
|
+
horse: "animal",
|
|
533
|
+
sheep: "animal",
|
|
534
|
+
cow: "animal",
|
|
535
|
+
elephant: "animal",
|
|
536
|
+
bear: "animal",
|
|
537
|
+
zebra: "animal",
|
|
538
|
+
giraffe: "animal"
|
|
539
|
+
},
|
|
540
|
+
preserveOriginal: true
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
// src/types/device-type.ts
|
|
544
|
+
var DeviceType = /* @__PURE__ */ ((DeviceType2) => {
|
|
545
|
+
DeviceType2["Camera"] = "camera";
|
|
546
|
+
return DeviceType2;
|
|
547
|
+
})(DeviceType || {});
|
|
548
|
+
var DEVICE_TYPE_INFO = {
|
|
549
|
+
["camera" /* Camera */]: { type: "camera" /* Camera */, label: "Camera", icon: "camera" }
|
|
550
|
+
};
|
|
19
551
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
BIRD_NABIRDS_MODELS,
|
|
23
|
-
BIRD_SPECIES_MODELS,
|
|
552
|
+
BINARY_FRAME_HEADER_SIZE,
|
|
553
|
+
BINARY_FRAME_TYPE,
|
|
24
554
|
COCO_80_LABELS,
|
|
25
555
|
COCO_TO_MACRO,
|
|
26
|
-
|
|
27
|
-
|
|
556
|
+
DEFAULT_FEATURES,
|
|
557
|
+
DEFAULT_LOCATION_SUBPATHS,
|
|
558
|
+
DEFAULT_RETENTION,
|
|
559
|
+
DETECTION_TYPES,
|
|
560
|
+
DEVICE_TYPE_INFO,
|
|
561
|
+
DeviceType,
|
|
28
562
|
HF_BASE_URL,
|
|
29
563
|
HF_REPO,
|
|
30
564
|
MACRO_LABELS,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
565
|
+
READ_ONLY_SECTIONS,
|
|
566
|
+
RECOGNITION_TYPES,
|
|
567
|
+
SETTINGS_TABS,
|
|
568
|
+
SUB_DETECTION_TYPES,
|
|
569
|
+
SYSTEM_SETTINGS_SCHEMAS,
|
|
570
|
+
cosineSimilarity,
|
|
571
|
+
createAnalysisContext,
|
|
572
|
+
enrichContext,
|
|
573
|
+
getSystemSettingsSchema,
|
|
574
|
+
hfModelUrl,
|
|
575
|
+
resolveTranslation
|
|
36
576
|
};
|
|
37
577
|
//# sourceMappingURL=index.mjs.map
|