@camstack/addon-model-studio 1.1.201 → 1.1.202
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 +34 -26
- package/dist/{MotionZonesSettings-C5XCa2RN.mjs → MotionZonesSettings-qabihnVu.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-Byby1Qnl.mjs → PrivacyMaskSettings-CGVI9EVl.mjs} +4 -4
- package/dist/{SceneMonitorEditor-BehD1iD6.mjs → SceneMonitorEditor-BcAVb1c7.mjs} +3 -3
- package/dist/_stub.js +3927 -3903
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BYPEJjop.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CZVL55Bi.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DMrwYkbN.mjs +26 -0
- package/dist/{hostInit-Ds4oKb79.mjs → hostInit-D_0AEBSS.mjs} +2 -2
- package/dist/model-studio.addon.js +586 -46
- package/dist/model-studio.addon.mjs +586 -46
- package/dist/{player-overlays-BdsADMdm.mjs → player-overlays-CgZQeBdy.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-orJ4AkQR.mjs → responsive-dgrtmGP7.mjs} +1 -1
- package/dist/{scene-monitor-copy-CRMa4vtd.mjs → scene-monitor-copy-CWuj3twx.mjs} +1 -1
- package/dist/{square-CgcW-Db-.mjs → square-U1jjwP1Q.mjs} +1 -1
- package/dist/{trash-2-Di341FuZ.mjs → trash-2-B3hyZ06m.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CHD2bVBg.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Rw5qHN1M.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CX_tb6VB.mjs +0 -26
|
@@ -10926,6 +10926,478 @@ var ClipSearchStrictnessSchema = _enum([
|
|
|
10926
10926
|
"balanced",
|
|
10927
10927
|
"strict"
|
|
10928
10928
|
]);
|
|
10929
|
+
var COCO_80_LABELS = [
|
|
10930
|
+
{
|
|
10931
|
+
id: "person",
|
|
10932
|
+
name: "Person"
|
|
10933
|
+
},
|
|
10934
|
+
{
|
|
10935
|
+
id: "bicycle",
|
|
10936
|
+
name: "Bicycle"
|
|
10937
|
+
},
|
|
10938
|
+
{
|
|
10939
|
+
id: "car",
|
|
10940
|
+
name: "Car"
|
|
10941
|
+
},
|
|
10942
|
+
{
|
|
10943
|
+
id: "motorcycle",
|
|
10944
|
+
name: "Motorcycle"
|
|
10945
|
+
},
|
|
10946
|
+
{
|
|
10947
|
+
id: "airplane",
|
|
10948
|
+
name: "Airplane"
|
|
10949
|
+
},
|
|
10950
|
+
{
|
|
10951
|
+
id: "bus",
|
|
10952
|
+
name: "Bus"
|
|
10953
|
+
},
|
|
10954
|
+
{
|
|
10955
|
+
id: "train",
|
|
10956
|
+
name: "Train"
|
|
10957
|
+
},
|
|
10958
|
+
{
|
|
10959
|
+
id: "truck",
|
|
10960
|
+
name: "Truck"
|
|
10961
|
+
},
|
|
10962
|
+
{
|
|
10963
|
+
id: "boat",
|
|
10964
|
+
name: "Boat"
|
|
10965
|
+
},
|
|
10966
|
+
{
|
|
10967
|
+
id: "traffic light",
|
|
10968
|
+
name: "Traffic Light"
|
|
10969
|
+
},
|
|
10970
|
+
{
|
|
10971
|
+
id: "fire hydrant",
|
|
10972
|
+
name: "Fire Hydrant"
|
|
10973
|
+
},
|
|
10974
|
+
{
|
|
10975
|
+
id: "stop sign",
|
|
10976
|
+
name: "Stop Sign"
|
|
10977
|
+
},
|
|
10978
|
+
{
|
|
10979
|
+
id: "parking meter",
|
|
10980
|
+
name: "Parking Meter"
|
|
10981
|
+
},
|
|
10982
|
+
{
|
|
10983
|
+
id: "bench",
|
|
10984
|
+
name: "Bench"
|
|
10985
|
+
},
|
|
10986
|
+
{
|
|
10987
|
+
id: "bird",
|
|
10988
|
+
name: "Bird"
|
|
10989
|
+
},
|
|
10990
|
+
{
|
|
10991
|
+
id: "cat",
|
|
10992
|
+
name: "Cat"
|
|
10993
|
+
},
|
|
10994
|
+
{
|
|
10995
|
+
id: "dog",
|
|
10996
|
+
name: "Dog"
|
|
10997
|
+
},
|
|
10998
|
+
{
|
|
10999
|
+
id: "horse",
|
|
11000
|
+
name: "Horse"
|
|
11001
|
+
},
|
|
11002
|
+
{
|
|
11003
|
+
id: "sheep",
|
|
11004
|
+
name: "Sheep"
|
|
11005
|
+
},
|
|
11006
|
+
{
|
|
11007
|
+
id: "cow",
|
|
11008
|
+
name: "Cow"
|
|
11009
|
+
},
|
|
11010
|
+
{
|
|
11011
|
+
id: "elephant",
|
|
11012
|
+
name: "Elephant"
|
|
11013
|
+
},
|
|
11014
|
+
{
|
|
11015
|
+
id: "bear",
|
|
11016
|
+
name: "Bear"
|
|
11017
|
+
},
|
|
11018
|
+
{
|
|
11019
|
+
id: "zebra",
|
|
11020
|
+
name: "Zebra"
|
|
11021
|
+
},
|
|
11022
|
+
{
|
|
11023
|
+
id: "giraffe",
|
|
11024
|
+
name: "Giraffe"
|
|
11025
|
+
},
|
|
11026
|
+
{
|
|
11027
|
+
id: "backpack",
|
|
11028
|
+
name: "Backpack"
|
|
11029
|
+
},
|
|
11030
|
+
{
|
|
11031
|
+
id: "umbrella",
|
|
11032
|
+
name: "Umbrella"
|
|
11033
|
+
},
|
|
11034
|
+
{
|
|
11035
|
+
id: "handbag",
|
|
11036
|
+
name: "Handbag"
|
|
11037
|
+
},
|
|
11038
|
+
{
|
|
11039
|
+
id: "tie",
|
|
11040
|
+
name: "Tie"
|
|
11041
|
+
},
|
|
11042
|
+
{
|
|
11043
|
+
id: "suitcase",
|
|
11044
|
+
name: "Suitcase"
|
|
11045
|
+
},
|
|
11046
|
+
{
|
|
11047
|
+
id: "frisbee",
|
|
11048
|
+
name: "Frisbee"
|
|
11049
|
+
},
|
|
11050
|
+
{
|
|
11051
|
+
id: "skis",
|
|
11052
|
+
name: "Skis"
|
|
11053
|
+
},
|
|
11054
|
+
{
|
|
11055
|
+
id: "snowboard",
|
|
11056
|
+
name: "Snowboard"
|
|
11057
|
+
},
|
|
11058
|
+
{
|
|
11059
|
+
id: "sports ball",
|
|
11060
|
+
name: "Sports Ball"
|
|
11061
|
+
},
|
|
11062
|
+
{
|
|
11063
|
+
id: "kite",
|
|
11064
|
+
name: "Kite"
|
|
11065
|
+
},
|
|
11066
|
+
{
|
|
11067
|
+
id: "baseball bat",
|
|
11068
|
+
name: "Baseball Bat"
|
|
11069
|
+
},
|
|
11070
|
+
{
|
|
11071
|
+
id: "baseball glove",
|
|
11072
|
+
name: "Baseball Glove"
|
|
11073
|
+
},
|
|
11074
|
+
{
|
|
11075
|
+
id: "skateboard",
|
|
11076
|
+
name: "Skateboard"
|
|
11077
|
+
},
|
|
11078
|
+
{
|
|
11079
|
+
id: "surfboard",
|
|
11080
|
+
name: "Surfboard"
|
|
11081
|
+
},
|
|
11082
|
+
{
|
|
11083
|
+
id: "tennis racket",
|
|
11084
|
+
name: "Tennis Racket"
|
|
11085
|
+
},
|
|
11086
|
+
{
|
|
11087
|
+
id: "bottle",
|
|
11088
|
+
name: "Bottle"
|
|
11089
|
+
},
|
|
11090
|
+
{
|
|
11091
|
+
id: "wine glass",
|
|
11092
|
+
name: "Wine Glass"
|
|
11093
|
+
},
|
|
11094
|
+
{
|
|
11095
|
+
id: "cup",
|
|
11096
|
+
name: "Cup"
|
|
11097
|
+
},
|
|
11098
|
+
{
|
|
11099
|
+
id: "fork",
|
|
11100
|
+
name: "Fork"
|
|
11101
|
+
},
|
|
11102
|
+
{
|
|
11103
|
+
id: "knife",
|
|
11104
|
+
name: "Knife"
|
|
11105
|
+
},
|
|
11106
|
+
{
|
|
11107
|
+
id: "spoon",
|
|
11108
|
+
name: "Spoon"
|
|
11109
|
+
},
|
|
11110
|
+
{
|
|
11111
|
+
id: "bowl",
|
|
11112
|
+
name: "Bowl"
|
|
11113
|
+
},
|
|
11114
|
+
{
|
|
11115
|
+
id: "banana",
|
|
11116
|
+
name: "Banana"
|
|
11117
|
+
},
|
|
11118
|
+
{
|
|
11119
|
+
id: "apple",
|
|
11120
|
+
name: "Apple"
|
|
11121
|
+
},
|
|
11122
|
+
{
|
|
11123
|
+
id: "sandwich",
|
|
11124
|
+
name: "Sandwich"
|
|
11125
|
+
},
|
|
11126
|
+
{
|
|
11127
|
+
id: "orange",
|
|
11128
|
+
name: "Orange"
|
|
11129
|
+
},
|
|
11130
|
+
{
|
|
11131
|
+
id: "broccoli",
|
|
11132
|
+
name: "Broccoli"
|
|
11133
|
+
},
|
|
11134
|
+
{
|
|
11135
|
+
id: "carrot",
|
|
11136
|
+
name: "Carrot"
|
|
11137
|
+
},
|
|
11138
|
+
{
|
|
11139
|
+
id: "hot dog",
|
|
11140
|
+
name: "Hot Dog"
|
|
11141
|
+
},
|
|
11142
|
+
{
|
|
11143
|
+
id: "pizza",
|
|
11144
|
+
name: "Pizza"
|
|
11145
|
+
},
|
|
11146
|
+
{
|
|
11147
|
+
id: "donut",
|
|
11148
|
+
name: "Donut"
|
|
11149
|
+
},
|
|
11150
|
+
{
|
|
11151
|
+
id: "cake",
|
|
11152
|
+
name: "Cake"
|
|
11153
|
+
},
|
|
11154
|
+
{
|
|
11155
|
+
id: "chair",
|
|
11156
|
+
name: "Chair"
|
|
11157
|
+
},
|
|
11158
|
+
{
|
|
11159
|
+
id: "couch",
|
|
11160
|
+
name: "Couch"
|
|
11161
|
+
},
|
|
11162
|
+
{
|
|
11163
|
+
id: "potted plant",
|
|
11164
|
+
name: "Potted Plant"
|
|
11165
|
+
},
|
|
11166
|
+
{
|
|
11167
|
+
id: "bed",
|
|
11168
|
+
name: "Bed"
|
|
11169
|
+
},
|
|
11170
|
+
{
|
|
11171
|
+
id: "dining table",
|
|
11172
|
+
name: "Dining Table"
|
|
11173
|
+
},
|
|
11174
|
+
{
|
|
11175
|
+
id: "toilet",
|
|
11176
|
+
name: "Toilet"
|
|
11177
|
+
},
|
|
11178
|
+
{
|
|
11179
|
+
id: "tv",
|
|
11180
|
+
name: "TV"
|
|
11181
|
+
},
|
|
11182
|
+
{
|
|
11183
|
+
id: "laptop",
|
|
11184
|
+
name: "Laptop"
|
|
11185
|
+
},
|
|
11186
|
+
{
|
|
11187
|
+
id: "mouse",
|
|
11188
|
+
name: "Mouse"
|
|
11189
|
+
},
|
|
11190
|
+
{
|
|
11191
|
+
id: "remote",
|
|
11192
|
+
name: "Remote"
|
|
11193
|
+
},
|
|
11194
|
+
{
|
|
11195
|
+
id: "keyboard",
|
|
11196
|
+
name: "Keyboard"
|
|
11197
|
+
},
|
|
11198
|
+
{
|
|
11199
|
+
id: "cell phone",
|
|
11200
|
+
name: "Cell Phone"
|
|
11201
|
+
},
|
|
11202
|
+
{
|
|
11203
|
+
id: "microwave",
|
|
11204
|
+
name: "Microwave"
|
|
11205
|
+
},
|
|
11206
|
+
{
|
|
11207
|
+
id: "oven",
|
|
11208
|
+
name: "Oven"
|
|
11209
|
+
},
|
|
11210
|
+
{
|
|
11211
|
+
id: "toaster",
|
|
11212
|
+
name: "Toaster"
|
|
11213
|
+
},
|
|
11214
|
+
{
|
|
11215
|
+
id: "sink",
|
|
11216
|
+
name: "Sink"
|
|
11217
|
+
},
|
|
11218
|
+
{
|
|
11219
|
+
id: "refrigerator",
|
|
11220
|
+
name: "Refrigerator"
|
|
11221
|
+
},
|
|
11222
|
+
{
|
|
11223
|
+
id: "book",
|
|
11224
|
+
name: "Book"
|
|
11225
|
+
},
|
|
11226
|
+
{
|
|
11227
|
+
id: "clock",
|
|
11228
|
+
name: "Clock"
|
|
11229
|
+
},
|
|
11230
|
+
{
|
|
11231
|
+
id: "vase",
|
|
11232
|
+
name: "Vase"
|
|
11233
|
+
},
|
|
11234
|
+
{
|
|
11235
|
+
id: "scissors",
|
|
11236
|
+
name: "Scissors"
|
|
11237
|
+
},
|
|
11238
|
+
{
|
|
11239
|
+
id: "teddy bear",
|
|
11240
|
+
name: "Teddy Bear"
|
|
11241
|
+
},
|
|
11242
|
+
{
|
|
11243
|
+
id: "hair drier",
|
|
11244
|
+
name: "Hair Drier"
|
|
11245
|
+
},
|
|
11246
|
+
{
|
|
11247
|
+
id: "toothbrush",
|
|
11248
|
+
name: "Toothbrush"
|
|
11249
|
+
}
|
|
11250
|
+
];
|
|
11251
|
+
new Set([
|
|
11252
|
+
{
|
|
11253
|
+
id: "person",
|
|
11254
|
+
name: "Person"
|
|
11255
|
+
},
|
|
11256
|
+
{
|
|
11257
|
+
id: "vehicle",
|
|
11258
|
+
name: "Vehicle"
|
|
11259
|
+
},
|
|
11260
|
+
{
|
|
11261
|
+
id: "animal",
|
|
11262
|
+
name: "Animal"
|
|
11263
|
+
},
|
|
11264
|
+
{
|
|
11265
|
+
id: "package",
|
|
11266
|
+
name: "Package"
|
|
11267
|
+
}
|
|
11268
|
+
].map((l) => l.id));
|
|
11269
|
+
var COCO_TO_MACRO = {
|
|
11270
|
+
mapping: {
|
|
11271
|
+
person: "person",
|
|
11272
|
+
bicycle: "vehicle",
|
|
11273
|
+
car: "vehicle",
|
|
11274
|
+
motorcycle: "vehicle",
|
|
11275
|
+
airplane: "vehicle",
|
|
11276
|
+
bus: "vehicle",
|
|
11277
|
+
train: "vehicle",
|
|
11278
|
+
truck: "vehicle",
|
|
11279
|
+
boat: "vehicle",
|
|
11280
|
+
bird: "animal",
|
|
11281
|
+
cat: "animal",
|
|
11282
|
+
dog: "animal",
|
|
11283
|
+
horse: "animal",
|
|
11284
|
+
sheep: "animal",
|
|
11285
|
+
cow: "animal",
|
|
11286
|
+
elephant: "animal",
|
|
11287
|
+
bear: "animal",
|
|
11288
|
+
zebra: "animal",
|
|
11289
|
+
giraffe: "animal",
|
|
11290
|
+
suitcase: "package",
|
|
11291
|
+
backpack: "package",
|
|
11292
|
+
handbag: "package"
|
|
11293
|
+
},
|
|
11294
|
+
preserveOriginal: false
|
|
11295
|
+
};
|
|
11296
|
+
/** Steps a root detector may declare it fills. */
|
|
11297
|
+
var FILLABLE_STEP_IDS = [
|
|
11298
|
+
"animal-classifier",
|
|
11299
|
+
"vehicle-classifier",
|
|
11300
|
+
"package-detection"
|
|
11301
|
+
];
|
|
11302
|
+
/**
|
|
11303
|
+
* The EFFECT vocabulary of each fillable step: exactly the strings the step
|
|
11304
|
+
* itself emits, in its own spelling. A linked label is one of these and nothing
|
|
11305
|
+
* else, so a tier-1 value means the same thing whichever writer produced it.
|
|
11306
|
+
*
|
|
11307
|
+
* - `animal-classifier`: the PRIMARY model's `-labels.json` (Open Images V7,
|
|
11308
|
+
* 8 classes) — also the species allow-list the step offers.
|
|
11309
|
+
* - `vehicle-classifier`: `vehicle-type-v1-labels.json`, capitalised as the
|
|
11310
|
+
* model emits them (the classifier writes `winner.class` verbatim).
|
|
11311
|
+
* - `package-detection`: its one output class.
|
|
11312
|
+
*
|
|
11313
|
+
* `scripts/check-label-link-vocabulary.ts` fails the build if a model entry's
|
|
11314
|
+
* `labelToEffect` names anything outside this table.
|
|
11315
|
+
*/
|
|
11316
|
+
var FILLABLE_STEP_VOCABULARIES = {
|
|
11317
|
+
"animal-classifier": [
|
|
11318
|
+
"bird",
|
|
11319
|
+
"cat",
|
|
11320
|
+
"cow",
|
|
11321
|
+
"deer",
|
|
11322
|
+
"dog",
|
|
11323
|
+
"horse",
|
|
11324
|
+
"sheep",
|
|
11325
|
+
"squirrel"
|
|
11326
|
+
],
|
|
11327
|
+
"vehicle-classifier": [
|
|
11328
|
+
"Ambulance",
|
|
11329
|
+
"Bicycle",
|
|
11330
|
+
"Bus",
|
|
11331
|
+
"Car",
|
|
11332
|
+
"Motorcycle",
|
|
11333
|
+
"Taxi",
|
|
11334
|
+
"Truck",
|
|
11335
|
+
"Van"
|
|
11336
|
+
],
|
|
11337
|
+
"package-detection": ["package"]
|
|
11338
|
+
};
|
|
11339
|
+
/** The macro a detection must carry for the step to apply to it. */
|
|
11340
|
+
var FILLABLE_STEP_MACRO = {
|
|
11341
|
+
"animal-classifier": "animal",
|
|
11342
|
+
"vehicle-classifier": "vehicle",
|
|
11343
|
+
"package-detection": "package"
|
|
11344
|
+
};
|
|
11345
|
+
/**
|
|
11346
|
+
* Raw detector labels that name a vocabulary entry under another spelling.
|
|
11347
|
+
* Case-insensitive equality covers the rest (`car` → `Car`).
|
|
11348
|
+
*/
|
|
11349
|
+
var EFFECT_ALIASES = {
|
|
11350
|
+
"animal-classifier": {},
|
|
11351
|
+
"vehicle-classifier": {
|
|
11352
|
+
school_bus: "Bus",
|
|
11353
|
+
garbage_truck: "Truck"
|
|
11354
|
+
},
|
|
11355
|
+
"package-detection": {}
|
|
11356
|
+
};
|
|
11357
|
+
/**
|
|
11358
|
+
* A labelmap is COCO when it carries at least half of the COCO-80 classes. A
|
|
11359
|
+
* COCO detector NEVER fills a step (operator decision, D715): its `dog` / `car`
|
|
11360
|
+
* is the generic class the classifier exists to refine, and its six animal
|
|
11361
|
+
* classes would otherwise read as "fills animal-classifier 6/8". Frigate+
|
|
11362
|
+
* shares about a dozen COCO names; a COCO-80 or COCO-91 labelmap carries ~80.
|
|
11363
|
+
*/
|
|
11364
|
+
function isCocoLabelmap(labels) {
|
|
11365
|
+
const present = new Set(labels);
|
|
11366
|
+
return COCO_80_LABELS.filter((l) => present.has(l.id)).length * 2 >= COCO_80_LABELS.length;
|
|
11367
|
+
}
|
|
11368
|
+
function effectFor(stepId, label) {
|
|
11369
|
+
const alias = EFFECT_ALIASES[stepId][label];
|
|
11370
|
+
if (alias !== void 0) return alias;
|
|
11371
|
+
const folded = label.toLowerCase();
|
|
11372
|
+
return FILLABLE_STEP_VOCABULARIES[stepId].find((v) => v.toLowerCase() === folded);
|
|
11373
|
+
}
|
|
11374
|
+
/**
|
|
11375
|
+
* Which steps a root detector fills, from its labelmap and classMap. A label
|
|
11376
|
+
* counts for a step only when the model's classMap sends it to that step's
|
|
11377
|
+
* macro AND it names a vocabulary entry. A step none of the labels reach is
|
|
11378
|
+
* not declared; a COCO labelmap declares nothing.
|
|
11379
|
+
*/
|
|
11380
|
+
function deriveClassifierFills(labels, classMap) {
|
|
11381
|
+
if (classMap === void 0 || isCocoLabelmap(labels)) return [];
|
|
11382
|
+
const fills = [];
|
|
11383
|
+
for (const stepId of FILLABLE_STEP_IDS) {
|
|
11384
|
+
const labelToEffect = {};
|
|
11385
|
+
for (const label of labels) {
|
|
11386
|
+
if (classMap.mapping[label] !== FILLABLE_STEP_MACRO[stepId]) continue;
|
|
11387
|
+
const effect = effectFor(stepId, label);
|
|
11388
|
+
if (effect !== void 0) labelToEffect[label] = effect;
|
|
11389
|
+
}
|
|
11390
|
+
const covered = new Set(Object.values(labelToEffect));
|
|
11391
|
+
if (covered.size === 0) continue;
|
|
11392
|
+
const uncovered = FILLABLE_STEP_VOCABULARIES[stepId].filter((v) => !covered.has(v));
|
|
11393
|
+
fills.push({
|
|
11394
|
+
stepId,
|
|
11395
|
+
labelToEffect,
|
|
11396
|
+
uncovered
|
|
11397
|
+
});
|
|
11398
|
+
}
|
|
11399
|
+
return fills;
|
|
11400
|
+
}
|
|
10929
11401
|
var MODEL_FORMATS = [
|
|
10930
11402
|
"onnx",
|
|
10931
11403
|
"coreml",
|
|
@@ -11058,6 +11530,12 @@ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { wei
|
|
|
11058
11530
|
/** True when the weights or their data forbid commercial use. */
|
|
11059
11531
|
nonCommercial: boolean().optional()
|
|
11060
11532
|
}));
|
|
11533
|
+
/** One `fillsClassifierEffects` entry — see `ModelCatalogEntry.fillsClassifierEffects`. */
|
|
11534
|
+
var FillsClassifierEffectSchema = object({
|
|
11535
|
+
stepId: _enum(FILLABLE_STEP_IDS),
|
|
11536
|
+
labelToEffect: record(string(), string()),
|
|
11537
|
+
uncovered: array(string()).readonly()
|
|
11538
|
+
});
|
|
11061
11539
|
var ModelCatalogEntrySchema = object({
|
|
11062
11540
|
id: string(),
|
|
11063
11541
|
name: string(),
|
|
@@ -11184,6 +11662,16 @@ var ModelCatalogEntrySchema = object({
|
|
|
11184
11662
|
*/
|
|
11185
11663
|
classMap: DetectionCatalogClassMapSchema.optional(),
|
|
11186
11664
|
/**
|
|
11665
|
+
* The pipeline steps this ROOT detector already does the work of (D715):
|
|
11666
|
+
* its labels name the effect the step exists to produce (`deer` for
|
|
11667
|
+
* `animal-classifier`, `package` for `package-detection`). Derived from the
|
|
11668
|
+
* labelmap by `deriveClassifierFills`, never hand-written; a COCO model
|
|
11669
|
+
* declares none. Whether a declaration is honoured is the step's own
|
|
11670
|
+
* `labelLink` policy (`resolveLabelLink`). `labelToEffect` values are in
|
|
11671
|
+
* `FILLABLE_STEP_VOCABULARIES` (guard `check-label-link-vocabulary`).
|
|
11672
|
+
*/
|
|
11673
|
+
fillsClassifierEffects: array(FillsClassifierEffectSchema).readonly().optional(),
|
|
11674
|
+
/**
|
|
11187
11675
|
* The model's CLIP feature-space contract (text encoder, dimension, vector
|
|
11188
11676
|
* index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
|
|
11189
11677
|
* CLIP image encoder; its absence is what "not a CLIP model" means to the
|
|
@@ -18144,51 +18632,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
18144
18632
|
kind: "mutation",
|
|
18145
18633
|
auth: "admin"
|
|
18146
18634
|
});
|
|
18147
|
-
new Set([
|
|
18148
|
-
{
|
|
18149
|
-
id: "person",
|
|
18150
|
-
name: "Person"
|
|
18151
|
-
},
|
|
18152
|
-
{
|
|
18153
|
-
id: "vehicle",
|
|
18154
|
-
name: "Vehicle"
|
|
18155
|
-
},
|
|
18156
|
-
{
|
|
18157
|
-
id: "animal",
|
|
18158
|
-
name: "Animal"
|
|
18159
|
-
},
|
|
18160
|
-
{
|
|
18161
|
-
id: "package",
|
|
18162
|
-
name: "Package"
|
|
18163
|
-
}
|
|
18164
|
-
].map((l) => l.id));
|
|
18165
|
-
var COCO_TO_MACRO = {
|
|
18166
|
-
mapping: {
|
|
18167
|
-
person: "person",
|
|
18168
|
-
bicycle: "vehicle",
|
|
18169
|
-
car: "vehicle",
|
|
18170
|
-
motorcycle: "vehicle",
|
|
18171
|
-
airplane: "vehicle",
|
|
18172
|
-
bus: "vehicle",
|
|
18173
|
-
train: "vehicle",
|
|
18174
|
-
truck: "vehicle",
|
|
18175
|
-
boat: "vehicle",
|
|
18176
|
-
bird: "animal",
|
|
18177
|
-
cat: "animal",
|
|
18178
|
-
dog: "animal",
|
|
18179
|
-
horse: "animal",
|
|
18180
|
-
sheep: "animal",
|
|
18181
|
-
cow: "animal",
|
|
18182
|
-
elephant: "animal",
|
|
18183
|
-
bear: "animal",
|
|
18184
|
-
zebra: "animal",
|
|
18185
|
-
giraffe: "animal",
|
|
18186
|
-
suitcase: "package",
|
|
18187
|
-
backpack: "package",
|
|
18188
|
-
handbag: "package"
|
|
18189
|
-
},
|
|
18190
|
-
preserveOriginal: false
|
|
18191
|
-
};
|
|
18192
18635
|
var AUDIO_MACRO_LABELS = [
|
|
18193
18636
|
{
|
|
18194
18637
|
id: "speech",
|
|
@@ -23592,7 +24035,8 @@ var PipelineModelOptionSchema = object({
|
|
|
23592
24035
|
group: ModelVariantGroupSchema.optional(),
|
|
23593
24036
|
legacy: boolean().optional(),
|
|
23594
24037
|
provider: ModelProviderIdSchema.optional(),
|
|
23595
|
-
defaultConfidence: number().optional()
|
|
24038
|
+
defaultConfidence: number().optional(),
|
|
24039
|
+
fillsClassifierEffects: array(FillsClassifierEffectSchema).readonly().optional()
|
|
23596
24040
|
});
|
|
23597
24041
|
var ConfigFieldBridge = custom();
|
|
23598
24042
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -36607,6 +37051,82 @@ DeviceType.Camera, method(object({
|
|
|
36607
37051
|
package: array(ZoneRuleSchema).readonly()
|
|
36608
37052
|
});
|
|
36609
37053
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
37054
|
+
function isClassMapMacroTarget(value) {
|
|
37055
|
+
return CLASS_MAP_MACRO_TARGETS.some((target) => target === value);
|
|
37056
|
+
}
|
|
37057
|
+
/**
|
|
37058
|
+
* Raw Frigate+ label → detection macro. Every label of the documented
|
|
37059
|
+
* Frigate+ base set (docs.frigate.video/plus, verified 2026-08-21) is either
|
|
37060
|
+
* here or in {@link FRIGATE_PLUS_UNMAPPED_LABELS}, with the reason it is not.
|
|
37061
|
+
*
|
|
37062
|
+
* Why this exists: a Frigate+ import used to carry NO classMap, so it inherited
|
|
37063
|
+
* the step's `COCO_TO_MACRO` (`preserveOriginal: false`) and the executor
|
|
37064
|
+
* dropped every label COCO does not name — deer, raccoon, fox, squirrel, goat,
|
|
37065
|
+
* rabbit, skunk, kangaroo, possum, rodent, school_bus, garbage_truck and even
|
|
37066
|
+
* `package` vanished as `class-filter` discards. The executor keeps the raw
|
|
37067
|
+
* label as `originalClass` whenever the map resolves it, so the fine identity
|
|
37068
|
+
* survives under the macro.
|
|
37069
|
+
*/
|
|
37070
|
+
var FRIGATE_PLUS_TO_MACRO = {
|
|
37071
|
+
person: "person",
|
|
37072
|
+
baby: "person",
|
|
37073
|
+
car: "vehicle",
|
|
37074
|
+
motorcycle: "vehicle",
|
|
37075
|
+
bicycle: "vehicle",
|
|
37076
|
+
boat: "vehicle",
|
|
37077
|
+
school_bus: "vehicle",
|
|
37078
|
+
garbage_truck: "vehicle",
|
|
37079
|
+
dog: "animal",
|
|
37080
|
+
cat: "animal",
|
|
37081
|
+
deer: "animal",
|
|
37082
|
+
horse: "animal",
|
|
37083
|
+
bird: "animal",
|
|
37084
|
+
raccoon: "animal",
|
|
37085
|
+
fox: "animal",
|
|
37086
|
+
bear: "animal",
|
|
37087
|
+
cow: "animal",
|
|
37088
|
+
squirrel: "animal",
|
|
37089
|
+
goat: "animal",
|
|
37090
|
+
rabbit: "animal",
|
|
37091
|
+
skunk: "animal",
|
|
37092
|
+
kangaroo: "animal",
|
|
37093
|
+
possum: "animal",
|
|
37094
|
+
rodent: "animal",
|
|
37095
|
+
package: "package"
|
|
37096
|
+
};
|
|
37097
|
+
/**
|
|
37098
|
+
* The per-model classMap for a Frigate / Frigate+ detector, derived from ITS
|
|
37099
|
+
* labelmap: each label resolves through {@link FRIGATE_PLUS_TO_MACRO} first,
|
|
37100
|
+
* then `COCO_TO_MACRO` (Frigate's default model ships the COCO-91 labelmap, so
|
|
37101
|
+
* a preset import may carry either vocabulary). A label neither knows is left
|
|
37102
|
+
* out, and `preserveOriginal: false` drops it in the executor — the same
|
|
37103
|
+
* contract as the COCO map, now with the Frigate+ vocabulary in it.
|
|
37104
|
+
*/
|
|
37105
|
+
function buildFrigateClassMap(labels) {
|
|
37106
|
+
const mapping = {};
|
|
37107
|
+
for (const label of labels) {
|
|
37108
|
+
const target = FRIGATE_PLUS_TO_MACRO[label] ?? COCO_TO_MACRO.mapping[label];
|
|
37109
|
+
if (target !== void 0 && isClassMapMacroTarget(target)) mapping[label] = target;
|
|
37110
|
+
}
|
|
37111
|
+
return {
|
|
37112
|
+
mapping,
|
|
37113
|
+
preserveOriginal: false
|
|
37114
|
+
};
|
|
37115
|
+
}
|
|
37116
|
+
/**
|
|
37117
|
+
* Everything a Frigate / Frigate+ entry derives from its labelmap: the classMap
|
|
37118
|
+
* and the steps it fills (D715). Every Frigate builder spreads this, so the two
|
|
37119
|
+
* cannot be derived from different label lists. A COCO labelmap gets its map
|
|
37120
|
+
* and no fill.
|
|
37121
|
+
*/
|
|
37122
|
+
function frigateLabelFields(labels) {
|
|
37123
|
+
const classMap = buildFrigateClassMap(labels);
|
|
37124
|
+
const fills = deriveClassifierFills(labels, classMap);
|
|
37125
|
+
return fills.length > 0 ? {
|
|
37126
|
+
classMap,
|
|
37127
|
+
fillsClassifierEffects: fills
|
|
37128
|
+
} : { classMap };
|
|
37129
|
+
}
|
|
36610
37130
|
/**
|
|
36611
37131
|
* Accessory device helpers — shared across drivers.
|
|
36612
37132
|
*
|
|
@@ -49355,6 +49875,7 @@ function buildFrigateCatalogDescriptor(catalogId, overrides) {
|
|
|
49355
49875
|
id: name,
|
|
49356
49876
|
name
|
|
49357
49877
|
})),
|
|
49878
|
+
...frigateLabelFields(cat.labels),
|
|
49358
49879
|
preprocessMode: "letterbox",
|
|
49359
49880
|
provider: "frigate",
|
|
49360
49881
|
license: cat.license,
|
|
@@ -49504,6 +50025,24 @@ async function ensureFormatsThenDistribute(modelId, deps) {
|
|
|
49504
50025
|
}
|
|
49505
50026
|
//#endregion
|
|
49506
50027
|
//#region src/frigate/frigate-plus.ts
|
|
50028
|
+
/**
|
|
50029
|
+
* Frigate+ API client — the REAL api.frigate.video contract, verified against
|
|
50030
|
+
* frigate/plus.py (dev branch, 2026-08-21):
|
|
50031
|
+
*
|
|
50032
|
+
* - key format: `[uuid]:[40 hex]` (Frigate validates
|
|
50033
|
+
* `[a-z0-9]{8}-…-[a-z0-9]{12}:[a-z0-9]{40}`)
|
|
50034
|
+
* - GET /v1/auth/token with HTTP basic auth (key split on `:`) →
|
|
50035
|
+
* `{ accessToken, expires }`
|
|
50036
|
+
* - GET /v1/model/list with `Authorization: Bearer <accessToken>` → model list
|
|
50037
|
+
* - GET /v1/model/{id} → model info (`type`, `width`, `height`, `labelMap`,
|
|
50038
|
+
* `supportedDetectors`, …)
|
|
50039
|
+
* - GET /v1/model/{id}/signed_url → `{ url }` (presigned, plain GET)
|
|
50040
|
+
*
|
|
50041
|
+
* SECURITY: everything here runs SERVER-SIDE on the hub. The key comes from
|
|
50042
|
+
* the addon's settings store, is sent only to api.frigate.video, and is never
|
|
50043
|
+
* logged, never echoed in errors, never shipped to the browser. The fetch
|
|
50044
|
+
* function is injected so the contract is unit-testable offline.
|
|
50045
|
+
*/
|
|
49507
50046
|
var PLUS_API_HOST = "https://api.frigate.video";
|
|
49508
50047
|
var PLUS_KEY_RE = /^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}:[a-z0-9]{40}$/;
|
|
49509
50048
|
function isValidPlusApiKey(key) {
|
|
@@ -49678,6 +50217,7 @@ function plusInfoToDescriptor(info, opts) {
|
|
|
49678
50217
|
id: name,
|
|
49679
50218
|
name
|
|
49680
50219
|
})),
|
|
50220
|
+
...frigateLabelFields(labels),
|
|
49681
50221
|
preprocessMode: "letterbox",
|
|
49682
50222
|
provider: "frigate",
|
|
49683
50223
|
group: frigateVariantGroup(info.type, info.width),
|