HiFD: a holistic metric for face de-identification evaluation.
Project description
hifd
HiFD is a holistic metric for evaluating face de-identification methods. It combines privacy (face-recognition resistance), perceptual quality, and three levels of utility preservation (macro cues, fine-grained cues, physiological signals) into a single composite score.
This package provides the scoring core: given JSON files of pre-computed
estimator predictions on (a) original images and (b) de-identified outputs,
hifd produces per-sample agreement scores, per-method utility levels,
ensemble privacy, quality, and composite HiFD scores under three application
profiles (Privacy-First, Balanced, Clinical).
The package does not run the estimators themselves — you bring your own predictions in the documented JSON schema.
Install
pip install hifd
Runtime requirements: Python ≥ 3.10, numpy, pandas, pyyaml.
Quickstart (CLI)
hifd run-all \
--methods methods.yaml \
--estimators estimators.yaml \
--data-dir predictions/ \
--out scores/
Produces:
scores/
├── per_sample/per_sample_agreements.csv
├── per_method/per_method_aggregated.csv
├── per_method/method_level.csv
├── tables/composite.csv
└── tables/composite.tex
Quickstart (Python API)
import hifd
import numpy as np
# Per-task primitives (scalar)
hifd.score_age(35.0, 36.0) # 0.99
hifd.score_gaze([0, 0, 1], [0, 0.1, 1]) # ≈ 0.937
# Batch variants for scalar-input primitives
hifd.batch_score_age(np.array([35.0]), np.array([36.0])) # ndarray([0.99])
# Also: batch_score_categorical, batch_score_hr, batch_privacy_score,
# batch_quality_score, batch_U1, batch_U2, batch_U3
# (Geometric primitives — score_landmark, score_gaze, score_bvp — have no
# batch form because their inputs are per-sample variable-shape arrays.)
# Composite under a profile
hifd.composite(P=0.7, Q=0.8, U1=0.6, U2=0.5, U3=0.4,
weights=hifd.DEFAULT_PROFILES["balanced"])
# Full pipeline
r = hifd.run_pipeline(
methods_config="methods.yaml",
estimators_config="estimators.yaml",
data_dir="predictions/",
out_dir="scores/",
)
print(r.composite_df)
Input format
See docs/schema.md for the JSON envelope spec and one example per task type.
Defaults
Constants and profiles ship as immutable mappings:
hifd.DEFAULT_CONSTANTS["tau_HR"] # 20.0
hifd.DEFAULT_PROFILES["balanced"] # {"P": 0.2, "Q": 0.2, "U1": 0.2, ...}
To override, build a plain dict and pass it (run_pipeline(constants=...)) or
provide --constants my.yaml on the CLI.
Citation
If you use HiFD in published work, please cite the paper [TBD].
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hifd-0.1.0.tar.gz.
File metadata
- Download URL: hifd-0.1.0.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6b823a359ece0fa046727b06284caa46311d44944a0497d8f3749bc7441d1ec
|
|
| MD5 |
3846204477f865307a4dfd1ff0832e79
|
|
| BLAKE2b-256 |
dbf26488dbbda678a73d909c219a1e452daaa620046c06d8e97d0a1bbf06dba8
|
Provenance
The following attestation bundles were made for hifd-0.1.0.tar.gz:
Publisher:
release.yml on infraface/hifd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hifd-0.1.0.tar.gz -
Subject digest:
a6b823a359ece0fa046727b06284caa46311d44944a0497d8f3749bc7441d1ec - Sigstore transparency entry: 1615252938
- Sigstore integration time:
-
Permalink:
infraface/hifd@20a28068c1e5218d7c6bb892b7607d1988482b2c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/infraface
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@20a28068c1e5218d7c6bb892b7607d1988482b2c -
Trigger Event:
push
-
Statement type:
File details
Details for the file hifd-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hifd-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
467d748b4df8b0bd3556493126c5ac842395267e1a69aa41455ba4636479054f
|
|
| MD5 |
827fd8d984cfc15527223069e4d7754a
|
|
| BLAKE2b-256 |
f46cdd2f84f4dfbd068f3e208db23096dceeabbf5de001a65475eb22c6a96754
|
Provenance
The following attestation bundles were made for hifd-0.1.0-py3-none-any.whl:
Publisher:
release.yml on infraface/hifd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hifd-0.1.0-py3-none-any.whl -
Subject digest:
467d748b4df8b0bd3556493126c5ac842395267e1a69aa41455ba4636479054f - Sigstore transparency entry: 1615252947
- Sigstore integration time:
-
Permalink:
infraface/hifd@20a28068c1e5218d7c6bb892b7607d1988482b2c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/infraface
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@20a28068c1e5218d7c6bb892b7607d1988482b2c -
Trigger Event:
push
-
Statement type: