Vivien Chappelier
commited on
Commit
•
8f13360
1
Parent(s):
d71011d
update doc
Browse files
README.md
CHANGED
@@ -29,27 +29,11 @@ image = pipe("a photo of an astronaut riding a horse on mars",
|
|
29 |
|
30 |
## Decoder Finetuning
|
31 |
|
32 |
-
This model was finetuned from the original StableDiffusion-XL autoencoder with the additional objective of including a weak invisible watermark, following the procedure of [StableSignature](https://ai.meta.com/blog/stable-signature-watermarking-generative-ai/). This watermark is
|
33 |
|
34 |
## Detecting the watermark
|
35 |
|
36 |
-
For security reasons we cannot release the weights of the detector.
|
37 |
-
```py
|
38 |
-
import requests
|
39 |
-
import base64
|
40 |
-
import sys
|
41 |
-
|
42 |
-
b64 = base64.b64encode(open(sys.argv[1], 'rb').read()).decode('utf8')
|
43 |
-
data = dict(image = b64)
|
44 |
-
response = requests.post('https://bzh.imatag.com/bzh/api/v1.0/detect',
|
45 |
-
json=data)
|
46 |
-
if response.json()['p-value'] < 1e-3:
|
47 |
-
print("watermark detected")
|
48 |
-
else:
|
49 |
-
print("no watermark detected")
|
50 |
-
```
|
51 |
-
|
52 |
-
Or using the [detect_api.py](https://huggingface.co/spaces/imatag/stable-signature-bzh/resolve/main/detect_api.py) script:
|
53 |
```shell
|
54 |
python detect_api.py test.png
|
55 |
```
|
@@ -82,3 +66,25 @@ _Visualization of watermark impact on 512x512 images from the COCO2017 validatio
|
|
82 |
<p align="center">
|
83 |
<img src=https://huggingface.co/spaces/imatag/stable-signature-bzh/resolve/main/eval/weak/0006.png />
|
84 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
## Decoder Finetuning
|
31 |
|
32 |
+
This model was finetuned from the original StableDiffusion-XL autoencoder with the additional objective of including a weak invisible watermark, following the procedure of [StableSignature](https://ai.meta.com/blog/stable-signature-watermarking-generative-ai/). This watermark is detectable by [IMATAG](https://www.imatag.com/)'s demo BZH decoder, available via API.
|
33 |
|
34 |
## Detecting the watermark
|
35 |
|
36 |
+
For security reasons we cannot release the weights of the detector. Instead, you may check for the presence of a watermark with the [detect_api.py](https://huggingface.co/spaces/imatag/stable-signature-bzh/resolve/main/detect_api.py) script like this:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
```shell
|
38 |
python detect_api.py test.png
|
39 |
```
|
|
|
66 |
<p align="center">
|
67 |
<img src=https://huggingface.co/spaces/imatag/stable-signature-bzh/resolve/main/eval/weak/0006.png />
|
68 |
</p>
|
69 |
+
|
70 |
+
### Robustness
|
71 |
+
|
72 |
+
The watermark is robust to most editorial changes to an image, such as cropping, changing brightness or contrast, resizing or JPEG compression:
|
73 |
+
|
74 |
+
<p align="center">
|
75 |
+
<br>
|
76 |
+
<b>
|
77 |
+
from left to right: original, watermarked, difference, 'crop 50% + brigthen 50% + jpeg 80%' attack, 'downscale 2x + crop 50% + brigthen 50% + jpeg 50%' attack</b>
|
78 |
+
</p>
|
79 |
+
|
80 |
+
<p align="center">
|
81 |
+
<img src=https://huggingface.co/spaces/imatag/stable-signature-bzh/resolve/main/eval/weak/0000.png />
|
82 |
+
</p>
|
83 |
+
|
84 |
+
The Receiver Operating Characteristic curve shows its performance under no modification and when modified by the two scenarios illustrated above:
|
85 |
+
<p align="center">
|
86 |
+
<img src=https://huggingface.co/spaces/imatag/stable-signature-bzh/resolve/main/eval/weak/roc.png />
|
87 |
+
</p>
|
88 |
+
|
89 |
+
More details available in our [announcement](https://www.imatag.com/blog/unlocking-the-future-of-content-authentication-imatags-breakthrough-in-ai-generated-image-watermarking) and our lab's [blog post](https://imatag-lab.medium.com/stable-signature-meets-bzh-53ad0ba13691).
|
90 |
+
For watermarked models with a different key, other perceptual compromises, robustness to other attacks, or faster detection, please [contact IMATAG](https://pages.imatag.com/contact-us-imatag).
|