mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-29 16:57:06 +03:00
Add audio labelmap grouping (#24004)
Allow audio classes to be grouped under a shared configured label. Keep audio overrides separate from object labels and retain only the highest-scoring grouped detection. Refs #23967
This commit is contained in:
committed by
Nicolas Mowen
parent
6ba9dd92e4
commit
fd76eb6c6f
@@ -1154,6 +1154,28 @@ class TestConfig(unittest.TestCase):
|
||||
frigate_config = FrigateConfig(**config)
|
||||
assert frigate_config.model.merged_labelmap[7] == "truck"
|
||||
|
||||
def test_audio_labelmap_inheritance_is_separate_from_model_labelmap(self):
|
||||
config = deep_merge(
|
||||
{
|
||||
"audio": {"labelmap": {69: "dogs", 70: "dogs"}},
|
||||
"cameras": {
|
||||
"back": {
|
||||
"audio": {"labelmap": {75: "dogs"}},
|
||||
}
|
||||
},
|
||||
},
|
||||
self.minimal,
|
||||
)
|
||||
|
||||
frigate_config = FrigateConfig(**config)
|
||||
|
||||
assert frigate_config.cameras["back"].audio.labelmap == {
|
||||
69: "dogs",
|
||||
70: "dogs",
|
||||
75: "dogs",
|
||||
}
|
||||
assert frigate_config.model.merged_labelmap[69] != "dogs"
|
||||
|
||||
def test_default_labelmap_empty(self):
|
||||
config = {
|
||||
"mqtt": {"host": "mqtt"},
|
||||
|
||||
Reference in New Issue
Block a user