Spaces:
Running
on
A10G
Running
on
A10G
File size: 357 Bytes
2a7f680 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import cv2
import fire
from imwatermark import WatermarkDecoder
def testit(img_path):
bgr = cv2.imread(img_path)
decoder = WatermarkDecoder('bytes', 136)
watermark = decoder.decode(bgr, 'dwtDct')
try:
dec = watermark.decode('utf-8')
except:
dec = "null"
print(dec)
if __name__ == "__main__":
fire.Fire(testit) |