On this page
00Summary
TL;DR
- Policy: only nudity is refused. Swimwear, sport, short dresses and other non-nude photos are shown normally, with no blur and no 18+ tag.
- A single general-purpose image model, with a rule that also blocked “suggestive” photos, refused 21.9% of 4,119 ordinary photos, and more than half of all beach and swimwear photos.
- We now require independent models to agree before refusing: a classifier trained to predict explicit content, a second classifier trained differently, and a detector trained to locate exposed body parts. Wrong refusals fell to 5 in 4,119 (0.12%).
- We measure wrong refusals on licensed, ordinary photos only. No explicit image was downloaded or generated. Catching real nudity is checked on a small private set and by reviewing every case where the models disagree.
01The policy comes first
Most image filters fail because nobody wrote down what they are for. “NSFW” covers everything from a bikini to explicit sex, and a model trained on that word inherits the ambiguity. So we started from a one-line policy: refuse nudity; show everything else.
That narrowness is deliberate. A model cannot judge context, consent or intent, and in an Indian chat app the cost of a wrong refusal lands on ordinary people: a holiday photo, a gym selfie, a child’s birthday. Illegal content is handled by separate processes and is refused everywhere; this post is about the everyday decision a model can make well, which is whether a photo shows nudity.
02Where photos are checked
Two checks, one decision
The phone gives an early hint; the server decides.
The photo is resized and re-encoded as JPEG, then scanned by a small model in a background thread. It never delays sending.
Only JPEG is accepted, so every accepted photo is one the server models can read. Anything else is refused at the door.
The classifiers and the detector score the photo. Their combined verdict is the decision.
03What went wrong with one model
The first version used one general-purpose image classifier with five output classes (roughly: neutral, drawing, suggestive, explicit, explicit drawing) and a rule that refused a chat photo if either explicit class passed 0.2 or the suggestive class passed 0.4. It looked reasonable. Measured on ordinary photos, it was not:
| Photo type | Photos | Suggestive + explicit rule | Explicit-only rule |
|---|---|---|---|
| Everyday photos of people | 2,693 | 13.0% | 2.1% |
| Swimwear and beach | 853 | 51.6% | 5.7% |
| Gym | 116 | 19.0% | 2.6% |
| Babies | 300 | 18.7% | 12.0% |
| Selfies | 157 | 22.3% | 10.2% |
| All | 4,119 | 21.9% | 3.9% |
Two-thirds of the refusals came from the “suggestive” score alone, and the typical victim among everyday photos was a sports picture: tennis and baseball players in mid-stride. Dropping the suggestive rule helped, but the explicit score on its own still refused 3.9%: street scenes and black-and-white photos read as explicit drawings, and close-ups of hands and babies read as explicit photos.
The important observation was that the mistakes belonged to the model, not to the photos. When we ran other models over the same 160 explicit-rule refusals, a body-part detector flagged none of them. Errors that are not shared between models can be removed by asking models to agree.
04Testing without explicit images
The usual way to evaluate a nudity model is a labelled set of explicit and safe images. We decided not to build one. Possessing and distributing explicit material carries legal risk in India, public scraped image collections have been withdrawn for containing abuse imagery, and there is no way to check the age or consent of people in scraped photos.
Instead we split the question in two:
- How often does a rule refuse an ordinary photo? This we can measure at scale, on photos that are licensed and safe by construction.
- How often does it catch real nudity? This we check on a small private set of must-refuse test photos kept off our code repository, and by human review of every case where the models disagree on real uploads.
| Source | Photos | What it contains | Licence |
|---|---|---|---|
| COCO 2017 validation, every image containing a person | 2,693 | Street, sport, food, family | CC BY 4.0 annotations; images under their own Creative Commons licences |
| Open Images V7, human-verified labels | 1,426 | Bikini, swimwear, beach, gym, baby, selfie (up to 300 each) | CC BY 2.0 images; CC BY 4.0 annotations |
Every photo was re-encoded exactly the way the app re-encodes a chat photo before scoring, because resolution and JPEG quality move scores. The swimwear and beach classes are deliberately hard: they are where a careless rule fails first, so they are the fairest stress test of the policy.
We publish only false-positive numbers here. A low wrong-refusal rate is only worth having if the catch rate holds, which is why no rule goes live before it has run in shadow (below).
05Models that must agree
Today’s decision combines three models, each chosen because its mistakes look different from the others’:
| Model | Trained to | Role in the decision |
|---|---|---|
| Classifier A | Predict whether a photo is explicit, suggestive, neutral or a drawing | First signal. Its explicit score starts the decision. |
| Classifier B | The same task, with a different architecture and training | Must agree that the photo is explicit before a refusal. |
| Body-part detector | Locate exposed body parts in the image and name each one | Can clear a borderline photo when it finds no exposed part, and can refuse together with Classifier A when it finds one with high confidence. |
The detector matters most for explainability. A classifier returns a score with no reason; a detector returns “this region, this body part, this confidence”. That makes its output something a reviewer can check against the photo, and it makes thresholds meaningful: a high-confidence exposed-part box is a statement about nudity, not about mood or lighting.
The rule, in words
- A photo is refused when both classifiers read it as explicit, and the detector does not contradict them on a borderline score.
- A photo is also refused when the detector finds an exposed body part with high confidence and Classifier A gives an explicit signal, so one classifier alone cannot veto clear nudity.
- Anything else is shown normally.
Each path needs two models. That is the whole trick: independent models rarely make the same mistake on the same ordinary photo.
06Results
Ordinary photos wrongly refused, out of 4,119
Each rule scored on the same re-encoded safe-photo set.
| Rule | Photos refused | Rate | Note |
|---|---|---|---|
| One model, suggestive + explicit | 903 | 21.9% | The original chat rule |
| One model, explicit only | 160 | 3.9% | Selfies 16 of 157 |
| Two classifiers must agree | 28 | 0.68% | Selfies 1 of 157 |
| Detector alone, exposed part ≥ 0.5 | 29 | 0.70% | Not one photo in common with the row above |
| Today’s rule | 5 | 0.12% | Classifier agreement, detector can clear or refuse with Classifier A |
The row that persuaded us is the fourth one. The two-classifier rule and the detector each refuse about 0.7% of ordinary photos on their own, and not one of those photos is the same. That is what independent errors look like, and it is why combining them costs almost nothing in wrong refusals.
On the catch side, the detector’s second refusal path more than doubled how many photos in our private must-refuse test set were refused, with no new wrong refusals on the safe set. We widened its threshold further in testing and stopped when the next step caught one more test photo at the cost of four ordinary ones (a bikini, a selfie).
07Making it fast
On the phone: never on the main thread
The phone-side scan runs a small model with GPU acceleration. The first time any GPU model runs, the browser compiles its shader programs synchronously. On a cold cache (a fresh browser profile, a browser update, any private window) that froze the entire page for up to 31 seconds on a recent laptop, and photo sends waited behind it.
The fix had three parts: the scan moved to a background worker; the worker warms itself up when the page loads, before anyone picks a photo; and the scan has a 4-second cap, after which it answers “unknown”. Sending never waits for it, because the server is the decision. We now apply the same rule to every in-browser model: inference runs in a worker, or not at all.
On the server: short jobs first
- Small models. On a single laptop CPU thread, the classifiers take about 100–120 ms per photo and the detector about 60 ms. The full chain typically finishes in under a second on our servers.
- The second model only when needed. Classifier B runs on photos Classifier A reads as explicit, and on card and profile photos for monitoring. A clearly neutral chat photo needs one model.
- Chat ahead of uploads. A chat photo is part of a live conversation; a card upload can wait a moment. Chat checks go ahead of queued uploads so a conversation never waits behind a large upload.
- Two machines. The checks run on a dedicated machine with a second one as fallback. A failed or slow primary hands the photo to the fallback automatically.
Exactness when porting a model
The detector was published with Python pre- and post-processing; our service is JavaScript. We ported the padding, resize, channel order, box decoding and non-maximum suppression, then compared the port against the reference on the same pixels: every class, score and box matched. The only remaining difference comes from a different JPEG decoder, which moves scores by under 0.01 on average.
08Changing it safely
A new model first runs beside the live rule, its scores are logged next to the decision, and humans review the photos where they disagree. Only then can it change a verdict.
An admin page sends a fixed set of photos through both machines and shows each expected and actual decision, and the time taken. It runs after every change to a model or threshold.
A Flash Card whose photo was flagged can go to human review instead of being dropped. An approved card is posted exactly as submitted.
Every evaluation photo is re-encoded the way the app does it. Scoring the original high-resolution file gives numbers that do not match production.
09Limitations
- Catch rate is not published. We do not hold a large explicit test set, by choice, so we cannot quote a precise recall. Shadow review on real uploads is how we watch it.
- Babies and bath photos are the most common hard case. A detector may correctly see an unclothed child; we refuse those photos regardless.
- Drawings and black-and-white photos confuse the classifiers more than colour photographs do.
- Models cannot judge age or consent. Those questions are handled by reporting, human moderators and separate legal processes, not by a classifier.
- The safe set has licence limits. Many of its images carry non-commercial licences, which is fine for measuring and not for training. We use it only to measure.
More on reporting and what moderators can see is on our safety page. For how we handle text in public rooms, see our abuse detection model.
10Frequently asked questions
Does FlashChat block swimwear or short dresses?
No. Only nudity is refused. Swimwear, gym photos, short dresses and other non-nude photos are shown normally everywhere, with no blur and no 18+ tag.
Where are photos checked?
On your phone first, as a quick hint, and then on FlashChat's servers, which make the decision. Every 1:1 chat photo, room photo, card photo, profile photo and frames from every video clip are checked on the server. Saved Chat photos between FlashBuddies are end-to-end encrypted, so the server cannot see them: they are checked on the receiving phone only and arrive blurred until tapped.
How did you test the models without explicit images?
We measured wrong refusals on 4,119 licensed, ordinary photos from public datasets. We never downloaded or generated explicit images for testing. Catching real nudity is checked on a small private test set and by reviewing disagreements between the models.
What if my photo is refused by mistake?
A card whose photo was flagged can be sent for human review instead of being dropped. A person decides, and an approved card is posted as it was.