mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Formatting
This commit is contained in:
parent
2d4f5ecd6f
commit
eb83c132d5
@ -229,11 +229,13 @@ class FaceClassificationModel:
|
||||
self.__build_classifier()
|
||||
|
||||
cosine_index = self.labeler.transform([sub_label])[0]
|
||||
probabilities: list[float] = self.classifier.predict_proba([embedding])[0]
|
||||
probabilities: np.ndarray = self.classifier.predict_proba([embedding])[0]
|
||||
svc_probability = max(probabilities)
|
||||
logger.debug(f"SVC face classification probability: {svc_probability} and index match: {cosine_index} / {probabilities.index(svc_probability)}")
|
||||
logger.debug(
|
||||
f"SVC face classification probability: {svc_probability} and index match: {cosine_index} / {np.where(probabilities == svc_probability)[0]}"
|
||||
)
|
||||
|
||||
if cosine_index == probabilities.index(svc_probability):
|
||||
if cosine_index == np.where(probabilities == svc_probability)[0]:
|
||||
return (
|
||||
sub_label,
|
||||
min(avg_score, svc_probability),
|
||||
|
Loading…
Reference in New Issue
Block a user