Skip to content

Add 3D mesh watermarking toolkit#1

Open
gitlujean wants to merge 1 commit intomasterfrom
codex/implement-3d-model-watermarking-algorithm
Open

Add 3D mesh watermarking toolkit#1
gitlujean wants to merge 1 commit intomasterfrom
codex/implement-3d-model-watermarking-algorithm

Conversation

@gitlujean
Copy link
Copy Markdown
Owner

Motivation

  • Provide a pure-Python toolkit to embed and extract a vertex-index-based digital watermark for 3D triangle/polygon meshes that is robust to common geometry-preserving attacks.
  • Use a stable axial partitioning and index-relabelling approach so the embedding is geometry‑lossless (no coordinate changes) while remaining tolerant to similarity transforms, mild smoothing, noise and simple simplification.

Description

  • Add a watermark3d package implementing the algorithm and utilities, including watermark.py (stable-axis PCA, rank-based interval assignment, embed_watermark, extract_watermark, bit_error_rate) and configuration via WatermarkConfig with a repetition code (repeats).
  • Add mesh.py to load/save OBJ and ASCII PLY meshes while preserving OBJ face token suffixes and synchronously rewriting face indices after relabeling vertices.
  • Add simple attack simulators in attacks.py (similarity transform, controlled noise, Laplacian smoothing, order-preserving vertex decimation) and a CLI watermark3d/cli.py exposing embed/extract operations with metadata and BER reporting.
  • Add scripts/test_directory.py to run directory-level experiments (auto-generate a sample mesh if none provided) and produce watermark_report.json, and update README.md with algorithm details, usage and robustness notes.

Testing

  • Compiled all modules with python -m py_compile watermark3d/*.py scripts/test_directory.py and the compilation succeeded.
  • Ran the directory test runner on generated sample meshes with python scripts/test_directory.py --input-dir /tmp/wm_ci_in --output-dir /tmp/wm_ci_out --bits 1011001110001011 --repeats 3 --make-sample-if-empty and the produced report showed successful embedding and extraction (BER=0.0) for the final tuned settings.
  • Verified single-file CLI flows with python -m watermark3d.cli embed ... and python -m watermark3d.cli extract ... which returned the expected bitstring and BER=0.0 in the tested cases.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant