Skip to main content

A package consisting of evaluation measures for gesture biometric quantification.

Project description

biomQuant

A package consisting of evaluation measures for gesture biometric quantification.

This package provide four measures:

  1. Rank deviation ($\hat{r}$)
  2. Relevance ($\mathcal{R}$)
  3. Trend match distance ($\Psi$)
  4. ICGD Score ($C_d$)

We combine these in advanced acceptance score

${A_r}^=\frac{\sum_{j=1}^{G}\Bigl( \frac{2^{\lambda\mathcal{R}_j}}{\exp(\kappa(r_{j}^{\Delta} - r_{j}^{\hat{e}} ))}\Bigr)}{\sqrt{\log_2(2+\nu\Psi)}}*{\exp(-\beta C_d)}$

Here, $G$ is the number of gestures. While $r_{j}^{\Delta}$ and $r_{j}^{\hat{e}}$ denote ranks of the $j^{th}$ gesture wrt the estimated biometric estimates and the ground truth respectively. $\lambda,\kappa,\nu,\text{and}\beta$ are the scaling factors.

We further normalize this into $nA_r^*(\Delta)$. Mathematically,

$nA_r^(\Delta)=\frac{A_r^{}(\Delta)}{A_r^{*}(\hat{e})}$

Where, $A_r^(\Delta)$ and $A_r^(\hat{e})$ represents $A_r^*$ values for the output DGBQA scores and ground truth, i.e.,

$A_r^*(\hat{e})=\sum_{j=1}^{G}2^{\lambda \Bigl[ \gamma\Bigl({\frac{G-{r_{j}^{\hat{e}}}+1}{G}\Bigr){\hat{e}\left[r_{j}^{\hat{e}}\right]}}+\Bigl(\frac{r_{j}^{\hat{e}}}{G}\Bigr)\Bigl(1-\hat{e}\left[r_{j}^{\hat{e}}\right]\Bigr) \Bigr]}$

Requirements

  1. numpy
  2. sckit-learn
  3. scipy
  4. tensorflow $\geq$ 2.8.0

How to use

  1. Advanced Acceptance Score
from biomQaunt.advancedAcceptance import comp_advancedAcceptance
nAr_star = comp_advancedAcceptance(biometricParams,
                                   groundTruth,
                                   embeddings,
                                   labels,
                                   G=numGestures)
  1. Rank deviation
from biomQaunt.rankDev import rankDev
r_prime = rankDev(1-groundTruth,
                  biometricParams,
                  G=numGestures)
  1. Relevance
import numpy as np
from biomQaunt.acceptanceScore import compAr

def preProcess(inputVec):
    inputVec = (inputVec - np.mean(inputVec))/np.std(inputVec)
    return inputVec/np.linalg.norm(inputVec)

relevance = compAr(preProcess(biometricParams),
                   preProcess(groundTruth),
                   normalizer=False,
                   relevance=True)
  1. ICGD score
import tensorflow as tf
from biomQaunt.icgd import compICGD

def normalisation_layer(x):   
    return(tf.math.l2_normalize(x, axis=1, epsilon=1e-12))

embeddings = tf.keras.layers.Lambda(normalisation_layer)(embeddings)

icgdScore = icgdScore(embeddings.numpy(),
                     labels)
  1. Trend match distance
from biomQaunt.trendMatch import compTrendMatchDist
psi = rankDev(biometricParams,
              groundTruth,
              G=numGestures)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biomquant-0.0.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biomquant-0.0.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file biomquant-0.0.1.tar.gz.

File metadata

  • Download URL: biomquant-0.0.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.18

File hashes

Hashes for biomquant-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8bfe05c6c3e5f9f0dad81514f4d76e6d599eab174e3a73ab09cdcc3c78c49fa6
MD5 b383a391a6e81d76f37aab77657ea8df
BLAKE2b-256 c532bc70cd09ba38db8fcb2ea410beaefae58325a9ba72360ef5838ec9d2ea1f

See more details on using hashes here.

File details

Details for the file biomquant-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: biomquant-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.18

File hashes

Hashes for biomquant-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a6e73f74626aa0161f65773df07c8cee6f5f8208fb78337501d6fc9c8a5349c
MD5 72384b97122297995fb314956b5a63ee
BLAKE2b-256 ef3f6b1aa231974771bb4fefbf686ded55eaf40d8a639865117fac53e9ce332f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page