Git Product home page Git Product logo

trustmark's Introduction

TrustMark - Universal Watermarking for Arbitrary Resolution Images

An Open Source, MIT licensed implementation of TrustMark watemarking for the Content Authenticity Initiative (CAI) as described in:

TrustMark - Universal Watermarking for Arbitrary Resolution Images

https://arxiv.org/abs/2311.18297

Tu Bui 1, Shruti Agarwal 2 , John Collomosse 1,2

1 DECaDE Centre for the Decentralized Digital Economy, University of Surrey, UK.
2 Adobe Research, San Jose CA.

This repo contains a Python (v3.8.5 or greater) implementation (python/) of TrustMark for encoding, decoding and removing image watermarks.

Quick start

Within the python folder run pip install .
The TrustMark package is also available via PyPi - run pip install trustmark to install it indepedent of this repo.

The python/test.py script provides examples of watermarking images (a JPEG and a transparent PNG image are provided as examples). To test the installation the following code snippet in Python shows typical usage:

from trustmark import TrustMark
from PIL import Image

# init
tm=TrustMark(verbose=True, model_type='Q')

# encoding example
cover = Image.open('ufo_240.jpg').convert('RGB')
tm.encode(cover, 'mysecret').save('ufo_240_Q.png')

# decoding example
cover = Image.open('ufo_240_Q.png').convert('RGB')
wm_secret, wm_present, wm_schema = tm.decode(cover)
if wm_present:
  print(f'Extracted secret: {wm_secret}')
else:
  print('No watermark detected')

# removal example
stego = Image.open('ufo_240_Q.png').convert('RGB')
im_recover = tm.remove_watermark(stego)
im_recover.save('recovered.png')

TrustMark Models

Models are now fetched on first use, due to the size and number of model variants

Citation

If you find this work useful we request you please cite the repo and/or TrustMark paper as follows.

@article{trustmark,
  title={Trustmark: Universal Watermarking for Arbitrary Resolution Images},
  author={Bui, Tu and Agarwal, Shruti and Collomosse, John},
  journal = {ArXiv e-prints},
  archivePrefix = "arXiv",
  eprint = {2311.18297},
  year = 2023,
  month = nov
}

trustmark's People

Contributors

jcollomosse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trustmark's Issues

How to train this model?

I want to train this model.
I would greatly appreciate it if you could support the sources and scripts for training this model. :)

Error in README or missing folders

Expected Behaviour

The README should be accurate.

Actual Behaviour

The README contains this erroneous statement:

This repo contains a [...] a browser deployable Javascript (js/) implementation of TrustMark for encoding, decoding and removing image watermarks. In addition, a C2PA (c2pa/) example is provided to demonstrate signing of a watermarked image using the CAI supplied python library for C2PA / Content Credentials.

There are neither js nor c2pa folders in this repo.

How to fix

Either remove those phrases from the README, or (preferably) add the missing folders to the repo.

FYI @jcollomosse

Incorrect citation year

Citation has incorrect year of 2013 instead of 2023

@article{trustmark,
  title={Trustmark: Universal Watermarking for Arbitrary Resolution Images},
  author={Bui, Tu and Agarwal, Shruti and Collomosse, John},
  journal = {ArXiv e-prints},
  archivePrefix = "arXiv",
  eprint = {2311.18297},
  year = 2013,
  month = nov
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.