Skip to content

About

Detect and sanitize imperceptible digital watermarks and steganographic payloads across spatial and frequency domains. 100% offline. 检测并去除图像中的暗水印与频域载荷,纯本地离线处理。

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

13 stars

Watchers

1 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

Logo

Watermark Detector and Cleaner

License: MIT Language GUI OpenCV

Detect and sanitize imperceptible digital watermarks and steganographic payloads across spatial and frequency domains. 100% offline & local processing.

Screenshot

✨ What's New

  • Modern UI & Asynchronous Engine: Fully redesigned with CustomTkinter. Features True Dark/Light modes, frameless dialogs, and a non-blocking asynchronous multi-threaded backend.
  • Advanced 4-Layer Detection:
    • LSB (Spatial): Scans the least significant bits.
    • FFT, DCT, DWT (Frequency): Analyzes geometric patterns in Fourier and Wavelet spectrums.
  • Adaptive Clearance Modes: Aggressive (maximum removal), Balanced (recommended), Conservative (quality preservation).
  • Privacy Engine:
    • Rand Name: Renames the output file with a cryptographically random 12-character alphanumeric string.
    • Rand Size: Invokes an imperceptible micro-crop (±2px) to neutralize resolution-dependent fingerprinting.
    • Force JPEG: Compresses lossless images to strip container-level steganography.

🛠️ Usage

Quick Start (No Installation)

  1. Clone the repo and install dependencies:
git clone https://github.com/AndrewWangDev/remove_watermark.git
cd remove_watermark
pip install -r requirements.txt
  1. Launch the app:
python src/main.py
  1. Workflow: Browse for an input image -> Select your detection/privacy parameters -> Hit Detect Watermarks (to scan) or Clean & Save (to output the neutralized image).

📊 Scoring & Verification

The Detection Engine runs an empirical mathematical analysis across 4 frequency and spatial dimensions to compute anomaly scores and determine a global confidence probability:

--- Starting DETECT ---
Method:     | LSB       | FFT       | DCT       | DWT       | 
Score:      | 0.32      | 28.50     | 142.10    | 12.40     | 
Result:     | Clean     | Clean     | Clean     | Clean     | 
Conclusion: The image is clean / unlikely to be watermarked (0% probability).
            No significant watermark signatures detected.
--- DETECT Finished ---
  • LSB (Spatial): Measures spatial transition probability and difference energy in lowest bit-planes. Natural images have smooth neighborhoods (< 0.45); pseudo-random or encrypted steganographic payloads converge towards Bernoulli white noise (~0.500).
  • FFT / DCT / DWT: Identifies geometric spikes, mid-frequency AC clusters, and wavelet high-frequency anomalies via fully vectorized transforms.
  • Global Probability: A deterministic, multi-feature weighted confidence model (Weighted Confidence Evaluation). If no watermarks are detected, the score deterministically resolves to 0%.

🧠 Core Algorithm Architecture

This application employs a dual-domain analysis to detect and sanitize steganographic artifacts:

    [ Original Suspicious Image ]
                  │
                  ▼
 ┌─────────────────────────────────┐
 │   Spatial Domain Analysis       │
 │   (Extracting LSB Bit-Planes)   │ ──► LSB Detection
 └─────────────────────────────────┘
                  │
       (FFT / DCT / DWT Transform)
                  │
                  ▼
 ┌─────────────────────────────────┐
 │  Frequency Domain Manipulation  │
 │  * Target High-Frequency Spikes │ ──► FFT/DCT/DWT Detection
 │  * Apply Low-Pass / Masking     │
 └─────────────────────────────────┘
                  │
       (Inverse Transformation)
                  │
                  ▼
      [ Sanitized Clean Image ]

🏗️ Tech Stack

  • Backend Algorithms: OpenCV (cv2), Numpy, PyWavelets
  • Frontend Engine: CustomTkinter (Tkinter Wrapper)
  • Packaging: PyInstaller + Pillow

⚖️ Disclaimer & Educational Purpose

This software is developed strictly for academic research, digital image forensics, and privacy preservation (PETs).

  • It demonstrates mathematical signal-filtering methodologies (Fourier, Cosine, Wavelet, and Spatial LSB analyses) and evaluates the robustness of digital steganography schemes.
  • The authors and maintainers do NOT condone, support, or encourage the use of this tool to bypass lawful corporate security controls, violate Non-Disclosure Agreements (NDAs), infringe intellectual property rights, or commit unauthorized data exfiltration.
  • Users are solely responsible for ensuring that their use of this software complies with all applicable local laws, organizational confidentiality policies, and terms of service.

About

Detect and sanitize imperceptible digital watermarks and steganographic payloads across spatial and frequency domains. 100% offline. 检测并去除图像中的暗水印与频域载荷,纯本地离线处理。

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

13 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages