提交 a2990ba0 编写于 作者: C chenjian

fix

上级 55988a65
...@@ -39,25 +39,25 @@ class PRNet: ...@@ -39,25 +39,25 @@ class PRNet:
self.network = PRN(is_dlib=True, prefix=self.directory) self.network = PRN(is_dlib=True, prefix=self.directory)
def face_swap(self, def face_swap(self,
images=None, images: list = None,
paths=None, paths: list = None,
mode=0, mode: int = 0,
output_dir='./swapping_result/', output_dir: str = './swapping_result/',
use_gpu=False, use_gpu: bool = False,
visualization=True): visualization: bool = True):
''' '''
Denoise a raw image in the low-light scene. Denoise a raw image in the low-light scene.
images (list[dict]): data of images, 每一个元素都为一个 dict,有关键字 source, ref, 相应取值为: images (list[dict]): data of images, each element is a dict:
- source (numpy.ndarray): 待转换的图片,shape 为 \[H, W, C\],BGR格式;<br/> - source (numpy.ndarray): input image,shape is \[H, W, C\],BGR format;<br/>
- ref (numpy.ndarray) : 参考图像,shape为 \[H, W, C\],BGR格式;<br/> - ref (numpy.ndarray) : style image,shape is \[H, W, C\],BGR format;<br/>
paths (list[str]): paths to images, 每一个元素都为一个dict, 有关键字 source, ref, 相应取值为: paths (list[dict]): paths to images, eacg element is a dict:
- source (str): 待转换的图片的路径;<br/> - source (str): path to input image;<br/>
- ref (str) : 参考图像的路径;<br/> - ref (str) : path to reference image;<br/>
mode: option, 0 for change part of texture, 1 for change whole face mode (int): option, 0 for change part of texture, 1 for change whole face
output_dir: the dir to save the results output_dir (str): the dir to save the results
use_gpu: if True, use gpu to perform the computation, otherwise cpu. use_gpu (bool): if True, use gpu to perform the computation, otherwise cpu.
visualization: if True, save results in output_dir. visualization (bool): if True, save results in output_dir.
''' '''
results = [] results = []
paddle.disable_static() paddle.disable_static()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册