mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-07-16 10:03:42 -07:00
_
This commit is contained in:
parent
69f71ddecd
commit
d40fce6a5a
4 changed files with 99 additions and 75 deletions
|
@ -152,43 +152,6 @@ class FaceAlignerNet(nn.Module):
|
|||
aff_t = torch.cat([torch.cos(angle_t)*scale_t, -torch.sin(angle_t)*scale_t, tx_t,
|
||||
torch.sin(angle_t)*scale_t, torch.cos(angle_t)*scale_t, ty_t,
|
||||
], dim=-1).view(-1,2,3)
|
||||
# from xlib.console import diacon
|
||||
# diacon.Diacon.stop()
|
||||
# import code
|
||||
# code.interact(local=dict(globals(), **locals()))
|
||||
|
||||
return aff_t
|
||||
|
||||
|
||||
|
||||
# class CTSOT:
|
||||
# def __init__(self, device_info : TorchDeviceInfo = None,
|
||||
# state_dict : Union[dict, None] = None,
|
||||
# training : bool = False):
|
||||
# if device_info is None:
|
||||
# device_info = get_cpu_device_info()
|
||||
# self.device_info = device_info
|
||||
|
||||
# self._net = net = CTSOTNet()
|
||||
|
||||
# if state_dict is not None:
|
||||
# net.load_state_dict(state_dict)
|
||||
|
||||
# if training:
|
||||
# net.train()
|
||||
# else:
|
||||
# net.eval()
|
||||
|
||||
# self.set_device(device_info)
|
||||
|
||||
# def set_device(self, device_info : TorchDeviceInfo = None):
|
||||
# if device_info is None or device_info.is_cpu():
|
||||
# self._net.cpu()
|
||||
# else:
|
||||
# self._net.cuda(device_info.get_index())
|
||||
|
||||
# def get_state_dict(self):
|
||||
# return self.net.state_dict()
|
||||
|
||||
# def get_net(self) -> CTSOTNet:
|
||||
# return self._net
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue