Multi-Class Watermark & Camera Stamp Dataset (Round 18 Champion)
This repository contains the complete dataset, augmentation assets, and real-world evaluation benchmarks used to train the Champion 3-Class Watermark Classifier (wm_3class_v18_scratch.pt).
The dataset addresses a critical problem in media ingestion: automatically excluding produced media, broadcast stills, and stock photography without falsely excluding authentic personal photographs (0.00% false alarms on personal photos and challenging hard negatives).
1. Dataset Overview
- Round-18 training set: 65,733 images in 21,911 aligned triplets (train 56,280 images, validation 9,453). The images themselves are not stored here; section 3 shows how to generate an equivalent set.
- Classes (3-way):
0: cleanβ Authentic personal photographs, public events, street scenes, and challenging hard negatives (foliage, glass reflections, barcodes).1: publisherβ Publisher watermarks, TV channel bugs (BBC News, PBS NewsHour, Fox News), stock photography previews (Dreamstime, Getty, Shutterstock), and agency credits.2: cameraβ Authentic smartphone camera timestamps and model watermarks (Huawei, Oppo, Samsung, Xiaomi, Vivo, Tecno, etc.).
- Aligned Triplet Structure: Every sample belongs to an aligned triplet sharing the exact same base canvas image, ensuring the classifier isolates the watermark signal rather than background scene semantics.
2. Directory Structure
Everything except this card is in one archive, watermark-benchmark-v18.tar.gz. Unpack it next to this README with tar xzf watermark-benchmark-v18.tar.gz. The tree below is the layout after unpacking.
.
βββ README.md # Hugging Face Dataset Card
βββ augmentation/ # Raw assets used to synthesize the dataset
β βββ marks/ # 2,796 transparent PNG overlay marks
β β βββ manifest.json # Metadata for all vector SVGs and procedural marks
β βββ bases/ # 6,528 clean base photographs; every triplet is generated from these
β βββ bases_manifest.json # Base image mappings and origin categories
β βββ bases_v21/ # 321 more clean bases that round 21 trained on (see below)
β βββ bases_v21_manifest.json # Their mappings, round-21 fold, and Wikimedia source and title
β βββ scripts/ # generate_pairs.py builds the triplets, mark_boxes.py their mark boxes
βββ benchmarks/ # Real-world evaluation benchmarks
β βββ news_broadcast_stills/ # 139 authentic TV news broadcast frames
β βββ hard_negatives/ # 880 Wikimedia challenging photos (glass, foliage, barcodes)
β βββ camera_watermarks/ # 131 harvested handset camera watermark test photos
β βββ glm_verified_testset/ # 259 GLM-verified gold standard benchmark images & labels
βββ upload_to_hf.py # 1-click script to upload to Hugging Face Hub
3. Generating the Triplets
The triplets are not stored. Only the clean base photographs and the marks are, and generate_pairs.py builds the clean, publisher and camera images from them. It is deterministic, so every run with the same arguments writes byte-identical images. It needs Pillow, NumPy and the DejaVuSans font.
huggingface-cli download langminer/watermark-benchmark-v18 --repo-type dataset --local-dir watermark-benchmark-v18
tar xzf watermark-benchmark-v18/watermark-benchmark-v18.tar.gz -C watermark-benchmark-v18
cd watermark-benchmark-v18/augmentation/scripts
python generate_pairs.py --out ../../pairs # pairs/{train,val}/{clean,wm,cam}/<id>.jpg + pairs/manifest.jsonl
python mark_boxes.py ../../pairs # pairs/boxes.json: the box of the mark in every wm and cam image
manifest.jsonl has one row per image with its label (clean, wm = publisher, cam = camera), fold, base photograph, JPEG quality, and for marked images the mark file, style, kind, tint and opacity.
With the defaults it writes 65,718 images in 21,906 triplets (train 18,706, val 3,200; 94 bases dropped because no mark stayed visible on them), about 3.5 GB. It took about 3 minutes on 16 cores. These are not the exact images the round-18 model was trained on, because the round-18 run drew from a larger pool and an earlier version of composite.py, but the design and class balance are the same.
Round-21 clean bases
Round 21 (wm_3class_v21_scratch) drew its triplets from 1,353 bases. 1,032 of them are already in bases/. The other 321 are in bases_v21/:
bases_v21/verified_clean_bases_v19/holds 320 Wikimedia Commons photographs chosen as hard negatives: fireworks, concerts, high-visibility vests, sports, bottles, receipts, screens, museum pieces, geometric patterns and gatherings. Each one was checked for a mark of its own before it was admitted.bases_v21_manifest.jsongives each photo's Commons title and source URL.bases_v21/real_photo/real_lectern_speech/v10_302.jpgis one more press photograph.
They are kept out of bases_manifest.json on purpose, so generate_pairs.py still draws only the round-18 pool and the numbers above still hold. The published generator is the round-18 version, so these bases are here as data. They do not make round 21 reproducible on their own.
4. Benchmark Results on Champion Model (v18)
| Benchmark Set | Round 16 (v16) |
Round 17 (v17) |
Round 18 (v18) |
|---|---|---|---|
| Dev Selection Metric ($F_{0.5}$) | $0.9723$ | $0.9705$ | 0.9742 |
| Dev Precision / Recall | $97.1% / 93.5%$ | $97.6% / 94.7%$ | 98.2% / 94.5% |
| GLM-Verified Test MCC (259 images) | $0.9241$ | $0.9380$ | 0.9541 |
| GLM-Verified Test AUC | $0.9972$ | $0.9972$ | 0.9951 |
| News Broadcast Bugs Recall | $34.4%$ | $49.0%$ | 72.9% (78.1% FP32) |
| Real Personal Album FA (6,365 photos) | $0.00%$ | $0.00%$ | 0.00% @ Cut +5.0 |
| Challenging Hard Negatives (880 photos) | $0.00%$ | $0.00%$ | 0.00% @ Cut +5.0 |
5. License & Citation
The synthetic dataset, annotations, and marks are released under the Apache 2.0 License.
Base photographs originate from Creative Commons sources (Wikimedia, Flickr CC-BY, and public domain collections).
- Downloads last month
- 849