mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Fix handling mixed masks (#11157)
This commit is contained in:
parent
5bc9f9a388
commit
0c8e155afa
@ -155,6 +155,8 @@ def get_relative_coordinates(
|
|||||||
relative_masks = []
|
relative_masks = []
|
||||||
for m in mask:
|
for m in mask:
|
||||||
points = m.split(",")
|
points = m.split(",")
|
||||||
|
|
||||||
|
if any(x > "1.0" for x in points):
|
||||||
relative_masks.append(
|
relative_masks.append(
|
||||||
",".join(
|
",".join(
|
||||||
[
|
[
|
||||||
@ -163,6 +165,8 @@ def get_relative_coordinates(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
relative_masks.append(m)
|
||||||
|
|
||||||
mask = relative_masks
|
mask = relative_masks
|
||||||
elif isinstance(mask, str) and any(x > "1.0" for x in mask.split(",")):
|
elif isinstance(mask, str) and any(x > "1.0" for x in mask.split(",")):
|
||||||
|
Loading…
Reference in New Issue
Block a user