IdentityFilter
- class lib.infer.identity.IdentityFilter(threshold: float, name: str)
Bases:
objectHandles filtering of faces based on provided image files
- Parameters:
threshold (float) – The threshold value for filtering out items
name (str) – The name of the identity plugin running
Methods Summary
__call__(batch)Apply the identity filter to the given batch
add_identities(identities, is_filter)Add the given identities to the filter
If filter is enabled info log the number of faces filtered
Methods Documentation
- __call__(batch: ExtractBatch) None
Apply the identity filter to the given batch
- Parameters:
batch (ExtractBatch) – The batch object to perform filtering on with the identities populated
- Return type:
None
- add_identities(identities: npt.NDArray[np.float32], is_filter: bool) None
Add the given identities to the filter
- Parameters:
identities (npt.NDArray[np.float32]) – The identity embeddings to add to the filter
is_filter (bool) –
Truefor filter,Falsefor nFilter
- Return type:
None
- output_counts() None
If filter is enabled info log the number of faces filtered
- Return type:
None
- __call__(batch: ExtractBatch) None
Apply the identity filter to the given batch
- Parameters:
batch (ExtractBatch) – The batch object to perform filtering on with the identities populated
- Return type:
None
- add_identities(identities: npt.NDArray[np.float32], is_filter: bool) None
Add the given identities to the filter
- Parameters:
identities (npt.NDArray[np.float32]) – The identity embeddings to add to the filter
is_filter (bool) –
Truefor filter,Falsefor nFilter
- Return type:
None
- enabled
Trueif the identity filter is enabled
- output_counts() None
If filter is enabled info log the number of faces filtered
- Return type:
None
- threshold
The threshold for accepting a filter result