Image Detection
Image Detection
Section titled “Image Detection”Manuscript analyzes forensic signals in image files to detect AI-generated content.
Detection Signals
Section titled “Detection Signals”EXIF Metadata Analysis
Section titled “EXIF Metadata Analysis”Real photographs contain EXIF data from the camera:
| Metadata | Real Photo | AI-Generated |
|---|---|---|
| Camera make | Apple, Canon, Sony | Missing or generic |
| Camera model | iPhone 15, EOS R5 | Missing |
| GPS coordinates | Present (often) | Never |
| Date/time | Consistent | Missing or fake |
| Exposure settings | Physical values | Missing |
Weight: 0.25
Sensor Noise Pattern
Section titled “Sensor Noise Pattern”Real cameras produce characteristic noise patterns. AI images lack authentic sensor noise.
Weight: 0.15
Color Distribution
Section titled “Color Distribution”Human photographs have natural color histograms. AI often produces artificially smooth distributions.
Weight: 0.20
Compression Artifacts
Section titled “Compression Artifacts”JPEG compression leaves specific patterns. AI images may have inconsistent compression artifacts.
Weight: 0.15
Edge Consistency
Section titled “Edge Consistency”AI images often have unnatural edges, especially around fine details like hair, fingers, and text.
Weight: 0.15
Symmetry Detection
Section titled “Symmetry Detection”AI-generated faces often exhibit unnatural symmetry that real faces don’t have.
Weight: 0.10
Example Analysis
Section titled “Example Analysis”Real photograph:
File: vacation_photo.jpgEXIF: Canon EOS R5, 1/250s, f/4, ISO 400GPS: 40.7128° N, 74.0060° WDate: 2024-12-25 14:30:00Signals detected:
- Valid EXIF metadata ✓
- Authentic camera signature ✓
- Natural noise pattern ✓
- Consistent compression ✓
Verdict: Human (confidence: 0.89)
AI-generated image:
File: portrait.pngEXIF: NoneGPS: NoneDate: NoneSignals detected:
- No EXIF metadata ✗
- No camera signature ✗
- Too clean (no sensor noise) ✗
- Symmetric face detected ✗
Verdict: AI (confidence: 0.85)
API Usage
Section titled “API Usage”Upload via Form
Section titled “Upload via Form”curl -X POST http://localhost:8080/verify \ -F "image=@photo.jpg"Base64 Encoded
Section titled “Base64 Encoded”curl -X POST http://localhost:8080/verify \ -H "Content-Type: application/json" \ -d '{ "image_base64": "data:image/jpeg;base64,/9j/4AAQSkZJ..." }'Response
Section titled “Response”{ "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}Current Benchmarks
Section titled “Current Benchmarks”| Metric | Value | Notes |
|---|---|---|
| Accuracy | 50.00% | Needs improvement |
| Precision | 50.00% | |
| Recall | 100.00% | All AI images detected |
| F1 Score | 66.67% |
Known Issues
Section titled “Known Issues”The current accuracy is limited because:
- Web-sourced images often have EXIF metadata stripped
- Downloaded photos lose camera signatures
- Social media compression removes forensic markers
This is a known limitation. See Improvement Stories for planned enhancements.
Supported Formats
Section titled “Supported Formats”- JPEG (.jpg, .jpeg)
- PNG (.png)
- WebP (.webp)
- GIF (.gif) - first frame
- BMP (.bmp)
- TIFF (.tif, .tiff)
Best Practices
Section titled “Best Practices”- Original files: Detection works best on original camera files
- Uncompressed: Avoid heavily compressed images
- Full resolution: Don’t resize before analysis
- Multiple samples: For important decisions, analyze multiple images
Planned Improvements
Section titled “Planned Improvements”- DCT coefficient analysis for JPEG forensics
- Full EXIF parsing with validation
- PNG chunk analysis
- CLIP-based deep analysis (optional)