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].
Metadata
Release files for hifd 0.1.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 |
|---|---|---|---|---|
| hifd-0.1.0.tar.gz | 25.5 kB | With provenance | Details for hifd-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hifd-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hifd-0.1.0-py3-none-any.whl |
Total release size: 43.6 kB
Release files / hifd-0.1.0.tar.gz
| Download URL | hifd-0.1.0.tar.gz |
|---|---|
| Size | 25.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6b823a359ece0fa046727b06284caa46311d44944a0497d8f3749bc7441d1ec
|
|
BLAKE2b-256 checksum How to use checksums |
dbf26488dbbda678a73d909c219a1e452daaa620046c06d8e97d0a1bbf06dba8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logRelease files / hifd-0.1.0-py3-none-any.whl
| Download URL | hifd-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
467d748b4df8b0bd3556493126c5ac842395267e1a69aa41455ba4636479054f
|
|
BLAKE2b-256 checksum How to use checksums |
f46cdd2f84f4dfbd068f3e208db23096dceeabbf5de001a65475eb22c6a96754
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logSecurity for hifd 0.1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hifd-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logA 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.