mirror of https://github.com/hpcaitech/ColossalAI
aibig-modeldata-parallelismdeep-learningdistributed-computingfoundation-modelsheterogeneous-traininghpcinferencelarge-scalemodel-parallelismpipeline-parallelism
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
358 B
18 lines
358 B
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)
|
|
|