AI Image Detector on Portrait Mode Photos: Why the Blur Is Not Optics (2026)
Short answer: a portrait-mode photo is a real photograph with a software blur painted over part of it. Nothing in the lens produced that falloff. The phone decided which pixels were subject and which were background, estimated a distance for each region, then averaged the background with a disk whose radius came from that estimate. An AI image detector looking at the result sees a sharp subject sitting on a large smooth field — which is also what it sees in a generated image. So a high AI score on a genuine portrait tells you the detector found the blur, not the origin of the picture.
That single sentence resolves most of the arguments people have about these photos. Someone's real portrait comes back 92% AI. They are told their own picture is fake. The score is not measuring who made the image; it is measuring a rendering step that a phone applied after the shutter.
This page is about the one thing the three best-known detector pages never touch. As of 1 November 2026, zerogpt.com/ai-image-detector and deepai.org/ai-image-detector both advertise that their detectors work "without relying on watermarks or metadata" (third-party pages, checked 1 November 2026), and neither page mentions portrait mode, depth maps, background blur, or computational photography anywhere in its headings or body (third-party reports, 1 November 2026). isthisai.com lists a "Photoshop Detection" feature for manual retouching but says nothing about depth maps or software blur (third-party reports, 1 November 2026). All three therefore throw away the one layer of the file that can settle the question, and none of them explains what happens when the blur itself is synthetic.
What a portrait-mode photo actually is
The published pipeline from the team that shipped Portrait mode on the Pixel 2 is unusually explicit about its own steps (Wadhwa et al. 2018, arXiv:1806.04171, SIGGRAPH 2018). Read it once and the rest of this page follows.
- Take a normal photograph. The sensor records everything sharp, because a phone's short focal length and small aperture put nearly the whole scene inside the depth of field. The authors state the problem plainly: standard phone cameras cannot produce shallow depth-of-field images optically, because those short focal lengths and small apertures capture nearly all-in-focus images (Wadhwa et al. 2018, arXiv:1806.04171).
- Segment the person. A neural network separates the person and their accessories from the background (Wadhwa et al. 2018, arXiv:1806.04171). This is where the subject outline comes from — not from focus, from a classifier.
- Estimate depth. Dual-pixel autofocus hardware behaves as a two-sample light field with a baseline of about one millimetre, which is used to compute a dense depth map (Wadhwa et al. 2018, arXiv:1806.04171). One millimetre. Hold that number; it decides everything in the next section.
- Turn distance into a blur radius. A per-pixel radius is computed from the distance to the focus plane.
- Blur the background in a few passes, then composite. Concretely, five passes over five disparity bands, composited back to front (Wadhwa et al. 2018, arXiv:1806.04171).
- Write the result. The depth data and a subject matte may be stored in the file alongside the image, which matters later on this page.
Every step after the shutter is arithmetic on pixels. That is not a criticism of the product — the pictures look good, which is the point of the feature. It is a statement about what an AI detector is being asked to judge.
Past about three metres, the depth map is a guess
This is the part that changes how you read the blur, and it is pure arithmetic from the baseline above.
For a two-view depth estimate, disparity d is proportional to focal length times baseline divided by distance Z: d = f·B/Z. Take a typical 2026 phone main camera with a 9.8 mm wide sensor (4032 pixels across, so 2.43 µm per pixel), a 6.86 mm focal length, and the one-millimetre baseline quoted above. Then convert to pixels, and ask what one pixel of disparity error costs in metres.
| Subject distance | Disparity (f 6.86 mm, B 1 mm) | In pixels | Depth error from one pixel of disparity |
|---|---|---|---|
| 0.5 m | 13.7 µm | 5.6 px | ±9 cm (18%) |
| 1 m | 6.9 µm | 2.8 px | ±35 cm (35%) |
| 3 m | 2.3 µm | 0.94 px | ±3.2 m (106%) |
| 10 m | 0.69 µm | 0.28 px | ±35 m (354%) |
Read the third row again. At three metres the entire depth signal is less than one pixel wide, and a single pixel of error corresponds to more than three metres of distance error — a hundred percent relative error. At ten metres, the disparity is a quarter of a pixel. There is nothing left to measure.
So the background blur in a portrait-mode photo is not a measurement of where the background is. Beyond a few metres it is a placeholder, filled in from a segmentation mask and a smoothed depth field. Apple's own documentation is candid about the same fragility from a different angle: a depth map is a map of per-pixel distance, but it is not rectilinear, and it may be used "as a proxy for depth when rendering effects to its accompanying image, but not to correlate points in 3D space" (Apple developer documentation, AVDepthData, 2026). The API also carries a flag for whether the map has been temporally smoothed (Apple developer documentation, AVDepthData, 2026) — which is a polite way of saying the values were filtered.
This is why the fake blur so often looks like a flat card behind the head rather than a room receding into the distance. The pipeline could not have done better with the hardware it had.
The blur is roughly a third of what the f-number claims
Now the size of the blur. The standard thin-lens circle-of-confusion relation gives the diameter of the blur disk a point at distance S2 makes when the lens is focused at S1:
c = (f² / N) × (S2 − S1) / (S1 × (S2 − f))
with f the focal length in millimetres and N the f-number. Use a subject at 3 m and a background at 10 m, and run it twice.
| Phone main camera, as assumed above | 85 mm f/1.4 on a full-frame body | |
|---|---|---|
| Sensor width | 9.8 mm | 36 mm |
| Focal length | 6.86 mm | 85 mm |
| Aperture | f/1.6 | f/1.4 |
| Blur disk diameter, subject 3 m, background 10 m | 0.0069 mm | 1.21 mm |
| The same disk on a 4032-pixel-wide image | 2.8 px | 136 px |
| Share of frame width | 0.07% | 3.37% |
The optics produce about 2.8 pixels of background blur. The look people want is about 136 pixels. The gap is a factor of 48 in diameter, which is a factor of roughly 2,300 in the area each output pixel has to average. That gap is what the software has to invent.
It invents less than you would think. In the published pipeline the blur radius is capped at 30 pixels (Wadhwa et al. 2018, arXiv:1806.04171). Thirty pixels is stated for a 5.4-megapixel image; on a 12-megapixel frame at the same aspect ratio the linear resolution is about 1.5 times higher, so the equivalent cap is roughly 45 pixels. Against the 136 pixels the optics at f/1.4 would give, that is about a third. Since radius scales roughly with the inverse of the f-number, a third of the radius is about three stops, so the deepest setting behaves like roughly f/4 rather than f/1.4, on the assumptions in the table.
Two consequences follow, and both are testable without a detector. First, the blur tops out: a subject at 2 m against a wall 200 m away gets the same maximum blur as a subject at 2 m against a wall at 20 m. Real optics do not saturate like that. Second, an aperture control that offers f/1.4 through f/16 on a phone is relabelling a capped software radius, not opening an aperture — the number tells you how much blur was painted, not how much light was collected.
Four radii, not a gradient
The single most useful structural fact about synthetic bokeh is that it is quantised where real bokeh is continuous.
The pipeline computes the blur in five passes over five disparity bands (Wadhwa et al. 2018, arXiv:1806.04171). One band is the in-focus region. That leaves at most four distinct non-zero blur radii across an entire photograph. Adjacent bands are given a tent-shaped alpha so that they overlap by about a quarter of a band width, which softens the transition into a ramp — but a ramp between four values is still four values.
Then there is the deliberate departure from physics, stated in the paper: a range of depths on either side of the focus plane is forced to stay sharp, and for pictures of people the pixels inside the segmentation mask are kept sharp as well (Wadhwa et al. 2018, arXiv:1806.04171). The authors call this a trick that makes it easier for novices to get a usable picture. It also means the sharpness map has plateaus with flat edges, where a lens produces a smooth curve.
And the background is cheaper than the subject in a very literal sense: before blurring, the image is downsampled by a factor of two in each dimension, giving an eightfold speedup with what the authors describe as little perceptible degradation, and the radius is halved to compensate (Wadhwa et al. 2018, arXiv:1806.04171). The defocused half of a 12-megapixel portrait is therefore built from about three megapixels of data and blown back up. That is not a flaw you can see at normal size. It is a real difference in the pixel statistics, and it sits precisely in the band that texture-based detectors read.
The software removes noise, then puts some back
Here is the admission that matters most for detection, in the paper's own framing: the blur stages remove the natural noise from the blurry portions of the scene, creating a mismatch in noise levels that gives an unrealistic "cardboard cutout" appearance, and noise is added back to reduce the effect (Wadhwa et al. 2018, arXiv:1806.04171).
Sit with that. The pipeline knows it creates a noise discontinuity between subject and background, because averaging thousands of pixels destroys the grain that the sharp region keeps. And the remedy is to inject synthetic noise into the blurred region.
Work out the scale. A disk of radius 45 pixels covers about 6,360 pixels. Each output pixel in the deepest background is an average of roughly 6,360 samples, so independent noise falls by a factor of about 80 — the square root of 6,360. Sensor pattern noise, the fixed multiplicative fingerprint that camera identification is built on (Lukas, Fridrich and Goljan 2006, IEEE Transactions on Information Forensics and Security, "Digital camera identification from sensor pattern noise"), falls by roughly the same factor inside the blur, and stays at full strength on the subject.
So one photograph contains two different amounts of camera fingerprint, separated by a boundary that follows a segmentation mask. If half the frame is defocused, a whole-image fingerprint correlation lands near half its normal value: roughly 0.5 plus 0.5 divided by 80. A detector that answers "is there a camera fingerprint here" with a single number has to answer it about a composite, and the composite is neither a camera photo nor a generated image.
The paper also documents the boundary artefacts by name: a naive gather-based blur makes the foreground bleed into the background, producing a halo, while a single-pass blur lets the defocused background smear over the foreground, darkening the subject's edge (Wadhwa et al. 2018, arXiv:1806.04171). Those are engineering bugs in one implementation, not properties of every phone. But halos of that shape are also what generators produce when they render shallow depth of field, which is why the sight of one is not evidence of anything on its own.
What the file still carries
A portrait-mode photo is not only pixels. Two auxiliary images may travel with it.
Apple documents that the portrait effects matte is stored in the image file alongside the depth data auxiliary image, that it is read as an auxiliary image of its own type, and that decompressed matte images are natively 8-bit single-channel, not gamma corrected, tagged with a linear transfer function (Apple developer documentation, "Extracting Portrait Effects matte image data from a photo", 2026). The container mechanism for attaching a second image to a file and linking it to the primary image is defined in the HEIF family of specifications (ISO/IEC 23008-12:2022, scope summary).
Two practical points follow.
Eight bits of alpha is a short ramp. A matte stored at 8 bits has 255 non-zero levels between background and subject. Where hair meets background the transition happens over a couple of pixels, so the composite can only sit at a handful of blend ratios there. Real optics produce partial coverage from a continuum of ray paths, not from a lookup table.
The evidence is fragile and easy to lose. Auxiliary images are the first thing an export path drops: a re-save, a screenshot, a messaging app's compression, or a converter that only understands the primary image will strip them. When they survive, they prove the blur was software — the mask traces the subject's outline, which no lens can do. When they are gone, their absence proves nothing, because absence is the normal state of every exported file.
That asymmetry is the whole reason a detector cannot answer the question by looking at pixels alone, and the reason both major tools declaring that they ignore metadata is such a costly choice for this specific case.
Why a real portrait gets flagged
Three signatures line up, and all three point the same way.
A noise floor that steps. The subject keeps its grain; the background has none, or has noise that was added afterwards by a random number generator rather than by a sensor. A classifier trained to separate camera images from generated ones is being shown a picture with two different noise regimes in it.
A sharpness histogram with two humps. Four blur radii plus a forced-sharp region produce a field that is either crisp or smoothly featureless, with narrow ramps between. Generated images with rendered bokeh look similar, because a generator produces smooth regions and crisp edges for the same reason: it has no optics to be consistent with.
A fingerprint that thins out. Pattern noise, the classic camera-identification signal (Lukas, Fridrich and Goljan 2006, IEEE TIFS), is attenuated inside the blurred region by the averaging described above, and intact on the subject. Averaged across the frame, a real photograph with real bokeh and a real portrait-mode composite can end up in a similar place — real optical blur attenuates noise too — but the composites sit further out, and they sit out in the direction the detector associates with synthesis.
Training data finishes the argument. GenImage, one of the standard benchmarks, builds its real class entirely from ImageNet (Zhu et al. 2023, arXiv:2306.08571) — ordinary photographs, mostly with ordinary optics. Phone-rendered bokeh is underrepresented in the real class and overrepresented in the aesthetic that generators imitate. Meanwhile the real class in detection training behaves as a sink that absorbs whatever the model cannot place (Ojha, Li and Lee 2023, arXiv:2302.10174), which is a two-edged property here: it protects some portraits and mislabels others depending on how far the composite drifts.
The other direction, which is worse
An AI-generated image with rendered bokeh can come back as real, and this is the error that damages fact-checking rather than embarrassing an individual.
The generator's own tell is periodic structure from the upsampling operations inside the network (Frank, Eisenhofer, Schönherr, Fischer, Kolossa and Holz 2020, arXiv:2003.08685). In a generated image that structure sits across the whole frame, including the blurred background. If a detector has learned that "smooth, low-detail background plus sharp subject" is a normal photograph of a person, a generated portrait with the same layout inherits that benefit of the doubt. The detector is not being fooled by the bokeh; it is being reassured by it.
Note also what a watermark can and cannot do here. SynthID is described by its maker as designed to stand up to modifications including cropping, filters, frame-rate changes and lossy compression (third-party reports, Google DeepMind SynthID page, 2025) — but it is embedded in generated content and read by a watermark detector. A portrait-mode photo is a real photograph, so it never had a watermark, and its absence is not evidence of anything.
The evidence, layer by layer
| Evidence layer | Real optics, shallow depth of field | Portrait-mode composite |
|---|---|---|
| Blur as a function of distance | continuous, monotonic | at most four non-zero radii, ramped at band edges |
| Region within the depth of field | smooth falloff from the focus plane | forced to zero blur, extended around the subject |
| Background resolution | full sensor resolution | computed after 2× downsampling, then upsampled |
| Noise | falls smoothly with blur | removed by averaging, then re-injected |
| Highlight shape | follows the aperture opening, clipped near frame edges | ideal circles, by explicit choice |
| Sensor pattern noise | attenuated smoothly across the frame | intact on the subject, roughly divided by 80 in the background |
| Depth map in the file | none exists | auxiliary image, may survive export |
| Subject matte in the file | none exists | 8-bit auxiliary image, may survive export |
| Provenance manifest | possible | possible, and usually destroyed by re-export |
The highlight row deserves one line of explanation. Optical bokeh takes the shape of the aperture — the paper's own example is a six-bladed aperture producing hexagonal bokeh — whereas the software version deliberately simulates "ideal circular bokeh" because it is simple and produces pleasing results (Wadhwa et al. 2018, arXiv:1806.04171). Look at a string of lights behind a subject: polygons mean optics, identical perfect circles mean arithmetic.
A two-minute check you can run on any portrait
- Look for the second image in the file. List the file's embedded images rather than its tags. A portrait-mode photo that kept its data has a depth image, a subject matte, or both, usually at a different resolution from the main picture. If they are there, the blur was software and the question is closed. If they are missing, you have learned only that something re-saved the file.
- Compare blur size at two distances. Find something roughly 2 m behind the subject and something roughly 20 m behind it, both at similar angles. Optical blur should differ enormously between them. Software blur with a capped radius often does not.
- Walk across the subject's edge. Zoom to 400% on the boundary between sharp subject and blurred background. You are looking for three things: a step in noise, a halo, or a doubled edge where a partly transparent matte blended a crisp copy with a blurred one. Any of the three is a software tell. A gradual, grain-continuous transition is what a lens does.
- Check the highlights. Polygons and clipped shapes near the frame edge point to a real aperture. Uniform perfect circles, all the same size, point to a disk kernel.
- Change one thing and re-run the score. If the photo is yours and your phone lets you change the blur after the shot, export two versions with different settings and submit both. A score that moves when only the blur amount changed is a score about the rendering, not about the picture. This is the same logic as any other single-variable test: one input, two outputs, one explanation.
If you have no access to the file — a photo sent to you by someone else, stripped by the app on the way — then the honest position is that the file cannot answer the question, and the blur can only narrow it.
What to write instead of a percentage
- Say what kind of file you have. "A 4032×3024 HEIC from an iPhone with a depth auxiliary image" is a fact about the evidence. "92% AI" is a fact about a stranger's classifier.
- Separate the two claims. "The background blur in this photo was added in software" and "this photograph was not taken by a camera" are different sentences. The first can be true while the second is false, and it very often is.
- Name the rendering step. If you are quoting a detector on a portrait, say that the image contains a synthesised defocus pass, so the tool is scoring a composite. That single clause explains the number to anyone who reads it later.
- Do not accept a rebuttal that rests on the blur. "Look how fake the background is" is not evidence of generation in 2026. Half the portraits on a phone have a fake background by design.
Short answers
Does portrait mode make a photo "AI-generated"? No. The photograph is real; a rendering step was applied to part of it. Nothing was synthesised from a prompt.
Then why does a detector say 90%+? Because it is reading the rendering: a smooth background, a stepped noise floor, a sharp subject edge. Those are properties of the composite, and they overlap with the properties of generated images.
Is the depth map accurate? At close range it is useful. Past about three metres a one-millimetre baseline gives less than one pixel of disparity, and a single pixel of error there is worth metres of distance, per the table above. The far background is a placeholder.
Can I recover the original sharp photo? Only if the phone kept it. The depth map and matte describe the blur; they do not contain the unblurred background at full detail, which is why re-editing the blur in an app looks soft rather than crisp.
Is a portrait-mode photo good evidence in a dispute? It is good evidence that a camera was there. It is not good evidence about the rendering, and it cannot be authenticated by a classifier that ignores the auxiliary images.
Should I strip the depth data before sharing? That depends on what you want. Stripping it protects privacy — a depth map is a rough 3D record of a room — and it destroys the only proof that the blur was software. Decide which one you need before you export.
The bottom line
Portrait mode is a real photograph with a computed defocus pass laid over the background. The blur comes from a depth estimate that runs out of signal a few metres behind the subject, is quantised into a handful of radii, is computed at half resolution, and is capped well below what the advertised aperture implies. The pipeline removes noise from the blurred region and then adds noise back, because the mismatch was visible.
An AI image detector cannot see any of that structure for what it is. It sees a sharp subject on a smooth field with a fingerprint that thins out, and that description fits a generated portrait just as well as a real one. So when a genuine portrait comes back flagged, the number is not a verdict about the photograph. It is a report about a rendering step — one that a 30-second look at the file, or a two-minute look at the background, would have settled outright.