All Projects → guofei9987 → Blind_watermark

guofei9987 / Blind_watermark

Licence: mit
Blind Watermark (图片盲水印,提取水印无须原图!)

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Blind watermark

WebRtcShitBlt
client side WebRTC lib to add an image / watermark on the MediaSource
Stars: ✭ 19 (-95.69%)
Mutual labels:  watermark
tiktok-downloader
Tiktok Downloader/Scraper using requests & bs4
Stars: ✭ 47 (-89.34%)
Mutual labels:  watermark
Mcanvas
用于合成图片的canvas绘制库
Stars: ✭ 343 (-22.22%)
Mutual labels:  watermark
watermark
简单的图片水印功能,支持 GIF
Stars: ✭ 38 (-91.38%)
Mutual labels:  watermark
lambda-watermark
AWS Lambda Watermark service for S3 images
Stars: ✭ 20 (-95.46%)
Mutual labels:  watermark
hack scripts
Usefull scripts
Stars: ✭ 51 (-88.44%)
Mutual labels:  watermark
ImageResize
Image resizing tool for .Net applications with ability to add text/image watermark, Supports animated images as well.
Stars: ✭ 45 (-89.8%)
Mutual labels:  watermark
Nowatermark
remove watermark. 去除图片中的水印
Stars: ✭ 373 (-15.42%)
Mutual labels:  watermark
watermarker
A little tool use to add watermark to image.
Stars: ✭ 17 (-96.15%)
Mutual labels:  watermark
Stegastamp
Invisible Hyperlinks in Physical Photographs
Stars: ✭ 306 (-30.61%)
Mutual labels:  watermark
staruml-watermark
⭐ StarUML watermark remover
Stars: ✭ 48 (-89.12%)
Mutual labels:  watermark
imagor
Fast, Docker-ready image processing server in Go and libvips
Stars: ✭ 2,276 (+416.1%)
Mutual labels:  watermark
watermark-enhancer
Add watermark to react components in a more elegant way
Stars: ✭ 66 (-85.03%)
Mutual labels:  watermark
SLBR-Visible-Watermark-Removal
[ACM MM 2021] Visible Watermark Removal via Self-calibrated Localization and Background Refinement
Stars: ✭ 54 (-87.76%)
Mutual labels:  watermark
Blind Watermark
Watermark added to the frequency domain by Fourier transform
Stars: ✭ 344 (-22%)
Mutual labels:  watermark
pdfconduit
Prepare documents for distribution
Stars: ✭ 22 (-95.01%)
Mutual labels:  watermark
pylovepdf
ilovepdf.com python API library
Stars: ✭ 52 (-88.21%)
Mutual labels:  watermark
Rubberstamp
📫 RubberStamp is an Android library that makes it easy for you to add a watermark to your images.
Stars: ✭ 411 (-6.8%)
Mutual labels:  watermark
Imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
Stars: ✭ 4,107 (+831.29%)
Mutual labels:  watermark
Kbase Doc
文档在线预览编辑,文档水印 / Office files preview or edit online, doc/docx convert to html, watermark
Stars: ✭ 275 (-37.64%)
Mutual labels:  watermark

blind-watermark

Blind watermark based on wavelet transform.

PyPI Build Status codecov License Python Platform fork Downloads Discussions

install

pip install blind-watermark

For the current developer version:

git clone [email protected]:guofei9987/blind_watermark.git
cd blind_watermark
pip install .

How to use

How to embed watermark:

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

bwm1 = WaterMark(password_wm=1, password_img=1)
# 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 watermark
image embedded with watermark extracted watermark
打上水印的图 提取的水印

Attack on the embedded image

attack method image after attack extracted watermark
Rotate 45 Degrees
旋转攻击.py
旋转攻击
Many Coverage
多遮挡攻击.py
多遮挡攻击 多遮挡_提取水印
50% Horizontal Crop
横向裁剪攻击.py
横向裁剪攻击
50% Vertical Crop
纵向裁剪攻击.py
纵向裁剪攻击 纵向裁剪
Resize(1200X1920->600X800)
缩放攻击.py
缩放攻击
Pepper Noise
椒盐击.py
椒盐攻击
Brightness 10% Up
亮度调高攻击.py
亮度调高攻击
Brightness 10% Down
亮度调暗攻击.py
亮度调低攻击

embed string

Embed:

from blind_watermark import WaterMark

bwm1 = WaterMark(password_img=1, password_wm=1)
bwm1.read_img('pic/ori_img.jpg')
wm = '@guofei9987 开源万岁!'
bwm1.read_wm(wm, mode='str')
bwm1.embed('output/embedded.png')
len_wm = len(bwm1.wm_bit)
print('Put down the length of wm_bit {len_wm}'.format(len_wm=len_wm))

Extract:

bwm1 = WaterMark(password_img=1, password_wm=1)
wm_extract = bwm1.extract('output/embedded.png', wm_shape=len_wm, mode='str')
print(wm_extract)

Output:

@guofei9987 开源万岁!

embed array of bits

As demo, we embed 6 bytes data:

wm = [True, False, True, True, True, False]

Embed:

from blind_watermark import WaterMark

bwm1 = WaterMark(password_img=1, password_wm=1)
bwm1.read_ori_img('pic/ori_img.jpg')
bwm1.read_wm([True, False, True, True, True, False], mode='bit')
bwm1.embed('output/embedded.png')

Extract:

bwm1 = WaterMark(password_img=1, password_wm=1, wm_shape=6)
wm_extract = bwm1.extract('output/打上水印的图.png', mode='bit')
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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].