(Image from https://github.com/sanghyun-son/EDSR-PyTorch/blob/master/test/0853x4.png)
Ailia input shape : (1, 3, 512, 512)
Ailia output shape : (1, 3, 512 , 512)
Automatically downloads the onnx and prototxt files when running. It is necessary to be connected to the Internet while downloading.
For the sample image with twice the resolution,
$ python3 codeformer.py
If you want to specify the input image, put the image path after the --input
option.
You can use --savepath
option to change the name of the output file to save.
$ python3 codeformer.py --input IMAGE_PATH --savepath SAVE_IMAGE_PATH
If you want to specify the quality, put the scale after the --fidelity_weight
option.
$ python3 codeformer.py --w 0.5
If you want to specify the cropped and aligned faces, put the scale after the --has_aligned
option.
$ python3 codeformer.py --has_aligned
You can select a model from retinaface_resnet50 | retinaface_mobile0.25 by adding --arch
$ python3 codeformer.py --video VIDEO_PATH
Towards Robust Blind Face Restoration with Codebook Lookup Transformer
Pytorch 1.10.0
ONNX opset = 10