---
title: "PII Lenses"
description: "PII lenses are AI models that find PII and PHI in text, each trained for a language or domain. Philter includes one. Run others in PhEye, our model server."
url: "https://philterd.ai/ph-eye/"
---

AI models for PII and PHI detection

# PII Lenses

A lens is an AI model trained to find PII and PHI in one kind of text. [Philter](https://philterd.ai/philter/), [Philter AI Proxy](https://philterd.ai/philter-ai-proxy/), and [Philter Desktop](https://philterd.ai/philter-desktop/) each include a name lens. To use another, run it in **PhEye**, our self-hosted model server. Lenses find what patterns cannot, such as names, while [Phileas](https://philterd.ai/phileas/) patterns match fixed-shape identifiers like SSNs.

What a lens finds

lens English Names (Small) English Names (Large) French Names Hospitals

Patient Margaret Collins PERSON0.98 was seen by Dr. Alan Reyes PERSON0.97 on 04/12/2026 and can be reached at (555) 342-9187.

The English name lenses find people's names. Phileas patterns match the date and phone number. Swap the lens, and the same text is read for French names or hospitals instead.

## Lenses

Lenses trained by Philterd and selected from the open source community. We can also [train a custom lens](https://philterd.ai/ph-eye/#) for your documents.

| Lens | Source | Language | Entity types | License | Model |
| --- | --- | --- | --- | --- | --- |
| General |
| [English Names (Extra Small)](https://philterd.ai/lenses/ph-eye-pii-en-xsmall/) | Philterd | English | PERSON | CC-BY-4.0 | [philterd/ph-eye-pii-en-xsmall](https://huggingface.co/philterd/ph-eye-pii-en-xsmall) |
| [English Names (Small)](https://philterd.ai/lenses/ph-eye-pii-en-small/) | Philterd | English | PERSON | CC-BY-4.0 | [philterd/ph-eye-pii-en-small](https://huggingface.co/philterd/ph-eye-pii-en-small) |
| [English Names (Medium)](https://philterd.ai/lenses/ph-eye-pii-en-medium/) | Philterd | English | PERSON | CC-BY-4.0 | [philterd/ph-eye-pii-en-medium](https://huggingface.co/philterd/ph-eye-pii-en-medium) |
| [English Names (Large)](https://philterd.ai/lenses/ph-eye-pii-en-large/) | Philterd | English | PERSON | CC-BY-4.0 | [philterd/ph-eye-pii-en-large](https://huggingface.co/philterd/ph-eye-pii-en-large) |
| [French Persons](https://huggingface.co/EmergentMethods/gliner_medium_news-v2.1) | Community | French | Person | \- | [EmergentMethods/gliner\_medium\_news-v2.1](https://huggingface.co/EmergentMethods/gliner_medium_news-v2.1) |
| Healthcare |
| Healthcare Healthcare text in general | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| COVID-19 Records about COVID-19 cases | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| Clinical notes Clinician notes and narratives | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| [Hospitals](https://huggingface.co/knowledgator/gliner-pii-base-v1.0) | Community | English | Hospital names, room numbers, clinical providers | \- | [knowledgator/gliner-pii-base-v1.0](https://huggingface.co/knowledgator/gliner-pii-base-v1.0) |
| [Medical Conditions](https://huggingface.co/blaze999/Medical-NER) | Community | English | Disease, disorder | \- | [blaze999/Medical-NER](https://huggingface.co/blaze999/Medical-NER) |
| [French Medical](https://huggingface.co/almanach/camembert-bio-gliner-v0.1) | Community | French | Disease (Maladie) | \- | [almanach/camembert-bio-gliner-v0.1](https://huggingface.co/almanach/camembert-bio-gliner-v0.1) |
| Legal |
| Legal Complaints, orders, and other court documents | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| Court filings Motions, briefs, and declarations | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| Bankruptcy filings Petitions and schedules | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| Finance and insurance |
| Finance and insurance Statements, loan and KYC forms, and policies | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| SEC filings Public company filings | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| Insurance claims Claim documents | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| Accounting |
| Accounting Bank feeds, invoices, journal entries, and workpapers | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| Tax returns Returns and W-2, 1099, W-9, and K-1 forms | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |
| Payroll records Payroll registers, pay stubs, and deposit forms | Philterd | English | PERSON | \- | [Contact us](https://philterd.ai/ph-eye/#) |

## Why lenses, not one model

A general-purpose LLM is an expensive generalist: gigabytes of weights, slow inference, and accuracy that sags on text it was barely trained on. A lens is the opposite, a small, fast model focused on the size, language, or domain your workload actually needs. That focus buys three things:

### Right-sized and specialized

Pick the model that fits the job. The English name lenses come in four sizes that trade accuracy against latency and footprint, and specialized lenses cover French text and clinical text that a general model handles poorly.

### Lower compute cost

Each lens is small: from 90 MB to under 2 GB, not the many gigabytes of a general LLM. The smaller lenses run comfortably on a CPU. At scale that is far cheaper than calling a hosted LLM for the same task.

### Composable

Run one PhEye container per lens and list each of them in your Phileas policy. English names, French names, and your own custom lens all contribute detections to the same document.

## Running a lens

Philter, Philter AI Proxy, and Philter Desktop run their name lens with no setup. To use another lens, or to call one from your own application, run it in PhEye, the self-hosted model server. Each PhEye container serves one lens, chosen by the image tag.

POST text. Get back entities and confidence scores.

```
$ docker run -p 5000:5000 philterd/ph-eye:1.3.0-pii_en_small

$ curl -X POST http://localhost:5000/find \
    -H "Content-Type: application/json" \
    -d '{"text":"Patient John Doe was admitted Friday."}'

[
  { "label": "name", "text": "John Doe", "score": 0.98,
    "start": 8, "end": 16 }
]
```

POST text to `/find` and PhEye returns the detected spans with confidence scores.

- [PhEye documentation](https://philterd.github.io/ph-eye/)
- [Release notes](https://github.com/philterd/ph-eye/releases)
- [PhEye on GitHub](https://github.com/philterd/ph-eye)

## Frequently asked questions

If something here isn’t covered, [get in touch](https://philterd.ai/ph-eye/#) and we’ll answer.

What is PhEye?

PhEye is the service that hosts the AI and NLP models that find PII and PHI in unstructured text. POST text to its `/find` endpoint and it returns the detected entities with confidence scores. It's designed to plug directly into [Phileas](https://philterd.ai/phileas/) and [Philter](https://philterd.ai/philter/), or to call from any application that needs entity detection over HTTP.

How is PhEye different from using an LLM?

PhEye serves NLP models trained specifically for PII and PHI entity recognition, not a general-purpose LLM. For this task that means faster inference and a tiny fraction of the compute cost, and it runs entirely in your own environment with no model-provider account.

What is a lens?

A lens is a swappable model for a particular kind of text. The Philterd lenses detect people's names in English in four sizes, and community lenses cover French text and healthcare entities. Each PhEye Docker image has one lens built in, chosen by the image tag. See the [available lenses](https://philterd.ai/ph-eye/#lenses).

Is a lens the same as a policy?

No. A lens decides what is detected and where it is in the text. A [policy](https://philterd.ai/policies/) decides what to do with each detection: mask, redact, encrypt, abbreviate, or pass it through. You need both. Lenses are models served by PhEye, and policies are JSON files loaded by Phileas or Philter.

Can a lens replace a regex?

For names, the lens is the better tool. A trained model finds names in context that a regex can't reliably match, like "Dr. Smith" or a name buried in a clinical narrative. For structured identifiers (SSNs, credit card and account numbers, national IDs, phone numbers), a validated pattern is faster and more reliable than a model, and that is what Phileas's pattern layer does. Production deployments use both.

Can I combine lenses?

Yes. Run one PhEye container per lens and list each endpoint in your Phileas policy. A team processing English and French tickets runs both, and the detections from each are applied to the same document. Switching lenses is a change to the image tag and the policy, not to the calling application.

Does running multiple lenses slow things down?

Each lens adds its own inference time per document, and larger lenses take longer than smaller ones. Measure on your own hardware and document mix, and use [Philter Scope](https://philterd.ai/philter-scope/) to check whether a larger lens actually improves recall on your data before paying for it.

Are the lenses open source?

Licensing varies per lens. Each lens's detail page, linked from the table above, lists its license alongside the language and version, and community models carry the license their authors chose. Custom-trained lenses are deliverables of a paid engagement and are owned per the engagement terms.

Does PhEye send my text anywhere?

No. Deploy PhEye alongside your data and sensitive text never leaves your infrastructure: no third-party API, no model-provider account, and no outbound dependency.

Do I need a GPU?

No. The standard Docker images run inference on CPU with no special hardware required. GPU-accelerated images, built on PyTorch with CUDA, are available for workloads that need higher throughput or handle high request volume.

How does PhEye relate to Phileas and Philter?

PhEye is the default model server for both [Phileas](https://philterd.ai/phileas/) and [Philter](https://philterd.ai/philter/): they call its `/find` endpoint to get the machine-learning detections that complement their regex, dictionary, and validation rules. Wire it in through configuration, or call its HTTP API directly from anything that speaks JSON.

## Related products

- [Phileas: Phileas calls PhEye to run model-based detection inside the redaction pipeline.](https://philterd.ai/phileas/)
- [Philter: Philter uses PhEye's models to find PII before redacting it over its API.](https://philterd.ai/philter/)
- [Philter Scope: Score how accurately a PhEye lens detects PII on your data, precision and recall.](https://philterd.ai/philter-scope/)

## Find the right lens

Every Philter product includes a name lens. For another lens, a custom one, or help choosing, talk to us.

[See your options](https://philterd.ai/pricing/)
