mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 13:34:13 +03:00
Ensure that a negative score can not be sent (#20483)
This commit is contained in:
parent
a96a617fc9
commit
c091b10df9
@ -262,7 +262,7 @@ class FaceNetRecognizer(FaceRecognizer):
|
|||||||
score = confidence
|
score = confidence
|
||||||
label = name
|
label = name
|
||||||
|
|
||||||
return label, round(score - blur_reduction, 2)
|
return label, max(0, round(score - blur_reduction, 2))
|
||||||
|
|
||||||
|
|
||||||
class ArcFaceRecognizer(FaceRecognizer):
|
class ArcFaceRecognizer(FaceRecognizer):
|
||||||
@ -370,4 +370,4 @@ class ArcFaceRecognizer(FaceRecognizer):
|
|||||||
score = confidence
|
score = confidence
|
||||||
label = name
|
label = name
|
||||||
|
|
||||||
return label, round(score - blur_reduction, 2)
|
return label, max(0, round(score - blur_reduction, 2))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user