导读马赛克大家在网上发图时,一般情况下,大家可能都会使用马赛克来遮盖图片上的敏感信息。比如身份证号、姓名、地址,用马赛克掩盖后,就能有效达到保护信息安全的目的。但是,随着图像AI的进步,现在打码也不再安全

马赛克

大家在网上发图时,一般情况下,大家可能都会使用马赛克来遮盖图片上的敏感信息。比如身份证号、姓名、地址,用马赛克掩盖后,就能有效达到保护信息安全的目的。但是,随着图像AI的进步,现在打码也不再安全1

Depix

其实在Depix出现之前,已经有很多号称可以去码的软件和项目出现,然而结果却都不尽如人意。首先在这里展示一下Depix的效果图。

图一是打过码的图片,图二是去码之后的图片。结果如何,看看便知。

d24f6e216a79404e875af73737afd985

2527c29c23544952919c6dac0583760c

项目详情

GitHub地址

https://github.com/beurtschipper/Depix

下载

git clone https://github.com/beurtschipper/Depix.git

使用

Cut out the pixelated blocks from the screenshot as a single rectangle.
Paste a De Bruijn sequence with expected characters in an editor with the same font settings (text size, font, color, hsl).
Make a screenshot of the sequence. If possible, use the same screenshot tool that was used to create the pixelized image.
Run python depix.py -p [pixelated rectangle image] -s [search sequence image] -o output.png

举例(命令行)

python depix.py -p images/testimages/testimage3_pixels.png -s images/searchimages/debruinseq_notepad_Windows10_closeAndSpaced.png -
o output.png

最后

建议大家,基于安全考虑,请不要使用马赛克,最佳做法是直接将需要遮挡的区域使用黑条或者白条覆盖,这样是无法通过算法还原的。