Bona Fide Compatibility Scoring for Facial Images
Overview
A reproducible first-line scoring service for organisations that review large volumes of facial images. It returns a continuous measure of how far an image lies from a fixed model's learned bona fide side, helping teams prioritise images for further inspection and characterise their own image channel. It is not an authenticity verdict, manipulation probability, identity check, liveness system, or universal deepfake detector.
Outcome
A machine-readable score and scoring status for each image, together with model and preprocessing identifiers, face and crop metadata, plus tools for reference profiling and cross-dataset evaluation. The output can support review queues, quality-assurance experiments, and multi-signal media-integrity workflows.
Service Card
| Category | AI products |
| Domain | Image Integrity, Synthetic-Media Analysis, AI Assurance |
| Vertical | Digital Society, Media and Creative Industries |
| Target users | Digital Publishers and Newsrooms, Creative-Asset Marketplaces, Private Trust-and-Safety Teams, Media-Verification Firms, Capture-Technology Vendors, AI Assurance Laboratories |
| Service type | Scoring API and Evaluation Toolkit |
| Outputs | Continuous score in the range 0 to 1 or an explicit unscorable result; model/preprocessing provenance; face count and crop metadata; optional evaluation reports, ROC/EER statistics, distributions, and reference profiles. |
| Requirements | JPEG, PNG, or WebP images containing a detectable face; an NVIDIA GPU is recommended for practical throughput. Before operational use, adopters must evaluate the fixed model on representative, rights-cleared data from their own image channel and define human-review procedures. |
| Limitations | Scores are uncalibrated and domain-dependent. Only the largest detected face is scored. The service neither determines authenticity nor recommends a universal threshold. It must not be used for biometric identification, automatic sanctions, or other high-stakes decisions. |
| Availability | Research MVP available for bounded private-sector evaluation |
| Licensing | Service software is Apache-2.0; model checkpoint, face-landmark component, and evaluation datasets retain their own licences and access conditions. |
A first-line signal for private-sector media integrity
Organisations handling large volumes of portrait images cannot send every submission directly to expert forensic review. This service provides a reproducible continuous score that helps prioritise which images deserve additional inspection.
The score measures compatibility with a fixed model's learned bona fide distribution. It is not a probability of manipulation, an authenticity decision, or a universal detector. Its most defensible use is as one signal in a wider workflow combining channel-specific reference profiling, metadata, content credentials, additional detectors, and human judgement.
Potential users include digital publishers, newsrooms, stock-photo and creative marketplaces, private media-verification and brand-safety firms, user-content platforms, camera and face-capture technology vendors, and AI assurance laboratories. Government, military, police, border-control, public-surveillance, biometric-identification, and other high-stakes automated decision uses are explicitly excluded.
Why this matters to SMEs
Smaller organisations increasingly receive images from customers, contributors, suppliers, creators, and automated production tools. The cost of asking a specialist to inspect every image is prohibitive, while treating an opaque detector output as a verdict creates a different and potentially more serious risk. SMEs need a modest first step: a signal they can deploy locally, reproduce, measure on their own material, and combine with existing review practices.
The service addresses that gap. It packages a published research model into a stable interface and exposes the evidence needed to judge whether the model is informative for a particular channel. An SME does not need to assemble face detection, landmark extraction, preprocessing, model loading, API handling, and evaluation code before it can run a meaningful experiment.
Examples include:
- a newsroom prioritising submitted portraits for editorial verification;
- a stock-photo or creative marketplace selecting unusual uploads for manual review;
- a private platform adding a non-decisive signal to an existing moderation queue;
- a media-verification or brand-safety company evaluating an additional signal for an ensemble;
- a camera, capture-SDK, or imaging vendor characterising changes introduced by a device or processing pipeline; and
- an AI assurance laboratory testing how a fixed detector transfers between datasets and real operating conditions.
In all of these cases the service supports triage and measurement, not automatic accusation, rejection, or sanction.
What the score means
The initial backend is SelfMAD++, trained on the SMDD dataset. For a suitable input image the service returns a score between 0 and 1:
- a lower value is more compatible with the model's learned bona fide side;
- a higher value is less compatible with that learned side; and
unscorablewith a null score means that the required face could not be processed.
This wording is important. A score of 0.9 does not mean “90% manipulated”. Differences can arise from manipulation, but also from camera processing, compression, resizing, lighting, demographics, pose, retouching, synthetic generation, or another shift away from the training distribution. The model does not identify the cause.
The service detects faces, chooses the largest one, extracts 81 landmarks, expands the face box by 12.5%, and resizes the crop to 512 × 512 pixels. These steps are pinned and identified in every successful response, so repeat experiments use the same interpretation of an input image.
Recommended decision flow
The result belongs inside a review process that retains human authority and uses other available evidence.
flowchart LR
A[Portrait image] --> B[Compatibility scoring]
B --> C{Scorable?}
C -->|No| D[Route for manual handling]
C -->|Yes| E[Compare with channel profile]
E --> F[Combine with metadata and other signals]
F --> G{Additional review needed?}
G -->|Yes| H[Qualified human review]
G -->|No| I[Continue normal workflow]
No threshold is built into the product. A threshold copied from a paper or another organisation would silently import assumptions about different images and different costs of error. Each adopter must first collect representative, rights-cleared reference material, inspect its score distribution, and evaluate false positives and false negatives for the intended task.
Strongest starting point: channel profiling
The most defensible initial deployment is not an internet-wide “fake detector”, but bona fide channel characterisation. A company can score known, untouched examples from a defined channel—for example, one capture application, supplier workflow, studio pipeline, or controlled upload route—and establish a reference distribution. New images can then be compared with that local reference. Large deviations trigger investigation; they do not prove manipulation.
flowchart TB
A[Rights-cleared known reference images] --> B[Score with pinned service version]
B --> C[Build channel reference profile]
D[New image from the same channel] --> E[Score with the same version]
C --> F[Compare distributions and deviations]
E --> F
F --> G[Quality control or human review]
This approach gives an SME a practical experiment with bounded claims. It can reveal whether the signal separates known conditions in its own data before the company invests in integration or expert services. Repeating the profile after a camera, codec, editing workflow, or model update can also help locate unintended distribution changes.
Interfaces and result contract
The MVP provides three ways to use the same scoring implementation:
- a command-line interface for local files and scripted evaluation;
- a Python API for integration into analysis code; and
- a stateless FastAPI HTTP endpoint for service-oriented deployments.
A typical HTTP deployment uses one GPU worker:
CUDA_VISIBLE_DEVICES=0 uvicorn slaif_fms.api:app \
--host 0.0.0.0 --port 8000 --workers 1
An authorised client submits one image as multipart form data:
curl -sS -H "X-API-Key: <generated-key>" \
-F image=@portrait.jpg \
http://localhost:8000/v1/score
The machine-readable response includes the nullable score and scoring status, model and preprocessing identities, source dimensions, detected-face count, and selected crop box. Recording these fields with the review result makes later audit and reproduction possible. Supported inputs are JPEG, PNG, and WebP; malformed files, unsupported media, and images without a usable face receive explicit error or unscorable outcomes rather than invented scores.
Published MVP evidence
The repository includes a frozen cross-dataset evaluation suite with ROC curves, score histograms, empirical cumulative distributions, equal-error-rate calculations, and rights-aware galleries. The current baseline reports the following results:
| Evaluation set | ROC AUC | EER |
|---|---|---|
| STR-FFHQ-FM | 0.900 | 0.180 |
| READFake | 0.688 | 0.373 |
| CelebHQ-FM | 0.944 | 0.134 |
| FFHQR | 0.598 | 0.429 |
| PPR10K | 0.467 | 0.522 |
| MFFI | 0.782 | 0.287 |
| RetouchingFFHQ | 0.686 | 0.367 |
The variation is a feature of the evidence, not something the documentation hides. The model separates the evaluated classes well on CelebHQ-FM and STR-FFHQ-FM, less strongly on several other datasets, and does not transfer usefully to every retouching or shifted-image setting. It therefore cannot support a universal operating threshold or a broad claim that every kind of facial manipulation will be detected.
For reviewers and prospective adopters, this is precisely why the MVP is useful: it turns a research artefact into a testable service while retaining the negative evidence needed for responsible adoption. A company can reproduce the baseline, add its own evaluation set, and make a documented go/no-go decision.
Reproducibility and provenance
The service pins the upstream model source, checkpoint checksum, and preprocessing identity. It does not silently bundle the checkpoint or evaluation datasets. The service code is distributed under Apache-2.0, while the checkpoint, dlib component, and each dataset remain subject to their respective licences and access conditions. Users must verify that their intended commercial or research use is permitted.
The implementation also provides GPU Docker deployment, optional API-key protection, continuous-integration tests, and static security analysis. These controls make the prototype easier to examine and deploy, but they do not replace production network security, monitoring, rate limiting, retention policy, or organisational risk assessment.
Privacy, security, and human oversight
Facial images can be personal and potentially biometric data. A deployment must establish a lawful purpose, minimise collection, restrict access, define retention and deletion, protect data in transit and at rest, and maintain an auditable review procedure. The API is stateless by design, but operators remain responsible for infrastructure logs, temporary files, surrounding applications, and any stored results.
The service is not designed or offered for:
- identifying or verifying a person;
- liveness, access-control, or identity-document authentication;
- automated employment, lending, insurance, fraud, account-suspension, or access-denial decisions;
- government, military, police, border-control, or public-surveillance use; or
- any workflow in which its score alone causes a consequential action.
Current status and next steps
The current research MVP is suitable for controlled private-sector evaluation. A useful adoption project begins with a narrowly defined image channel and success criterion, followed by a rights and privacy review, reference-profile construction, local performance measurement, and a documented human-review design. Only after the signal proves informative should it be connected to an operational queue.
The source implementation, service contract, model datasheet, provenance record, installation guide, and evaluation protocol are available in the SLAIF facial compatibility scoring repository.