diff --git a/.gitignore b/.gitignore index a039e0d3..4a6ecced 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ /docs/rust-sdk/docs/*.md /docs/**/readme.md /static/sb-alg-list.json +/docs/trustmark/*.md # Misc .DS_Store diff --git a/docs/trustmark-faq.mdx b/docs/trustmark-faq.mdx new file mode 100644 index 00000000..4cb36671 --- /dev/null +++ b/docs/trustmark-faq.mdx @@ -0,0 +1,52 @@ +--- +id: tm-faq +title: TrustMark FAQ +hide_table_of_contents: true +--- + +- [General Usage and Adoption](#general-usage-and-adoption) + - [What is TrustMark?](#what-is-trustmark) + - [How does TrustMark compare to traditional visible watermarks?](#how-does-trustmark-compare-to-traditional-visible-watermarks) + - [What is this software?](#what-is-this-software) + - [Can I integrate TrustMark into my own application?](#can-i-integrate-trustmark-into-my-own-application) + - [Can I use TrustMark in commercial projects?](#can-i-use-trustmark-in-commercial-projects) + - [Why would I want to make an image identifiable using TrustMark?](#why-would-i-want-to-make-an-image-identifiable-using-trustmark) + - [Can TrustMark be embedded in any images, including those generated by AI?](#can-trustmark-be-embedded-in-any-images-including-those-generated-by-ai) + - [How does TrustMark align with provenance standards such as the C2PA?](#how-does-trustmark-align-with-provenance-standards-such-as-the-c2pa) + - [Does TrustMark alter metadata or EXIF information?](#does-trustmark-alter-metadata-or-exif-information) +- [Technical Details](#technical-details) + - [Does TrustMark support my image format?](#does-trustmark-support-my-image-format) + - [Does TrustMark work on grayscale images?](#does-trustmark-work-on-grayscale-images) + - [How fast is TrustMark?](#how-fast-is-trustmark) + - [What are the image resolution limits of TrustMark?](#what-are-the-image-resolution-limits-of-trustmark) + - [How robust is TrustMark?](#how-robust-is-trustmark) + - [Can I print TrustMark?](#can-i-print-trustmark) + - [Can TrustMark be embedded in vector graphics?](#can-trustmark-be-embedded-in-vector-graphics) + - [What dataset was TrustMark trained on?](#what-dataset-was-trustmark-trained-on) + - [What happens if I apply TrustMark to an already watermarked image?](#what-happens-if-i-apply-trustmark-to-an-already-watermarked-image) + - [How does TrustMark compare to State of the Art Watermarking approaches](#how-does-trustmark-compare-to-state-of-the-art-watermarking-approaches) + - [Can TrustMark co-exist with other watermarks?](#can-trustmark-co-exist-with-other-watermarks) +- [Configuration](#configuration) + - [Which variant of TrustMark should I use?](#which-variant-of-trustmark-should-i-use) + - [How can I trade off between robustness and capacity?](#how-can-i-trade-off-between-robustness-and-capacity) + - [How can I trade off between robustness and quality?](#how-can-i-trade-off-between-robustness-and-quality) + - [Can I control where the watermark is embedded in an image?](#can-i-control-where-the-watermark-is-embedded-in-an-image) + - [Does TrustMark affect the file size of an image?](#does-trustmark-affect-the-file-size-of-an-image) +- [Security and Privacy](#security-and-privacy) + - [Can TrustMark be removed?](#can-trustmark-be-removed) + - [Can TrustMark be used to track users or infringe on privacy?](#can-trustmark-be-used-to-track-users-or-infringe-on-privacy) + - [Can TrustMark be used to secretly mark images without user consent?](#can-trustmark-be-used-to-secretly-mark-images-without-user-consent) + - [Is TrustMark steganographic watermarking?](#is-trustmark-steganographic-watermarking) + - [Why release removal code?](#why-release-removal-code) + - [Does TrustMark interfere with other AI or image processing tasks like object detection?](#does-trustmark-interfere-with-other-ai-or-image-processing-tasks-like-object-detection) + - [Can TrustMark be used to detect image manipulation?](#can-trustmark-be-used-to-detect-image-manipulation) + - [Can TrustMark be transferred from one image to another?](#can-trustmark-be-transferred-from-one-image-to-another) + - [What stops someone from spoofing a TrustMark?](#what-stops-someone-from-spoofing-a-trustmark) +- [Future Developments](#future-developments) + - [Will TrustMark support other media types like video?](#will-trustmark-support-other-media-types-like-video) + - [Is TrustMark compatible with blockchain technology?](#is-trustmark-compatible-with-blockchain-technology) + - [Can TrustMark be used for NFT provenance?](#can-trustmark-be-used-for-nft-provenance) + +import Faq from './trustmark/faq.md'; + + diff --git a/docs/trustmark-intro.md b/docs/trustmark-intro.md new file mode 100644 index 00000000..096c257a --- /dev/null +++ b/docs/trustmark-intro.md @@ -0,0 +1,36 @@ +--- +id: trustmark-intro +title: TrustMark watermarking +--- + +TrustMark is an open-source universal watermarking system for images that: + +- Can encode, decode, and remove watermarks from images. +- Works with arbitrary resolution images. +- Has implementations in both Python (using PyTorch) and JavaScript (using ONNX). + +:::info +For full technical details and help getting started with TrustMark, see [TrustMark - Overview](trustmark/readme.md). +::: + +## Variants + +TrustMark has three primary model variants, each with different characteristics. + +Images encoded with one variant cannot be decoded with another variant, so you need to stick with the same variant throughout your pipeline. + +- **Variant Q (Default)** Use in most cases, where you want a good balance between robustness and imperceptibility. PSNR is 43-45 dB. +- **Variant P** - Use when image quality is the top priority. PSNR is 48-50 dB. +- **Variant C (Compact)** - Use if you need to minimize model size and can live with slightly lower visual quality. PSNR is 38-39 dB. + +The general recommendation is to use either: +- Variant Q for most use cases. +- Variant P when visual quality is paramount. + +## About PSNR + +PSNR (Peak Signal-to-Noise Ratio) is a measure of image quality when comparing an original image to the watermarked image. PSNR is measured in decibels (dB), with higher values indicating better quality: +- Values around 45+ dB typically indicate very good quality. +- Values around 40 dB indicate acceptable quality. +- Values below 30 dB indicate poor quality, unacceptable for most uses. + diff --git a/docs/trustmark/.gitkeep b/docs/trustmark/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/scripts/fetch-readme.js b/scripts/fetch-readme.js index 903baf2a..7f2d3bc2 100644 --- a/scripts/fetch-readme.js +++ b/scripts/fetch-readme.js @@ -194,6 +194,32 @@ const readmes = [ repo: 'c2pa-org/softbinding-algorithm-list', path: 'softbinding-algorithm-list.json', }, + // TrustMark + { + dest: resolve(__dirname, '../docs/trustmark/readme.md'), + repo: 'adobe/trustmark', + path: 'README.md', + }, + { + dest: resolve(__dirname, '../docs/trustmark/config.md'), + repo: 'adobe/trustmark', + path: 'CONFIG.md', + }, + { + dest: resolve(__dirname, '../docs/trustmark/faq.md'), + repo: 'adobe/trustmark', + path: 'FAQ.md', + }, + { + dest: resolve(__dirname, '../docs/trustmark/python-readme.md'), + repo: 'adobe/trustmark', + path: 'python/README.md', + }, + { + dest: resolve(__dirname, '../docs/trustmark/js-readme.md'), + repo: 'adobe/trustmark', + path: 'js/README.md', + }, ]; function resolveMarkdownLinks(linkBase, content) { diff --git a/sidebars.js b/sidebars.js index e618ab04..bf2382ab 100644 --- a/sidebars.js +++ b/sidebars.js @@ -269,6 +269,39 @@ const sidebars = { label: 'Watermarking and fingerprinting', id: 'sb-algs', }, + { + type: 'category', + label: 'TrustMark watermarking', + link: { type: 'doc', id: 'trustmark-intro' }, + collapsed: true, + items: [ + { + type: 'doc', + id: 'trustmark/readme', + label: 'Overview', + }, + { + type: 'doc', + id: 'trustmark/config', + label: 'Configuration', + }, + { + type: 'doc', + id: 'tm-faq', + label: 'FAQ', + }, + { + type: 'doc', + id: 'trustmark/js-readme', + label: 'JavaScript example', + }, + { + type: 'link', + label: 'GitHub', + href: 'https://github.com/adobe/trustmark/', + }, + ], + }, ], }, { diff --git a/src/css/custom.css b/src/css/custom.css index 46a7f1ad..7c39fbc1 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -418,3 +418,9 @@ body:not(.is-scrolling) .navbar { .trust-table th:nth-child(1) { width: 170px; } + +/* For content to be displayed only in GitHub. Typically this will be used in imported markdown files. */ + +.github-only { + display: none; +}