Invisible Image Watermarking & Traitor Identification System
Traitor-tracker is a robust, web-based security system that embeds invisible watermarks into digital images, enabling seamless source tracking and traitor identification. Built with Python and Flask, the system not only embeds cryptographic identifiers but also evaluates the watermark's robustness under various real-world attacks.
Whether an image is cropped, resized, compressed, or injected with noise, Traitor-tracker attempts to extract the embedded identity to trace the origin of unauthorized leaks.
- 🛡️ Invisible Watermarking: Embeds unique user identifiers directly into the spatial/frequency domain of an image, imperceptible to the naked eye.
- 🔍 Traitor Identification: Extracts the watermark from a suspected leaked image and matches it against the database to catch the culprit.
- ⚔️ Attack Evaluation: Simulates real-world alterations to evaluate watermark robustness and survivability.
- 📊 Similarity Analysis: Uses advanced similarity-based detection with interpretable failure analysis to judge watermark degradation.
- 🚀 Cloud-Ready: Pre-configured for seamless deployments on modern platforms like Vercel and Render.
- 🧩 Modular Architecture: Extensible design making it easy to plug in new watermarking algorithms or attack models.
- Accepts an original image and a unique user identifier.
- Generates a cryptographically secure hash to function as the watermark.
- Embeds the invisible watermark and stores the metadata securely in a PostgreSQL database.
- Takes in a potentially compromised/leaked image.
- Attempts to extract the residual watermark data.
- Cross-references the extracted data with the database.
Evaluates watermark robustness by applying standard degradation attacks:
| Attack Type | Description |
|---|---|
| Crop | Removes a portion of the image to test partial recovery. |
| Resize | Scales the image resolution up or down. |
| Noise | Adds Gaussian noise to disrupt pixel-level data. |
| Compress | Applies heavy JPEG compression to filter out high-frequency details. |
| All | Runs all attacks sequentially to simulate worst-case scenarios. |
- Backend: Python, Flask, Gunicorn
- Image Processing: OpenCV, NumPy
- Signal Processing: SciPy, PyWavelets
- Database: PostgreSQL (via psycopg2)
- Security: Cryptography module
- Frontend: HTML5, CSS3, Jinja2 Templates
Make sure you have Python 3.9+ and PostgreSQL installed.
git clone https://github.com/forex911/Traitor_Tracker.git
cd Traitor_Trackerpython -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the root directory for your database configuration:
DB_HOST=localhost
DB_PORT=5432
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=traitor_trackerpython app.pyAccess the application at: http://127.0.0.1:5000
Traitor-tracker is configured for instant serverless/PaaS deployment.
- Import the repository into your Vercel dashboard.
- Vercel will automatically use the
vercel.jsonfile to configure the Python serverless environment. - Add your
DB_*variables in the Vercel Settings, and addVERCEL=1to use the/tmpdirectory for ephemeral storage.
- Connect the repository to your Render dashboard.
- Render will automatically detect the
render.yamlconfiguration. - Provide the environment variables, and the app will start instantly via Gunicorn.
- High Similarity: Safely maintained for non-attacked images.
- Noise Resilience: Operates robustly under minor noise injections.
- Geometric Vulnerability: Shows degradation under severe geometric attacks (like aggressive cropping) – a well-known limitation of spatial-domain watermarking.
- Implement Frequency-domain watermarking (DCT / DWT).
- Integrate Error-Correction Coding (ECC) for improved data recovery.
- Adaptive thresholding per attack type.
Contributions, issues, and feature requests are welcome! Feel free to check out the issues page to see what we're working on.
This project is licensed under the MIT License.
Note: This project is designed as an educational and research-oriented system. Observed failures under certain attacks are expected behavior and are clearly reported and analyzed for transparency.