MCPcopy Create free account
hub / github.com/albertpumarola/GANimation / __init__

Method __init__

test.py:17–24  ·  view source on GitHub ↗
(self, opt)

Source from the content-addressed store, hash-verified

15
16class MorphFacesInTheWild:
17 def __init__(self, opt):
18 self._opt = opt
19 self._model = ModelsFactory.get_by_name(self._opt.model, self._opt)
20 self._model.set_eval()
21 self._transform = transforms.Compose([transforms.ToTensor(),
22 transforms.Normalize(mean=[0.5, 0.5, 0.5],
23 std=[0.5, 0.5, 0.5])
24 ])
25
26 def morph_file(self, img_path, expresion):
27 img = cv_utils.read_cv2_img(img_path)

Callers

nothing calls this directly

Calls 2

get_by_nameMethod · 0.45
set_evalMethod · 0.45

Tested by

no test coverage detected