Spaces:
Running
Running
Update src/utils/preprocess.py
Browse files- src/utils/preprocess.py +1 -1
src/utils/preprocess.py
CHANGED
@@ -43,7 +43,7 @@ class CropAndExtract():
|
|
43 |
def __init__(self, path_of_lm_croper, path_of_net_recon_model, dir_of_BFM_fitting, device):
|
44 |
|
45 |
self.croper = Croper(path_of_lm_croper)
|
46 |
-
self.kp_extractor = KeypointExtractor()
|
47 |
self.net_recon = networks.define_net_recon(net_recon='resnet50', use_last_fc=False, init_path='').to(device)
|
48 |
checkpoint = torch.load(path_of_net_recon_model, map_location=torch.device(device))
|
49 |
self.net_recon.load_state_dict(checkpoint['net_recon'])
|
|
|
43 |
def __init__(self, path_of_lm_croper, path_of_net_recon_model, dir_of_BFM_fitting, device):
|
44 |
|
45 |
self.croper = Croper(path_of_lm_croper)
|
46 |
+
self.kp_extractor = KeypointExtractor(device)
|
47 |
self.net_recon = networks.define_net_recon(net_recon='resnet50', use_last_fc=False, init_path='').to(device)
|
48 |
checkpoint = torch.load(path_of_net_recon_model, map_location=torch.device(device))
|
49 |
self.net_recon.load_state_dict(checkpoint['net_recon'])
|