From 3f83a8b3ecd3edfd305c58b9b5a04ad6021c86e9 Mon Sep 17 00:00:00 2001 From: jm12138 <2286040843@qq.com> Date: Thu, 5 Aug 2021 16:15:59 +0800 Subject: [PATCH] del batchsize (#1532) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复animeGan不应支持batch_size问题。 --- .../Image_gan/style_transfer/animegan_v1_hayao_60/README.md | 2 -- .../Image_gan/style_transfer/animegan_v1_hayao_60/module.py | 3 +-- .../Image_gan/style_transfer/animegan_v2_hayao_64/README.md | 2 -- .../Image_gan/style_transfer/animegan_v2_hayao_64/module.py | 3 +-- .../Image_gan/style_transfer/animegan_v2_hayao_99/README.md | 2 -- .../Image_gan/style_transfer/animegan_v2_hayao_99/module.py | 3 +-- .../Image_gan/style_transfer/animegan_v2_paprika_54/README.md | 2 -- .../Image_gan/style_transfer/animegan_v2_paprika_54/module.py | 3 +-- .../Image_gan/style_transfer/animegan_v2_paprika_74/README.md | 2 -- .../Image_gan/style_transfer/animegan_v2_paprika_74/module.py | 3 +-- .../Image_gan/style_transfer/animegan_v2_paprika_97/README.md | 2 -- .../Image_gan/style_transfer/animegan_v2_paprika_97/module.py | 3 +-- .../Image_gan/style_transfer/animegan_v2_paprika_98/README.md | 2 -- .../Image_gan/style_transfer/animegan_v2_paprika_98/module.py | 3 +-- .../Image_gan/style_transfer/animegan_v2_shinkai_33/README.md | 2 -- .../Image_gan/style_transfer/animegan_v2_shinkai_33/module.py | 3 +-- .../Image_gan/style_transfer/animegan_v2_shinkai_53/README.md | 2 -- .../Image_gan/style_transfer/animegan_v2_shinkai_53/module.py | 3 +-- 18 files changed, 9 insertions(+), 36 deletions(-) diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/README.md b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/README.md index ac03c3bc..6a2642d0 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/README.md +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/README.md @@ -23,7 +23,6 @@ def style_transfer( self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, @@ -43,7 +42,6 @@ def style_transfer( * images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None; * paths (list\[str\]): 图片的路径,默认为 None; -* batch\_size (int): batch 的大小,默认设为 1; * visualization (bool): 是否将识别结果保存为图片文件,默认设为 False; * output\_dir (str): 图片的保存路径,默认设为 output; * min\_size (int): 输入图片的短边最小尺寸,默认设为 32; diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/module.py b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/module.py index fb114158..7a54b230 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/module.py +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/module.py @@ -28,13 +28,12 @@ class Animegan_V1_Hayao_60(Module): def style_transfer(self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, max_size=1024): # 加载数据处理器 - processor = Processor(images, paths, batch_size, output_dir, min_size, max_size) + processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size) # 模型预测 outputs = self.model.predict(processor.input_datas) diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/README.md b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/README.md index 1aa4c086..68e53ede 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/README.md +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/README.md @@ -23,7 +23,6 @@ def style_transfer( self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, @@ -43,7 +42,6 @@ def style_transfer( * images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None; * paths (list\[str\]): 图片的路径,默认为 None; -* batch\_size (int): batch 的大小,默认设为 1; * visualization (bool): 是否将识别结果保存为图片文件,默认设为 False; * output\_dir (str): 图片的保存路径,默认设为 output; * min\_size (int): 输入图片的短边最小尺寸,默认设为 32; diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/module.py b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/module.py index 0c6eacb9..1a1191b8 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/module.py +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/module.py @@ -28,13 +28,12 @@ class Animegan_V2_Hayao_64(Module): def style_transfer(self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, max_size=1024): # 加载数据处理器 - processor = Processor(images, paths, batch_size, output_dir, min_size, max_size) + processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size) # 模型预测 outputs = self.model.predict(processor.input_datas) diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/README.md b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/README.md index be08aeee..22c0c414 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/README.md +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/README.md @@ -23,7 +23,6 @@ def style_transfer( self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, @@ -43,7 +42,6 @@ def style_transfer( * images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None; * paths (list\[str\]): 图片的路径,默认为 None; -* batch\_size (int): batch 的大小,默认设为 1; * visualization (bool): 是否将识别结果保存为图片文件,默认设为 False; * output\_dir (str): 图片的保存路径,默认设为 output; * min\_size (int): 输入图片的短边最小尺寸,默认设为 32; diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/module.py b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/module.py index a5228e95..09771b27 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/module.py +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/module.py @@ -28,13 +28,12 @@ class Animegan_V2_Hayao_99(Module): def style_transfer(self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, max_size=1024): # 加载数据处理器 - processor = Processor(images, paths, batch_size, output_dir, min_size, max_size) + processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size) # 模型预测 outputs = self.model.predict(processor.input_datas) diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/README.md b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/README.md index 7bd3f2e5..50205f86 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/README.md +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/README.md @@ -23,7 +23,6 @@ def style_transfer( self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, @@ -43,7 +42,6 @@ def style_transfer( * images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None; * paths (list\[str\]): 图片的路径,默认为 None; -* batch\_size (int): batch 的大小,默认设为 1; * visualization (bool): 是否将识别结果保存为图片文件,默认设为 False; * output\_dir (str): 图片的保存路径,默认设为 output; * min\_size (int): 输入图片的短边最小尺寸,默认设为 32; diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/module.py b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/module.py index 50f07186..e4b917aa 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/module.py +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/module.py @@ -28,13 +28,12 @@ class Animegan_V2_Paprika_54(Module): def style_transfer(self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, max_size=1024): # 加载数据处理器 - processor = Processor(images, paths, batch_size, output_dir, min_size, max_size) + processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size) # 模型预测 outputs = self.model.predict(processor.input_datas) diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/README.md b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/README.md index 9cd3941a..9bd48dc8 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/README.md +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/README.md @@ -23,7 +23,6 @@ def style_transfer( self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, @@ -43,7 +42,6 @@ def style_transfer( * images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None; * paths (list\[str\]): 图片的路径,默认为 None; -* batch\_size (int): batch 的大小,默认设为 1; * visualization (bool): 是否将识别结果保存为图片文件,默认设为 False; * output\_dir (str): 图片的保存路径,默认设为 output; * min\_size (int): 输入图片的短边最小尺寸,默认设为 32; diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/module.py b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/module.py index 9b986062..259b1fc8 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/module.py +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/module.py @@ -28,13 +28,12 @@ class Animegan_V2_Paprika_74(Module): def style_transfer(self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, max_size=1024): # 加载数据处理器 - processor = Processor(images, paths, batch_size, output_dir, min_size, max_size) + processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size) # 模型预测 outputs = self.model.predict(processor.input_datas) diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/README.md b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/README.md index eb1ef3a8..10af52a3 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/README.md +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/README.md @@ -23,7 +23,6 @@ def style_transfer( self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, @@ -43,7 +42,6 @@ def style_transfer( * images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None; * paths (list\[str\]): 图片的路径,默认为 None; -* batch\_size (int): batch 的大小,默认设为 1; * visualization (bool): 是否将识别结果保存为图片文件,默认设为 False; * output\_dir (str): 图片的保存路径,默认设为 output; * min\_size (int): 输入图片的短边最小尺寸,默认设为 32; diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/module.py b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/module.py index 73a79baf..5a6a9f6c 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/module.py +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/module.py @@ -28,13 +28,12 @@ class Animegan_V2_Paprika_97(Module): def style_transfer(self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, max_size=1024): # 加载数据处理器 - processor = Processor(images, paths, batch_size, output_dir, min_size, max_size) + processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size) # 模型预测 outputs = self.model.predict(processor.input_datas) diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/README.md b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/README.md index ee3501eb..c5017256 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/README.md +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/README.md @@ -23,7 +23,6 @@ def style_transfer( self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, @@ -43,7 +42,6 @@ def style_transfer( * images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None; * paths (list\[str\]): 图片的路径,默认为 None; -* batch\_size (int): batch 的大小,默认设为 1; * visualization (bool): 是否将识别结果保存为图片文件,默认设为 False; * output\_dir (str): 图片的保存路径,默认设为 output; * min\_size (int): 输入图片的短边最小尺寸,默认设为 32; diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/module.py b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/module.py index 10f56e46..f41c6f70 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/module.py +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/module.py @@ -28,13 +28,12 @@ class Animegan_V2_Paprika_98(Module): def style_transfer(self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, max_size=1024): # 加载数据处理器 - processor = Processor(images, paths, batch_size, output_dir, min_size, max_size) + processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size) # 模型预测 outputs = self.model.predict(processor.input_datas) diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/README.md b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/README.md index 024ee3e5..e4f5910d 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/README.md +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/README.md @@ -23,7 +23,6 @@ def style_transfer( self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, @@ -43,7 +42,6 @@ def style_transfer( * images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None; * paths (list\[str\]): 图片的路径,默认为 None; -* batch\_size (int): batch 的大小,默认设为 1; * visualization (bool): 是否将识别结果保存为图片文件,默认设为 False; * output\_dir (str): 图片的保存路径,默认设为 output; * min\_size (int): 输入图片的短边最小尺寸,默认设为 32; diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/module.py b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/module.py index 2ff2c9a1..be0be188 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/module.py +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/module.py @@ -28,13 +28,12 @@ class Animegan_V2_Shinkai_33(Module): def style_transfer(self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, max_size=1024): # 加载数据处理器 - processor = Processor(images, paths, batch_size, output_dir, min_size, max_size) + processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size) # 模型预测 outputs = self.model.predict(processor.input_datas) diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/README.md b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/README.md index 3be87720..87f58ca0 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/README.md +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/README.md @@ -23,7 +23,6 @@ def style_transfer( self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, @@ -43,7 +42,6 @@ def style_transfer( * images (list\[numpy.ndarray\]): 图片数据,ndarray.shape 为 \[H, W, C\],默认为 None; * paths (list\[str\]): 图片的路径,默认为 None; -* batch\_size (int): batch 的大小,默认设为 1; * visualization (bool): 是否将识别结果保存为图片文件,默认设为 False; * output\_dir (str): 图片的保存路径,默认设为 output; * min\_size (int): 输入图片的短边最小尺寸,默认设为 32; diff --git a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/module.py b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/module.py index c0158b5c..21bf5fc4 100644 --- a/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/module.py +++ b/modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/module.py @@ -28,13 +28,12 @@ class Animegan_V2_Shinkai_53(Module): def style_transfer(self, images=None, paths=None, - batch_size=1, output_dir='output', visualization=False, min_size=32, max_size=1024): # 加载数据处理器 - processor = Processor(images, paths, batch_size, output_dir, min_size, max_size) + processor = Processor(images=images, paths=paths, batch_size=1, output_dir=output_dir, min_size=min_size, max_size=max_size) # 模型预测 outputs = self.model.predict(processor.input_datas) -- GitLab