A comprehensive image forensics and privacy risk assessment tool that combines EXIF metadata analysis, AI-powered visual intelligence, solar forensics, and deep learning-based location classification.
ExifRiskAuditor analyzes images to detect privacy risks, verify authenticity, and assess potential information leakage. It is designed for digital forensics, OSINT investigations, and privacy auditing workflows.
- EXIF Metadata Extraction - GPS coordinates, camera model, software traces, timestamps
- AI Visual Analysis - Google Gemini-powered location detection and forgery assessment
- Solar Forensics - NOAA-based sun position validation to detect timestamp/location spoofing
- Error Level Analysis (ELA) - Pixel-level forgery detection via JPEG compression artifacts
- Street Classification - ONNX-based ResNet18 model for location identification from street-level imagery
- Risk Scoring - Decorator pattern-based composite scoring (0-100) with weighted risk factors
- PDF Reporting - Automated forensic report generation with QuestPDF
ExifRiskAuditor/
├── Services/ # Core analysis engine
│ ├── ExifRiskManager.cs # Main orchestrator
│ ├── GeminiVisualAnalyzer.cs # Google Gemini AI integration
│ ├── SolarCalculator.cs # NOAA solar position algorithm
│ ├── SolarForensicsService.cs # Shadow/timestamp validation
│ ├── ForgeryAnalyzer.cs # Error Level Analysis (ELA)
│ ├── StreetClassifierService.cs # ONNX model inference
│ ├── ReportGenerator.cs # PDF report output
│ ├── RiskScoring/ # Decorator pattern scoring
│ └── Rules/ # EXIF-based risk rules
├── Models/ # Data models + ML artifacts
│ ├── ScanResult.cs
│ ├── RiskDetail.cs
│ ├── street_classifier.onnx # Trained ResNet18 model
│ └── class_labels.json
├── Data/ # Entity Framework + SQLite
├── ExifRiskAuditor.UI/ # WPF desktop application
│ ├── MainWindow.xaml # Drag-and-drop UI
│ └── ViewModels/ # MVVM view models
├── StreetClassifierTraining/ # Python ML pipeline
│ ├── train_model.py # ResNet18 transfer learning
│ ├── download_and_extract.py # Dataset collection from YouTube
│ └── test_ui.py # Gradio testing interface
└── Migrations/ # EF Core database migrations
| Layer | Technology |
|---|---|
| Backend | .NET 9.0, C# |
| UI | WPF + Material Design, MVVM (CommunityToolkit) |
| AI/ML | Google Gemini API, ONNX Runtime, ResNet18 |
| Image Processing | SixLabors.ImageSharp, MetadataExtractor |
| Database | SQLite + Entity Framework Core 9.0 |
| PDF Generation | QuestPDF |
| ML Training | Python, PyTorch, torchvision |
| Dataset Tools | yt-dlp, ffmpeg |
Image Input
↓
┌─ EXIF Extraction (GPS, Camera, Software, Date)
├─ Solar Forensics (Sun position vs shadow validation)
├─ ELA Forgery Detection (Compression artifact analysis)
├─ Gemini AI Analysis (Location OSINT + forgery scoring)
└─ Street Classifier (ONNX inference + region validation)
↓
Risk Score Calculation (Decorator pattern, 0-100)
↓
Output: UI Display / PDF Report / SQLite Storage
| Risk Factor | Points | Trigger |
|---|---|---|
| GPS Location Data | +40 | EXIF contains coordinates |
| Face Detection | +25 | Identity exposure risk |
| Device Fingerprint | +15 | Camera model identified |
| Recent Content | +10 | Photo taken within 1 year |
| High Resolution | +10 | Enables biometric analysis |
| Software Traces | +5 | Editing software detected |
| Manipulation | x1.5 | AI forgery score > 50% |
- .NET 9.0 SDK
- Google Gemini API key (for AI analysis features)
- Python 3.8+ (only for ML training pipeline)
-
Clone the repository
git clone https://github.com/yourusername/ExifRiskAuditor.git cd ExifRiskAuditor -
Set the Gemini API key
# Windows (PowerShell) $env:GEMINI_API_KEY="your-api-key-here" # Linux/macOS export GEMINI_API_KEY="your-api-key-here"
-
Build and run (Console)
dotnet build dotnet run
-
Build and run (WPF UI)
dotnet build ExifRiskAuditor.UI/ExifRiskAuditor.UI.csproj dotnet run --project ExifRiskAuditor.UI
The street classifier model is pre-trained and included as Models/street_classifier.onnx. To retrain:
cd StreetClassifierTraining
pip install torch torchvision onnx pillow
python train_model.pyDataset collection from YouTube walking tours:
pip install yt-dlp
python download_and_extract.pyConsole interface and WPF UI screenshots coming soon.
- Console App (
Program.cs) - Interactive CLI with menu-driven analysis, history search, and record management - WPF App (
ExifRiskAuditor.UI/) - Drag-and-drop interface with Material Design, real-time analysis display, and map integration - Street Classifier - Trained on Istanbul street-level imagery (Abdi Ipekci Caddesi, Harbiye, Gezi Parki) with 5km validation radius
This project is licensed under the MIT License. See LICENSE for details.