How JPEG Compression Changed DFDetect Scores

Live DFDetect results for authentic photos, generated portraits, and face composites across cropped and compressed variants.

Both faces changed score bands

DFDetect assigned both faces in its generated portrait real-face scores above 99%. After JPEG compression, both scores fell below 1% and moved to the manipulated-face band. The compressed copy kept the same dimensions, and the detector still located both faces.

Measured on using the live DFDetect scan API and model efficientnet-b7-8a205583d43f. The percentages below are real-face model scores.

Inputs and measured results

Source portrait

Two people facing forward against a plain wall

Generated two-person portrait from the DFDetect demo, decoded from WebP and saved as PNG.

640 × 480 pixels · 272.1 KiB · Download source portrait

Left face
>99.99%Leans real
Right face
99.89%Leans real

Compressed portrait

JPEG-compressed copy of the same two-person portrait

Same pixels before encoding and same dimensions. Saved as JPEG at Pillow quality 20 with 4:2:0 chroma subsampling.

640 × 480 pixels · 9.8 KiB · Download compressed portrait

Left face
0.62%Leans manipulated
Right face
0.06%Leans manipulated

Single-face crop

Crop showing the person on the left of the source portrait

A lossless 310 × 370 crop of the left person from the source raster, starting at pixel (0, 37).

310 × 370 pixels · 94.6 KiB · Download single-face crop

Face
>99.99%Leans real

No-face control

An illustrated landscape with mountains and no people

A separate drawing of mountains and sky, included to check how the API responds when it detects no face.

640 × 480 pixels · 3.2 KiB · Download no-face control

No face detected. The API returned zero faces and no score.

What to do when copies disagree

Use the highest-quality copy you can obtain and match the same face across versions. When scores cross bands after an ordinary image edit, treat the result as uncertain. Check earlier copies or other evidence about where the image came from before relying on either score.

This comparison used one generated portrait without a paired authentic photograph or a verified face swap. It shows how file encoding affected this example. Estimating accuracy would require independently labeled images and results across many subjects, image qualities, and kinds of manipulation.

What changed across the labeled examples?

We ran 18 scans across 6 source images in the live private API. Labels came from the photo’s source or how the image was made. Each source was scanned as a PNG, as a lossless crop, and as a quality-20 JPEG at the source dimensions.

The authentic group uses NASA photos. The composite group uses faces blended across two synthetic portraits. The generated group uses those portraits before the swap. These groups share source material and are too small to estimate real-world accuracy or tune thresholds. The composites represent one editing technique.

Observed outcomes by source label and condition
Source labelConditionLeans manipulatedInconclusiveLeans realNo faceMultiple faces
Authentic photosSource0/20/22/20/20/2
Authentic photosCropped0/20/22/20/20/2
Authentic photosJPEG compressed0/20/22/20/20/2
Synthetic face compositesSource0/20/22/20/20/2
Synthetic face compositesCropped0/20/22/20/20/2
Synthetic face compositesJPEG compressed2/20/20/20/20/2
Fully generated portraitsSource0/20/22/20/20/2
Fully generated portraitsCropped0/20/22/20/20/2
Fully generated portraitsJPEG compressed1/20/21/20/20/2

In the authentic group, “Leans manipulated” counts false flags. In the composite group, “Leans real” counts missed composites. Read inconclusive and no-face results alongside both counts. The generated group shows the detector’s behavior on a separate kind of synthetic image.

Download the exact inputs and scores

Eileen Collins portrait · Authentic photos

NASA photograph of Eileen Collins, republished by scikit-image. View image source.

Generated portrait, left person · Fully generated portraits

A single person cropped from the DFDetect synthetic demo image. View image source.

Generated portrait, right person · Fully generated portraits

A single person cropped from the DFDetect synthetic demo image. View image source.

Face composite on left portrait · Synthetic face composites

The inner face from the other generated portrait was resized and blended into this synthetic base. View image source.

Face composite on right portrait · Synthetic face composites

The inner face from the other generated portrait was resized and blended into this synthetic base. View image source.

Buzz Aldrin portrait · Authentic photos

Official NASA astronaut portrait S69-31743, resized to fit the fixture budget. View image source.

Repeat the scan

Download any input above. Replace the filename in this command to rescan another case. The API returns the model version, face count, crop coordinates, and raw scores. A later model or detector update may change the results.

curl --fail-with-body \
  -F 'scan_image=@portrait-source.png;type=image/png' \
  'https://api.deepfake-detect.com/v1/upload?mode=scan'

Use image/jpeg for the compressed copy. See the methodology for score thresholds and limitations.