Metadata-Version: 2.4
Name: phorensics
Version: 0.1.1
Summary: An unbiased physics and spectral forensics engine for deepfake detection.
Author-email: Anuran <bhattacharyaanuran45@gmail.com>
Project-URL: Homepage, https://github.com/anuran44/PHORENSICS-Deepfake-Detection
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Security
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: torch>=2.0.0
Requires-Dist: numpy>=1.21.0
Requires-Dist: opencv-python-headless>=4.5.0
Requires-Dist: tqdm>=4.65.0

# Phorensics 🛡️

**Phorensics** is an industrial-grade, unbiased physics and spectral forensics engine for deepfake and image manipulation detection. 

Instead of relying solely on pattern-matching neural networks (which can be easily tricked by new AI generators), Phorensics interrogates the **physical properties** of light, digital compression, and sensor noise to mathematically verify an image's authenticity.

## Features
* **Fast Fourier Transform (FFT) Tests:** Detects the unnatural decay of high-frequency spatial energy typical of Generative AI.
* **Error Level Analysis (ELA):** Isolates localized JPEG compression anomalies to detect spliced objects.
* **PRNU Sensor Noise Tracking:** Analyzes microscopic digital "dust" left by camera sensors to find erased or overwritten sections.
* **RGB Matrix Correlation:** Detects unnatural color channel separation that breaks physical light constraints.
* **Dynamic VRAM Scaling:** Automatically utilizes GPU acceleration via PyTorch, but safely hot-swaps to CPU if VRAM is exceeded.

---

## ⚙️ Installation

```bash
pip install phorensics

Usage :-
python -m phorensics "path/to/suspect_image.jpg"
