mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
Fix mypy
This commit is contained in:
parent
ebbf4f2cd6
commit
14ab9abcc1
@ -157,7 +157,7 @@ def build_class_mean(
|
|||||||
arr = np.stack(embs, axis=0)
|
arr = np.stack(embs, axis=0)
|
||||||
|
|
||||||
if len(arr) < 5:
|
if len(arr) < 5:
|
||||||
return stats.trim_mean(arr, trim, axis=0)
|
return np.asarray(stats.trim_mean(arr, trim, axis=0))
|
||||||
|
|
||||||
keep = np.ones(len(arr), dtype=bool)
|
keep = np.ones(len(arr), dtype=bool)
|
||||||
floor = max(5, int(np.ceil(min_keep_frac * len(arr))))
|
floor = max(5, int(np.ceil(min_keep_frac * len(arr))))
|
||||||
@ -185,7 +185,7 @@ def build_class_mean(
|
|||||||
f"Vector-wise outlier filter dropped {dropped}/{len(arr)} embeddings"
|
f"Vector-wise outlier filter dropped {dropped}/{len(arr)} embeddings"
|
||||||
)
|
)
|
||||||
|
|
||||||
return stats.trim_mean(arr[keep], trim, axis=0)
|
return np.asarray(stats.trim_mean(arr[keep], trim, axis=0))
|
||||||
|
|
||||||
|
|
||||||
def similarity_to_confidence(
|
def similarity_to_confidence(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user