How nnyang0918/screen-shooting-watermark works
Project Type and Purpose
• This is an academic/research codebase implementing “An End-to-End Robust and Transparent Image Watermarking Method for Screen-Shooting Scenarios.”
• It is not a full-stack web application but rather a signal-processing/ML pipeline tool that embeds watermarks into images, simulates screen-shooting distortions (angle, distance), and then extracts and evaluates the watermark.
File Structure Analysis
• Root directory contains:
• README.md – high-level project description and link to full dataset
• angle/ – module for evaluating the watermarking under varied camera angles
· angle/README.md – example and instructions for angle experiments
• distance/ – module for evaluating under varied shooting distances
· distance/readME.md – example and instructions for distance experiments
• No traditional “src,” “lib,” or “tests” directories; instead the code is organized by distortion type.
Key Components
a. Data Ingestion
– Input Plain Images (from Google Drive link)
b. Watermark Embedding Module
– Embeds a transparent watermark into each input image
– Likely implemented in Python using OpenCV or a DL framework (PyTorch/TensorFlow)
c. Distortion Simulation Modules
– Angle Simulation (angle/ directory) – applies geometric transforms to simulate different camera angles
– Distance Simulation (distance/ directory) – applies scaling, blurring to simulate different shooting distances
d. Watermark Extraction Module
– Takes the distorted (screen-captured) image and recovers the embedded watermark
e. Evaluation & Metrics
– Compares recovered watermark with original
– Computes robustness metrics (e.g., PSNR, SSIM, bit-error rate)
f. External Dependencies and Data Storage
– Google Drive for storing full datasets
– Standard Python libraries (list as notes): OpenCV, NumPy, PIL, DL framework
Relationships and Data Flow
1. “Input Image” →
2. “Embedder” →
3. “Watermarked Image” →
4. [fork] → “Angle Simulation” → Distorted-Angle Image → “Extractor” → Recovered Watermark
→ “Distance Simulation” → Distorted-Distance Image → “Extractor” → Recovered Watermark
5. “Evaluator” computes metrics on each recovery
• That both simulation modules feed into the same extraction and evaluation steps.
Architectural Patterns and Design Principles
• Pipeline Pattern (linear data flow with branches)
• Modular separation by distortion type (angle vs distance)
• Reuse of core modules (Embedder, Extractor, Evaluator) across experiments
• External data decoupling (large datasets stored on Google Drive)
Detailed Level
• Configuration parameters (angle range, distance blur kernel size) if desired.
• Branching clearly: one main embedder feeding two separate simulation flows.