From 784b1fa7b81e0fe9c51fcd99d8981738df30d02a Mon Sep 17 00:00:00 2001 From: ZuoGuan Date: Fri, 7 Jun 2024 20:49:22 +0800 Subject: [PATCH] example --- example.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 example.py diff --git a/example.py b/example.py new file mode 100644 index 0000000..412d28a --- /dev/null +++ b/example.py @@ -0,0 +1,11 @@ +from face_restorer import FaceRestorer +import cv2 + + +if __name__ == '__main__': + face_restorer = FaceRestorer("GFPGAN", bg_up_sample=True) + + input_img = cv2.imread('test.jpg') + output_img = face_restorer.restore(input_img, out_scale=2) + + cv2.imwrite('out.jpg', output_img)