Veritas is a comprehensive web-based digital forensics tool for detecting image forgeries and manipulations using 13 advanced analysis techniques.
- Error Level Analysis (ELA) - Multi-quality compression artifact detection
- Metadata Forensics - EXIF analysis, GPS extraction, thumbnail inconsistencies
- Histogram Analysis - Statistical color distribution patterns
- Noise Inconsistency - High-pass filtering for tampered regions
- JPEG Ghost Detection - Multi-level compression artifacts
- Quantization Table Analysis - JPEG compression table forensics
- Copy-Move Forgery Detection (CMFD) - Duplicated region detection
- PRNU Analysis - Photo Response Non-Uniformity (sensor fingerprints)
- Frequency Domain Analysis - FFT/DCT-based tampering detection
- Deepfake Detection - GAN artifact classification
- Resampling Detection - Image resizing and interpolation artifacts
- Steganography Detection - LSB statistical analysis for hidden data detection
- Hash Verification - Cryptographic provenance tracking and authentication
- 🔐 LSB Steganography Detection - Chi-square testing for hidden data in Least Significant Bits
- 🔑 Blockchain-Based Provenance - Cryptographic and perceptual hash verification
- ⚖️ Legal Chain of Custody - Track image modifications with timestamps
- 🔒 SHA-256 Integrity - Exact file matching for evidence verification
- 👁️ Perceptual Hashing - Detect similar images despite minor modifications
- Technique Descriptions - Built-in educational guides for each analysis method
- Default Sample Image - Preloaded image for instant testing without upload
- Web-based Interface - No installation required, runs in browser
- Dark Theme - Professional forensic UI with neon accents
- 14 Analysis Tabs - Organized, intuitive workflow
- Human-Readable Results - Authenticity scoring (0-100) and risk levels
- Real-time Processing - Instant visual feedback
- Cloud Deployment Ready - Deploy to Streamlit Cloud in minutes
- Python 3.9 or higher
- 2GB RAM minimum
- Modern web browser (Chrome, Firefox, Edge)
git clone https://github.com/CodeRafay/Forensic-Image-Analysis-Toolkit.git
cd Forensic-Image-Analysis-Toolkit# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtstreamlit run app.pyThe application will automatically open in your default browser at http://localhost:8501
VeritasForensics/
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── requirements-dev.txt # Development dependencies
├── projectSetup.md # Detailed setup guide
├── README.md # This file
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # Contribution guidelines
├── LICENSE # BSD 3-Clause License
├── pytest.ini # Test configuration
├── .gitignore # Git ignore rules
├── .pre-commit-config.yaml # Pre-commit hooks
├── TECHNIQUE_DESCRIPTIONS_USER_GUIDE.md # User guide for descriptions
│
├── analysis/ # Forensic analysis modules
│ ├── __init__.py
│ ├── ela.py # Error Level Analysis
│ ├── metadata_analysis.py # EXIF + file forensics
│ ├── histogram_analysis.py # Statistical analysis
│ ├── noise_map.py # Noise inconsistency
│ ├── jpeg_ghost.py # Compression artifacts
│ ├── quant_table.py # JPEG quantization
│ ├── cmfd.py # Copy-move detection
│ ├── prnu.py # Sensor fingerprint
│ ├── frequency_analysis.py # FFT/DCT analysis
│ ├── deepfake_detector.py # GAN detection
│ ├── resampling_detector.py # Resampling detection
│ ├── steganography_detection.py # LSB steganography detection
│ ├── hash_verification.py # Cryptographic provenance
│ └── util.py # Helper functions
│
├── Descriptions/ # Technique education module (NEW)
│ ├── ELA.md # ELA guide
│ ├── Metadata.md # Metadata guide
│ ├── Steganography.md # Steganography detection guide
│ ├── Hash_Verification.md # Hash verification guide
│ ├── Histogram.md # Histogram guide
│ ├── Noise_Ghost.md # Noise/Ghost guide
│ ├── Quantization.md # Quantization guide
│ ├── CMFD.md # CMFD guide
│ ├── PRNU.md # PRNU guide
│ ├── Frequency.md # FFT/DCT guide
│ ├── Deepfake.md # Deepfake guide
│ └── Resampling.md # Resampling guide
│
├── docs/ # Documentation
│ ├── API.md # API documentation
│ ├── DEPLOYMENT.md # Deployment guide
│ ├── PROJECT_SUMMARY.md # Project overview
│ └── TECHNIQUES.md # Techniques reference
│
├── tests/ # Unit tests
│ ├── __init__.py
│ ├── test_ela.py # ELA tests
│ ├── test_metadata.py # Metadata tests
│ └── test_integration.py # Integration tests
│
├── assets/ # Static files
│ ├── style.css # Custom CSS
│ └── sample images/ # Sample test images
│ └── sampleImg.jpeg # Default sample image
│
├── .streamlit/ # Streamlit config
│ └── config.toml # Theme & server settings
│
└── temp/ # Temporary processing files
└── .gitkeep
- View Sample Image: App loads with default sample image automatically
- Upload Your Image (Optional): Click "Choose an Image" in sidebar to analyze your own
- Learn About Techniques: Click technique description buttons in sidebar for guidance
- Select Analysis Tab: Navigate to the technique you want to use
- Configure Parameters: Adjust sliders/options as needed
- Run Analysis: Click the analysis button
- Review Results: View visualizations, authenticity scores, and interpretations
Access built-in educational guides via sidebar buttons:
- 📚 Technique Descriptions Section - Click any technique to learn
- Non-technical explanations - Understand what each tool does
- Interpretation guides - Learn to read results (normal vs. suspicious)
- Real-world examples - See practical use cases
- Limitations explained - Understand reliability and caveats
Detects compression artifacts by comparing the original image with a recompressed version. Manipulated regions show different error levels.
Use Case: Quick initial screening for tampering
Examines EXIF data, timestamps, GPS coordinates, and software signatures for inconsistencies.
Use Case: Verify image authenticity and origin
Analyzes color distribution patterns. Manipulated regions often show statistical anomalies.
Use Case: Detect color/brightness adjustments
Uses high-pass filtering to detect regions with different noise characteristics.
Use Case: Identify spliced or cloned regions
Performs multiple recompressions to detect prior editing cycles.
Use Case: Determine editing history
Identifies duplicated regions within the same image.
Use Case: Detect cloning tools usage
Extracts sensor-specific noise patterns unique to each camera.
Use Case: Verify camera source consistency
Analyzes FFT/DCT coefficients for manipulation artifacts.
Use Case: Detect advanced editing techniques
Identifies GAN-generated or AI-manipulated faces.
Use Case: Detect synthetic or deepfake images
Identifies traces of image resizing or interpolation.
Use Case: Detect resolution manipulation
Edit .streamlit/config.toml:
[theme]
base="dark"
primaryColor="#00ff41" # Neon green accent
backgroundColor="#0e1117"
secondaryBackgroundColor="#262730"
textColor="#fafafa"- Push code to GitHub
- Go to share.streamlit.io
- Connect your GitHub repository
- Select
app.pyas the main file - Click "Deploy"
- ELA: ~2-5 seconds per image
- Metadata: <1 second
- Histogram: ~1-2 seconds
- CMFD: ~10-30 seconds (depending on image size)
- Deepfake: ~5-10 seconds
- PRNU: ~15-30 seconds
Benchmarked on Intel i5, 8GB RAM, 1920x1080 images
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
- Streamlit - For the excellent web framework
- PIL/Pillow - Image processing library
- OpenCV - Computer vision algorithms
- SciPy - Scientific computing tools
- Farid, H. (2009). "Image Forgery Detection"
- Fridrich, J. (2009). "Digital Image Forensics"
- Bayar, B. & Stamm, M. (2018). "Constrained Convolutional Neural Networks"
- Author: CodeRafay
- GitHub: @CodeRafay
- Repository: Forensic-Image-Analysis-Toolkit
- Batch processing for multiple images
- PDF report generation
- Machine learning-based forgery classifier
- Video frame analysis
- REST API for integration
⭐ If you find this project useful, please star it on GitHub!