diff --git a/ppgan/faceutils/face_detection/api.py b/ppgan/faceutils/face_detection/api.py index 7b6160690daf331f4cb05bfe8328bb6fd2dd0a1d..0d503ee90d2ffbafb98d84cd1c3d85cbe7ecd870 100644 --- a/ppgan/faceutils/face_detection/api.py +++ b/ppgan/faceutils/face_detection/api.py @@ -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): diff --git a/ppgan/faceutils/face_detection/detection/sfd/sfd_detector.py b/ppgan/faceutils/face_detection/detection/sfd/sfd_detector.py index 4db2d28364e9ac970f9458997e9bdbb155cbf170..b4d7178d939307996d822c8315a340f8086461f1 100644 --- a/ppgan/faceutils/face_detection/detection/sfd/sfd_detector.py +++ b/ppgan/faceutils/face_detection/detection/sfd/sfd_detector.py @@ -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) diff --git a/ppgan/modules/conv.py b/ppgan/modules/conv.py index b6018af5883072efad86bd3bc4411cf6da55f25e..2fc09c510b4073097be114393160e7f4c166bf31 100644 --- a/ppgan/modules/conv.py +++ b/ppgan/modules/conv.py @@ -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()