Skip to content

Image Detection

Manuscript analyzes forensic signals in image files to detect AI-generated content.

Real photographs contain EXIF data from the camera:

MetadataReal PhotoAI-Generated
Camera makeApple, Canon, SonyMissing or generic
Camera modeliPhone 15, EOS R5Missing
GPS coordinatesPresent (often)Never
Date/timeConsistentMissing or fake
Exposure settingsPhysical valuesMissing

Weight: 0.25

Real cameras produce characteristic noise patterns. AI images lack authentic sensor noise.

Weight: 0.15

Human photographs have natural color histograms. AI often produces artificially smooth distributions.

Weight: 0.20

JPEG compression leaves specific patterns. AI images may have inconsistent compression artifacts.

Weight: 0.15

AI images often have unnatural edges, especially around fine details like hair, fingers, and text.

Weight: 0.15

AI-generated faces often exhibit unnatural symmetry that real faces don’t have.

Weight: 0.10

Real photograph:

File: vacation_photo.jpg
EXIF: Canon EOS R5, 1/250s, f/4, ISO 400
GPS: 40.7128° N, 74.0060° W
Date: 2024-12-25 14:30:00

Signals detected:

  • Valid EXIF metadata ✓
  • Authentic camera signature ✓
  • Natural noise pattern ✓
  • Consistent compression ✓

Verdict: Human (confidence: 0.89)


AI-generated image:

File: portrait.png
EXIF: None
GPS: None
Date: None

Signals detected:

  • No EXIF metadata ✗
  • No camera signature ✗
  • Too clean (no sensor noise) ✗
  • Symmetric face detected ✗

Verdict: AI (confidence: 0.85)

Terminal window
curl -X POST http://localhost:8080/verify \
-F "image=@photo.jpg"
Terminal window
curl -X POST http://localhost:8080/verify \
-H "Content-Type: application/json" \
-d '{
"image_base64": "data:image/jpeg;base64,/9j/4AAQSkZJ..."
}'
{
"id": "hm_xyz789",
"verdict": "ai",
"confidence": 0.76,
"content_type": "image",
"signals": {
"metadata_score": 0.0,
"color_distribution": 0.65,
"edge_consistency": 0.42,
"noise_pattern": 0.35,
"compression_analysis": 0.58,
"symmetry_score": 0.78
},
"processing_time_ms": 45
}
MetricValueNotes
Accuracy50.00%Needs improvement
Precision50.00%
Recall100.00%All AI images detected
F1 Score66.67%

The current accuracy is limited because:

  1. Web-sourced images often have EXIF metadata stripped
  2. Downloaded photos lose camera signatures
  3. Social media compression removes forensic markers

This is a known limitation. See Improvement Stories for planned enhancements.

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • WebP (.webp)
  • GIF (.gif) - first frame
  • BMP (.bmp)
  • TIFF (.tif, .tiff)
  1. Original files: Detection works best on original camera files
  2. Uncompressed: Avoid heavily compressed images
  3. Full resolution: Don’t resize before analysis
  4. Multiple samples: For important decisions, analyze multiple images
  • DCT coefficient analysis for JPEG forensics
  • Full EXIF parsing with validation
  • PNG chunk analysis
  • CLIP-based deep analysis (optional)