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

Fix some bugs. (#108)

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