mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-07-16 10:03:42 -07:00
splitting large files
This commit is contained in:
parent
30cc36c8e4
commit
ee7d471f20
16 changed files with 805308 additions and 7 deletions
|
@ -6,6 +6,7 @@ import torch
|
|||
import torch.nn as nn
|
||||
import torch.nn.functional as F
|
||||
from xlib import math as lib_math
|
||||
from xlib.file import SplittedFile
|
||||
from xlib.image import ImageProcessor
|
||||
from xlib.torch import TorchDeviceInfo, get_cpu_device
|
||||
|
||||
|
@ -15,9 +16,12 @@ class S3FD:
|
|||
if device_info is None:
|
||||
device_info = get_cpu_device()
|
||||
self.device_info = device_info
|
||||
|
||||
|
||||
path = Path(__file__).parent / 'S3FD.pth'
|
||||
SplittedFile.merge(path, delete_parts=False)
|
||||
|
||||
net = self.net = S3FDNet()
|
||||
net.load_state_dict( torch.load(str(Path(__file__).parent / 's3fd.pth')) )
|
||||
net.load_state_dict( torch.load(str(path) ))
|
||||
net.eval()
|
||||
|
||||
if not device_info.is_cpu():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue