提交 b84b324c 编写于 作者: C chenjian

add declaration

上级 aa49f75b
...@@ -40,17 +40,18 @@ class Photopen: ...@@ -40,17 +40,18 @@ class Photopen:
self.network = PhotoPenPredictor(weight_path=self.pretrained_model, gen_cfg=cfg.predict) self.network = PhotoPenPredictor(weight_path=self.pretrained_model, gen_cfg=cfg.predict)
def photo_transfer(self, def photo_transfer(self,
images=None, images: list = None,
paths=None, paths: list = None,
output_dir='./transfer_result/', output_dir: str = './transfer_result/',
use_gpu=False, use_gpu: bool = False,
visualization=True): visualization: bool = True):
''' '''
images (list[numpy.ndarray]): data of images, shape of each is [H, W, C], color space must be BGR(read by cv2). images (list[numpy.ndarray]): data of images, shape of each is [H, W, C], color space must be BGR(read by cv2).
paths (list[str]): paths to images paths (list[str]): paths to images
output_dir: the dir to save the results
use_gpu: if True, use gpu to perform the computation, otherwise cpu. output_dir (str): the dir to save the results
visualization: if True, save results in output_dir. use_gpu (bool): if True, use gpu to perform the computation, otherwise cpu.
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.
先完成此消息的编辑!
想要评论请 注册