StillWorking's picture
Upload PRIVACY.md with huggingface_hub
7194297 verified
|
Raw History Blame Contribute Delete
7.17 kB

Privacy & Biometric Data Notice — Sentinel-AI

Sentinel-AI processes face images and biometric embeddings. In many jurisdictions that is special-category or sensitive personal data even when the person is not named. This document is an engineering checklist, not legal advice. Obtain a jurisdiction-specific review before any real-world use.


1. What the system processes

Data Where it goes Retention
Uploaded frame (/analyze-frame) Processed in memory; decoded, detected, embedded, discarded Not persisted by the API
Face embedding (512-D vector) Generated in memory; compared with the FAISS index Not persisted per request
FAISS index backend/index_artifacts/ on the local disk Until deleted by the operator
CelebA metadata + images Data/ on the local disk Until deleted by the operator
Matched attributes Sent to Gemini/Groq/Cohere to draft an alert Provider retention depends on your account/plan
Generated person image (/generate-person) Returned as base64; optionally saved to backend/uploads/ Until deleted by the operator
Logs Client IP, timestamps, provider error text Operator-defined

The uploaded face image itself is not sent to the LLM providers. Only the matched attribute list and similarity score are sent when drafting an alert. /generate-person sends the user's text prompt to Google.

The FAISS index contains CelebA-derived embeddings and attribute labels. It does not contain the raw dataset images; images are served from CELEBA_IMAGES_DIR when explicitly requested.


2. Legal frameworks to review

At minimum, evaluate:

  • GDPR / UK GDPR — face images and embeddings can be biometric data under Article 9; identify a lawful basis and a condition for processing, run a DPIA, and document retention.
  • Illinois BIPA — written notice, written consent, a public retention and destruction policy, and no sale/profit from biometric identifiers.
  • Texas CUBI / Washington My Health My Data / other US state laws — notice, consent, and retention rules vary.
  • CCPA/CPRA — notice at collection, access/deletion rights, and limits on sensitive data use.
  • Workplace / school / public-space rules — surveillance notice, works council consultation, and prohibitions in some locations.
  • CelebA dataset terms — the dataset is licensed for non-commercial research. Do not use it for commercial identification, and do not imply that the depicted celebrities are suspects.

If you cannot establish a lawful basis and consent/notice, do not deploy the system on real people.


3. Required operator controls

Consent and notice

  • Post a clear notice before capture: what is collected, why, who can access it, how long it is kept, and how to request deletion.
  • For employees, contractors, or students, obtain written consent where required and make alternatives available.
  • Do not use the system on children or vulnerable people without a specific legal basis.

Purpose limitation

Use the system only for the stated security purpose (for example, verifying a person at a controlled entry point). Do not repurpose embeddings for emotion inference, marketing, or unrelated background checks.

Retention and deletion

  • Set a retention period for generated alerts, uploads, and logs.
  • Delete backend/uploads/ files and generated reports on schedule.
  • Provide a deletion procedure for a person's biometric data and confirm it in writing.
  • Deleting a --save_to_disk generated image is not enough if it was copied to backups; include backups in the retention policy.

Access control

  • Enable SENTINEL_API_KEY, rate limits, TLS, and a reverse proxy before any shared use.
  • Restrict who can read Data/, backend/index_artifacts/, backend/uploads/, and logs.
  • Do not expose /images/{id} publicly: it serves identifiable celebrity photos.
  • Do not put provider keys in the frontend.

Accuracy and human review

  • Face matching is probabilistic. The default threshold is calibrated for CelebA-style portraits, not for CCTV, low light, masks, or children.
  • Re-tune MATCH_SIMILARITY_THRESHOLD on your own camera footage and measure false accepts and false rejects by demographic group where lawful and ethical.
  • Never take an automated enforcement action (denial of entry, alert to police, employment decision) solely on the model's output. Require human verification.
  • Display confidence and expose the underlying attributes so an operator can challenge a bad match.

Security

  • Encrypt disks and backups containing images, embeddings, or logs.
  • Rotate provider keys and the API token; see SECURITY.md.
  • Log access to biometric data and review it.
  • Do not send face images or embeddings to third-party analytics.

4. Generated faces and deepfakes

/generate-person creates synthetic portraits. Depending on the prompt, the output may resemble a real person. Do not use it to impersonate, harass, or mislead. Label synthetic media, obtain consent for likeness, and comply with applicable disclosure laws. The endpoint is optional and can be disabled by removing the router or blocking the route at the proxy.


5. Research/demo use

For a hackathon demo:

  • Use the bundled CelebA data and clearly state that it is a research dataset.
  • Do not display a real attendee's face as a "suspect" without consent.
  • Prefer a synthetic or volunteer image for live uploads.
  • Do not retain demo uploads or alerts after the session.
  • Treat any live camera feed as biometric data even if it is not stored.

6. Data subject requests

Prepare a simple process to:

  1. Verify the requester's identity without collecting more biometric data.
  2. Search backend/uploads/, logs, and any exported reports for their data.
  3. Delete or correct the data and confirm completion.
  4. Record the request and outcome for accountability.

Because the API does not persist per-request uploads or embeddings, most requests will concern index membership, generated files, or logs. Document that fact.


7. Incident response

If biometric data is exposed:

  1. Contain the exposure (revoke tokens, take the endpoint offline).
  2. Preserve evidence without copying sensitive data further.
  3. Assess whether notification is required (GDPR 72 hours where applicable; BIPA and state breach laws may also apply).
  4. Notify affected people and the relevant authority if required.
  5. Fix the root cause, rotate credentials, and update this document.

8. Open questions for your legal review

  • What is the lawful basis and retention period for each data type?
  • Is the deployment in a public, workplace, school, or retail context?
  • Are there local bans or restrictions on face recognition?
  • Do you need a DPIA, works council consultation, or vendor data-processing agreement with Google/Groq/Cohere?
  • Will any data leave your jurisdiction? Provider regions matter.
  • How will you handle a false match that caused harm?

Answer these before processing real people's faces.