CoolFace
Apppublic

paulo061/codeformer

sourceHugging Faceupdated 4y agoView on Hugging Face
0likes
extract_ckpt.py5 linesDownload Raw Back to utils
1import torch2import sys3sys.path.insert(0,'./facelib/detection/yolov5face')4model = torch.load('facelib/detection/yolov5face/yolov5n-face.pt', map_location='cpu')['model']5torch.save(model.state_dict(),'weights/facelib/yolov5n-face.pth')