Back to projects

AI Forgery Detective

A copy-move forgery detector that shows its work, and a chat layer that explains each verdict in plain language.

Role AI/ML engineer Team 4 people Year 2025 Stack PyTorch, ViT-Base, Flask, React
Verdict, confidence, and three views of the same frame: original, detection overlay, heatmap.

Copy-move forgery hides a region of an image inside that same image. It survives compression and resizing, and it defeats the eye.

The tools that catch it are built for forensic analysts, and they output tensors.

We trained a ViT-Base backbone with a Siamese comparison branch, then put a chat layer in front of the result.

89.7%

Overall accuracy on CoMoFoD, n=360

92.6%

Recall on forged images, 315 of 340

40%

Recall on authentic images, 8 of 20

3-5s

Analysis per image at 224×224 input

Upload takes JPG, PNG, GIF, BMP and WebP up to 10MB. Analysis starts from one button.

One input, and no settings

No thresholds, no model picker, no sensitivity slider. Every run starts from the same defaults.

Two people examining the same image get the same answer, which is the only way a verdict is worth anything.

Detection overlay and confidence heatmap. Same image, same run, at 82.8% confidence over 46.1% of the frame.

Three views, because the comparison is the evidence

The overlay marks the regions the model matched to each other. The heatmap shows the confidence behind it.

Switching back to the untouched original is one tap, so a reader can check the claim instead of accepting it.

Confusion matrix, CoMoFoD. 8 against 12 across the authentic row, 25 against 315 across the forged row.

The model over-calls forgery, and the matrix says so

315 of 340 forged images were caught. But 12 of the 20 authentic images were also called forged.

The evaluation split runs roughly 17:1 toward forged, and the model learned that prior rather than the feature.

Two photographs from outside the dataset, predicted at 37.0% and 60.0%.

Outside the dataset, it stops being sure

On photographs it never trained on, confidence collapses toward the middle: 37% on one, 60% on another.

That makes it a useful first pass and nothing more. A screening tool, not evidence.

The five-step answer returned when a reader asks how detection works.

The chat layer answers “how did you get that”

Llama 3.1 70B on Groq receives the run’s confidence map and classification, then explains the pipeline.

It never re-runs the model and never changes the verdict. It only describes the one that already happened.

Rebalance the evaluation split, then re-report.

A detector that says forged nine times out of ten is only useful once you know how often it is wrong.

The demo runs against a paid inference endpoint, so access is available on request. The same goes for the source.

Request access on LinkedInRequest access by email