Skip to content

Commit

Permalink
pypi: correct the long_description
Browse files Browse the repository at this point in the history
  • Loading branch information
guofei9987 committed Aug 17, 2020
1 parent f0b90d4 commit 21f54b4
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 45 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pip install .

## How to use

How to embed watermark:
How to embed watermark:
```python
from blind_watermark import WaterMark

Expand All @@ -42,7 +42,7 @@ bwm1 = WaterMark(password_wm=1, password_img=1)
bwm1.read_img('pic/ori_img.jpg')
# read watermark
bwm1.read_wm('pic/watermark.png')
# embed
# embed
bwm1.embed('output/embedded.png')
```

Expand Down Expand Up @@ -71,14 +71,14 @@ bwm1.extract(filename='output/embedded.png', wm_shape=(128, 128), out_wm_name='o

|attack method|image after attack|extracted watermark|
|--|--|--|
|Rotate 45 Degrees<br>[旋转攻击.py](examples/旋转攻击.py)|![旋转攻击](docs/旋转攻击.jpg)|![](docs/旋转攻击_提取水印.png)|
|Many Coverage<br>[多遮挡攻击.py](examples/多遮挡攻击.py)| ![多遮挡攻击](docs/多遮挡攻击.jpg) |![多遮挡_提取水印](docs/多遮挡攻击_提取水印.png)|
|50% Horizontal Crop<br>[横向裁剪攻击.py](examples/横向裁剪攻击.py)|![横向裁剪攻击](docs/横向裁剪攻击.jpg)|![](docs/横向裁剪攻击_提取水印.png)|
|50% Vertical Crop<br>[纵向裁剪攻击.py](examples/纵向裁剪攻击.py)|![纵向裁剪攻击](docs/纵向裁剪攻击.jpg)|![纵向裁剪](docs/纵向裁剪攻击_提取水印.png)|
|Resize(1200X1920->600X800)<br>[缩放攻击.py](examples/缩放攻击.py)|![缩放攻击](docs/缩放攻击.jpg)|![](docs/缩放攻击_提取水印.png)|
|Pepper Noise<br>[椒盐击.py](examples/椒盐攻击.py)|![椒盐攻击](docs/椒盐攻击.jpg)|![](docs/椒盐攻击_提取水印.png)|
|Brightness 10% Up<br>[亮度调高攻击.py](examples/亮度调高攻击.py)|![亮度调高攻击](docs/亮度调高攻击.jpg)|![](docs/亮度调高攻击_提取水印.png)|
|Brightness 10% Down<br>[亮度调暗攻击.py](examples/亮度调低攻击.py)|![亮度调低攻击](docs/亮度调低攻击.jpg)|![](docs/亮度调低攻击_提取水印.png)|
|Rotate 45 Degrees<br>[旋转攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/旋转攻击.py)|![旋转攻击](docs/旋转攻击.jpg)|![](docs/旋转攻击_提取水印.png)|
|Many Coverage<br>[多遮挡攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/多遮挡攻击.py)| ![多遮挡攻击](docs/多遮挡攻击.jpg) |![多遮挡_提取水印](docs/多遮挡攻击_提取水印.png)|
|50% Horizontal Crop<br>[横向裁剪攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/横向裁剪攻击.py)|![横向裁剪攻击](docs/横向裁剪攻击.jpg)|![](docs/横向裁剪攻击_提取水印.png)|
|50% Vertical Crop<br>[纵向裁剪攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/纵向裁剪攻击.py)|![纵向裁剪攻击](docs/纵向裁剪攻击.jpg)|![纵向裁剪](docs/纵向裁剪攻击_提取水印.png)|
|Resize(1200X1920->600X800)<br>[缩放攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/缩放攻击.py)|![缩放攻击](docs/缩放攻击.jpg)|![](docs/缩放攻击_提取水印.png)|
|Pepper Noise<br>[椒盐击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/椒盐攻击.py)|![椒盐攻击](docs/椒盐攻击.jpg)|![](docs/椒盐攻击_提取水印.png)|
|Brightness 10% Up<br>[亮度调高攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/亮度调高攻击.py)|![亮度调高攻击](docs/亮度调高攻击.jpg)|![](docs/亮度调高攻击_提取水印.png)|
|Brightness 10% Down<br>[亮度调暗攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/亮度调低攻击.py)|![亮度调低攻击](docs/亮度调低攻击.jpg)|![](docs/亮度调低攻击_提取水印.png)|



Expand Down Expand Up @@ -109,4 +109,3 @@ print(wm_extract)
Notice that `wm_shape` (shape of watermark) is necessary

The output `wm_extract` is an array of float. set a threshold such as 0.5.

16 changes: 8 additions & 8 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ bwm1.extract(filename='output/打上水印的图.png', wm_shape=(128, 128), out_

|攻击方式|攻击后的图片|提取的水印|
|--|--|--|
|旋转攻击45度<br>[旋转攻击.py](examples/旋转攻击.py)|![旋转攻击](docs/旋转攻击.jpg)|![](docs/旋转攻击_提取水印.png)|
|多遮挡<br>[多遮挡攻击.py](examples/多遮挡攻击.py)| ![多遮挡攻击](docs/多遮挡攻击.jpg) |![多遮挡_提取水印](docs/多遮挡攻击_提取水印.png)|
|横向裁剪50%<br>[横向裁剪攻击.py](examples/横向裁剪攻击.py)|![横向裁剪攻击](docs/横向裁剪攻击.jpg)|![](docs/横向裁剪攻击_提取水印.png)|
|纵向裁剪50%<br>[纵向裁剪攻击.py](examples/纵向裁剪攻击.py)|![纵向裁剪攻击](docs/纵向裁剪攻击.jpg)|![纵向裁剪](docs/纵向裁剪攻击_提取水印.png)|
|缩放攻击(1200X1920->600X800)<br>[缩放攻击.py](examples/缩放攻击.py)|![缩放攻击](docs/缩放攻击.jpg)|![](docs/缩放攻击_提取水印.png)|
|椒盐攻击<br>[椒盐击.py](examples/椒盐攻击.py)|![椒盐攻击](docs/椒盐攻击.jpg)|![](docs/椒盐攻击_提取水印.png)|
|亮度提高10%<br>[亮度调高攻击.py](examples/亮度调高攻击.py)|![亮度调高攻击](docs/亮度调高攻击.jpg)|![](docs/亮度调高攻击_提取水印.png)|
|亮度调低10%<br>[亮度调暗攻击.py](examples/亮度调低攻击.py)|![亮度调低攻击](docs/亮度调低攻击.jpg)|![](docs/亮度调低攻击_提取水印.png)|
|旋转攻击45度<br>[旋转攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/旋转攻击.py)|![旋转攻击](docs/旋转攻击.jpg)|![](docs/旋转攻击_提取水印.png)|
|多遮挡<br>[多遮挡攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/多遮挡攻击.py)| ![多遮挡攻击](docs/多遮挡攻击.jpg) |![多遮挡_提取水印](docs/多遮挡攻击_提取水印.png)|
|横向裁剪50%<br>[横向裁剪攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/横向裁剪攻击.py)|![横向裁剪攻击](docs/横向裁剪攻击.jpg)|![](docs/横向裁剪攻击_提取水印.png)|
|纵向裁剪50%<br>[纵向裁剪攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/纵向裁剪攻击.py)|![纵向裁剪攻击](docs/纵向裁剪攻击.jpg)|![纵向裁剪](docs/纵向裁剪攻击_提取水印.png)|
|缩放攻击(1200X1920->600X800)<br>[缩放攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/缩放攻击.py)|![缩放攻击](docs/缩放攻击.jpg)|![](docs/缩放攻击_提取水印.png)|
|椒盐攻击<br>[椒盐击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/椒盐攻击.py)|![椒盐攻击](docs/椒盐攻击.jpg)|![](docs/椒盐攻击_提取水印.png)|
|亮度提高10%<br>[亮度调高攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/亮度调高攻击.py)|![亮度调高攻击](docs/亮度调高攻击.jpg)|![](docs/亮度调高攻击_提取水印.png)|
|亮度调低10%<br>[亮度调暗攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/亮度调低攻击.py)|![亮度调低攻击](docs/亮度调低攻击.jpg)|![](docs/亮度调低攻击_提取水印.png)|



Expand Down
2 changes: 1 addition & 1 deletion blind_watermark/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .blind_watermark import WaterMark
from .att import *

__version__ = '0.0.2'
__version__ = '0.0.5'
32 changes: 15 additions & 17 deletions docs/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,52 +32,51 @@ pip install .

## How to use

How to embed watermark:
How to embed watermark:
```python
from blind_watermark import WaterMark

bwm1 = WaterMark(password_wm=1, password_img=1)
# 读取原图
# read original image
bwm1.read_img('pic/ori_img.jpg')
# 读取水印
# read watermark
bwm1.read_wm('pic/watermark.png')
# 打上盲水印
# embed
bwm1.embed('output/embedded.png')
```


How to extract watermark
```python
bwm1 = WaterMark(password_wm=1, password_img=1)
# 注意需要设定水印的长宽wm_shape
# notice that wm_shape is necessary
bwm1.extract(filename='output/embedded.png', wm_shape=(128, 128), out_wm_name='output/extracted.png', )
```

## demos:

|origin image|watermark|
|--|--|
|![origin_image](docs/原图.jpg)|![watermark](docs/水印.png)|
|![origin_image](https://blindwatermark.github.io/blind_watermark/原图.jpg)|![watermark](https://blindwatermark.github.io/blind_watermark/水印.png)|

|image embedded with watermark|extracted watermark|
|--|--|
|![打上水印的图](docs/打上水印的图.jpg)|![提取的水印](docs/解出的水印.png)|

|![origin_image](https://blindwatermark.github.io/blind_watermark/打上水印的图.jpg)|![watermark](https://blindwatermark.github.io/blind_watermark/解出的水印.png)|


### Attack on the embedded image


|attack method|image after attack|extracted watermark|
|--|--|--|
|Rotate 45 Degrees<br>[旋转攻击.py](examples/旋转攻击.py)|![旋转攻击](docs/旋转攻击.jpg)|![](docs/旋转攻击_提取水印.png)|
|Many Coverage<br>[多遮挡攻击.py](examples/多遮挡攻击.py)| ![多遮挡攻击](docs/多遮挡攻击.jpg) |![多遮挡_提取水印](docs/多遮挡攻击_提取水印.png)|
|50% Horizontal Crop<br>[横向裁剪攻击.py](examples/横向裁剪攻击.py)|![横向裁剪攻击](docs/横向裁剪攻击.jpg)|![](docs/横向裁剪攻击_提取水印.png)|
|50% Vertical Crop<br>[纵向裁剪攻击.py](examples/纵向裁剪攻击.py)|![纵向裁剪攻击](docs/纵向裁剪攻击.jpg)|![纵向裁剪](docs/纵向裁剪攻击_提取水印.png)|
|Resize(1200X1920->600X800)<br>[缩放攻击.py](examples/缩放攻击.py)|![缩放攻击](docs/缩放攻击.jpg)|![](docs/缩放攻击_提取水印.png)|
|Pepper Noise<br>[椒盐击.py](examples/椒盐攻击.py)|![椒盐攻击](docs/椒盐攻击.jpg)|![](docs/椒盐攻击_提取水印.png)|
|Brightness 10% Up<br>[亮度调高攻击.py](examples/亮度调高攻击.py)|![亮度调高攻击](docs/亮度调高攻击.jpg)|![](docs/亮度调高攻击_提取水印.png)|
|Brightness 10% Down<br>[亮度调暗攻击.py](examples/亮度调低攻击.py)|![亮度调低攻击](docs/亮度调低攻击.jpg)|![](docs/亮度调低攻击_提取水印.png)|
|Rotate 45 Degrees<br>[旋转攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/旋转攻击.py)|![旋转攻击](https://blindwatermark.github.io/blind_watermark/旋转攻击.jpg)|![](https://blindwatermark.github.io/blind_watermark/旋转攻击_提取水印.png)|
|Many Coverage<br>[多遮挡攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/多遮挡攻击.py)| ![多遮挡攻击](https://blindwatermark.github.io/blind_watermark/多遮挡攻击.jpg) |![多遮挡_提取水印](https://blindwatermark.github.io/blind_watermark/多遮挡攻击_提取水印.png)|
|50% Horizontal Crop<br>[横向裁剪攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/横向裁剪攻击.py)|![横向裁剪攻击](https://blindwatermark.github.io/blind_watermark/横向裁剪攻击.jpg)|![](https://blindwatermark.github.io/blind_watermark/横向裁剪攻击_提取水印.png)|
|50% Vertical Crop<br>[纵向裁剪攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/纵向裁剪攻击.py)|![纵向裁剪攻击](https://blindwatermark.github.io/blind_watermark/纵向裁剪攻击.jpg)|![纵向裁剪](https://blindwatermark.github.io/blind_watermark/纵向裁剪攻击_提取水印.png)|
|Resize(1200X1920->600X800)<br>[缩放攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/缩放攻击.py)|![缩放攻击](https://blindwatermark.github.io/blind_watermark/缩放攻击.jpg)|![](https://blindwatermark.github.io/blind_watermark/缩放攻击_提取水印.png)|
|Pepper Noise<br>[椒盐击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/椒盐攻击.py)|![椒盐攻击](https://blindwatermark.github.io/blind_watermark/椒盐攻击.jpg)|![](https://blindwatermark.github.io/blind_watermark/椒盐攻击_提取水印.png)|
|Brightness 10% Up<br>[亮度调高攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/亮度调高攻击.py)|![亮度调高攻击](https://blindwatermark.github.io/blind_watermark/亮度调高攻击.jpg)|![](https://blindwatermark.github.io/blind_watermark/亮度调高攻击_提取水印.png)|
|Brightness 10% Down<br>[亮度调暗攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/亮度调低攻击.py)|![亮度调低攻击](https://blindwatermark.github.io/blind_watermark/亮度调低攻击.jpg)|![](https://blindwatermark.github.io/blind_watermark/亮度调低攻击_提取水印.png)|



Expand Down Expand Up @@ -108,4 +107,3 @@ print(wm_extract)
Notice that `wm_shape` (shape of watermark) is necessary

The output `wm_extract` is an array of float. set a threshold such as 0.5.

16 changes: 8 additions & 8 deletions docs/zh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ bwm1.extract(filename='output/打上水印的图.png', wm_shape=(128, 128), out_

|攻击方式|攻击后的图片|提取的水印|
|--|--|--|
|旋转攻击45度<br>[旋转攻击.py](examples/旋转攻击.py)|![旋转攻击](../旋转攻击.jpg)|![](../旋转攻击_提取水印.png)|
|多遮挡<br>[多遮挡攻击.py](examples/多遮挡攻击.py)| ![多遮挡攻击](../多遮挡攻击.jpg)|![多遮挡_提取水印](../多遮挡攻击_提取水印.png)|
|横向裁剪50%<br>[横向裁剪攻击.py](examples/横向裁剪攻击.py)|![横向裁剪攻击](../横向裁剪攻击.jpg)|![](../横向裁剪攻击_提取水印.png)|
|纵向裁剪50%<br>[纵向裁剪攻击.py](examples/纵向裁剪攻击.py)|![纵向裁剪攻击](../纵向裁剪攻击.jpg)|![纵向裁剪](../纵向裁剪攻击_提取水印.png)|
|缩放攻击(1200X1920->600X800)<br>[缩放攻击.py](examples/缩放攻击.py)|![缩放攻击](../缩放攻击.jpg)|![](../缩放攻击_提取水印.png)|
|椒盐攻击<br>[椒盐击.py](examples/椒盐攻击.py)|![椒盐攻击](../椒盐攻击.jpg)|![](../椒盐攻击_提取水印.png)|
|亮度提高10%<br>[亮度调高攻击.py](examples/亮度调高攻击.py)|![亮度调高攻击](../亮度调高攻击.jpg)|![](../亮度调高攻击_提取水印.png)|
|亮度调低10%<br>[亮度调暗攻击.py](examples/亮度调低攻击.py)|![亮度调低攻击](../亮度调低攻击.jpg)|![](../亮度调低攻击_提取水印.png)|
|旋转攻击45度<br>[旋转攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/旋转攻击.py)|![旋转攻击](../旋转攻击.jpg)|![](../旋转攻击_提取水印.png)|
|多遮挡<br>[多遮挡攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/多遮挡攻击.py)| ![多遮挡攻击](../多遮挡攻击.jpg)|![多遮挡_提取水印](../多遮挡攻击_提取水印.png)|
|横向裁剪50%<br>[横向裁剪攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/横向裁剪攻击.py)|![横向裁剪攻击](../横向裁剪攻击.jpg)|![](../横向裁剪攻击_提取水印.png)|
|纵向裁剪50%<br>[纵向裁剪攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/纵向裁剪攻击.py)|![纵向裁剪攻击](../纵向裁剪攻击.jpg)|![纵向裁剪](../纵向裁剪攻击_提取水印.png)|
|缩放攻击(1200X1920->600X800)<br>[缩放攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/缩放攻击.py)|![缩放攻击](../缩放攻击.jpg)|![](../缩放攻击_提取水印.png)|
|椒盐攻击<br>[椒盐击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/椒盐攻击.py)|![椒盐攻击](../椒盐攻击.jpg)|![](../椒盐攻击_提取水印.png)|
|亮度提高10%<br>[亮度调高攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/亮度调高攻击.py)|![亮度调高攻击](../亮度调高攻击.jpg)|![](../亮度调高攻击_提取水印.png)|
|亮度调低10%<br>[亮度调暗攻击.py](https://github.com/guofei9987/blind_watermark/blob/master/examples/亮度调低攻击.py)|![亮度调低攻击](../亮度调低攻击.jpg)|![](../亮度调低攻击_提取水印.png)|


### 隐水印还可以是二进制数据
Expand Down

0 comments on commit 21f54b4

Please sign in to comment.