evalify
Evaluate Biometric Authentication Models Literally in Seconds.
Installation
Stable release:
pip install evalify
Bleeding edge:
pip install git+https://github.com/ma7555/evalify.git
Used for
Evaluating all biometric authentication models, where the model output is a high-level embeddings known as feature vectors for visual or behaviour biometrics or d-vectors for auditory biometrics.
Usage
import numpy as np
from evalify import Experiment
rng = np.random.default_rng()
nphotos = 500
emb_size = 32
nclasses = 10
X = rng.random((self.nphotos, self.emb_size))
y = rng.integers(self.nclasses, size=self.nphotos)
experiment = Experiment()
experiment.run(X, y)
experiment.get_roc_auc()
print(experiment.roc_auc)
print(experiment.find_threshold_at_fpr(0.01))
How it works
- When you run an experiment, evalify tries all the possible combinations between individuals for authentication based on the
Xandyparameters and returns the results including FPR, TPR, FNR, TNR and ROC AUC.Xis an array of embeddings andyis an array of corresponding targets. - Evalify can find the optimal threshold based on your agreed FPR and desired similarity or distance metric.
Documentation:
Features
- Blazing fast implementation for metrics calculation through optimized einstein sum and vectorized calculations.
- Many operations are dispatched to canonical BLAS, cuBLAS, or other specialized routines.
- Smart sampling options using direct indexing from pre-calculated arrays with total control over sampling strategy and sampling numbers.
- Supports most evaluation metrics:
cosine_similaritypearson_similaritycosine_distanceeuclidean_distanceeuclidean_distance_l2minkowski_distancemanhattan_distancechebyshev_distance
- Computation time for 4 metrics 4.2 million samples experiment is 24 seconds vs 51 minutes if looping using
scipy.spatial.distanceimplemntations.
TODO
- Safer memory allocation. I did not have issues but if you ran out of memory please manually set the
batch_sizeargument.
Contribution
- Contributions are welcomed, and they are greatly appreciated! Every little bit helps, and credit will always be given.
- Please check CONTRIBUTING.md for guidelines.
Citation
- If you use this software, please cite it using the metadata from CITATION.cff
Metadata
Release files for evalify 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| evalify-1.0.0.tar.gz | 13.3 kB | Without provenance | Details for evalify-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evalify-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for evalify-1.0.0-py3-none-any.whl |
Total release size: 26.1 kB
Release files / evalify-1.0.0.tar.gz
| Download URL | evalify-1.0.0.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
512162b5e8f58223f9c3e0144f514514db96cf7164724b2eac4e69f743a2c497
|
|
BLAKE2b-256 checksum How to use checksums |
d81ddc1df17f835a116950bc29d94885a7cac859242bd70ab0e27666a07cb4fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / evalify-1.0.0-py3-none-any.whl
| Download URL | evalify-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e5e953edf56f44e0ddc09cad2260df8abd273bcd798a32328739a0cd8fa067f
|
|
BLAKE2b-256 checksum How to use checksums |
28bbef0234424a55dab0505018e0ebe904263033234118d72f6e01dc7126ea10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for evalify 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.