未验证 提交 d3608012 编写于 作者: L leesusu 提交者: GitHub

Fix some bugs. (#108)

上级 10de3c64
......@@ -64,8 +64,8 @@ class FaceAlignment:
# Get the face detector
face_detector_module = __import__(
'face_detection.detection.' + face_detector, globals(), locals(),
[face_detector], 0)
'ppgan.faceutils.face_detection.detection.' + face_detector,
globals(), locals(), [face_detector], 0)
self.face_detector = face_detector_module.FaceDetector(verbose=verbose)
def get_detections_for_batch(self, images):
......
......@@ -33,8 +33,7 @@ class SFDDetector(FaceDetector):
# Initialise the face detector
if path_to_detector is None:
model_weights_path = get_weights_path_from_url(
models_urls['s3fd'], cur_path)
model_weights_path = get_weights_path_from_url(models_urls['s3fd'])
model_weights = paddle.load(model_weights_path)
else:
model_weights = paddle.load(path_to_detector)
......
......@@ -59,7 +59,7 @@ class Conv2dTransposeRelu(nn.Layer):
**kwargs):
super().__init__(*args, **kwargs)
self.conv_block = nn.Sequential(
nn.ConvTranspose2D(cin, cout, kernel_size, stride, padding,
nn.Conv2DTranspose(cin, cout, kernel_size, stride, padding,
output_padding), nn.BatchNorm2D(cout))
self.act = nn.ReLU()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册