Files
mav-rik-facerestore_cf/facelib/detection/yolov5face/utils/extract_ckpt.py
T
2023-09-05 13:50:27 +02:00

5 lines
235 B
Python

import torch
import sys
sys.path.insert(0,'./facelib/detection/yolov5face')
model = torch.load('facelib/detection/yolov5face/yolov5n-face.pt', map_location='cpu')['model']
torch.save(model.state_dict(),'../../models/facedetection')