Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleHub
提交
3f83a8b3
P
PaddleHub
项目概览
PaddlePaddle
/
PaddleHub
大约 1 年 前同步成功
通知
282
Star
12117
Fork
2091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
200
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleHub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
200
Issue
200
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3f83a8b3
编写于
8月 05, 2021
作者:
jm_12138
提交者:
GitHub
8月 05, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
del batchsize (#1532)
修复animeGan不应支持batch_size问题。
上级
4f818578
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
9 addition
and
36 deletion
+9
-36
modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/README.md
...e/Image_gan/style_transfer/animegan_v1_hayao_60/README.md
+0
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/module.py
...e/Image_gan/style_transfer/animegan_v1_hayao_60/module.py
+1
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/README.md
...e/Image_gan/style_transfer/animegan_v2_hayao_64/README.md
+0
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/module.py
...e/Image_gan/style_transfer/animegan_v2_hayao_64/module.py
+1
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/README.md
...e/Image_gan/style_transfer/animegan_v2_hayao_99/README.md
+0
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/module.py
...e/Image_gan/style_transfer/animegan_v2_hayao_99/module.py
+1
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/README.md
...Image_gan/style_transfer/animegan_v2_paprika_54/README.md
+0
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/module.py
...Image_gan/style_transfer/animegan_v2_paprika_54/module.py
+1
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/README.md
...Image_gan/style_transfer/animegan_v2_paprika_74/README.md
+0
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/module.py
...Image_gan/style_transfer/animegan_v2_paprika_74/module.py
+1
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/README.md
...Image_gan/style_transfer/animegan_v2_paprika_97/README.md
+0
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/module.py
...Image_gan/style_transfer/animegan_v2_paprika_97/module.py
+1
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/README.md
...Image_gan/style_transfer/animegan_v2_paprika_98/README.md
+0
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/module.py
...Image_gan/style_transfer/animegan_v2_paprika_98/module.py
+1
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/README.md
...Image_gan/style_transfer/animegan_v2_shinkai_33/README.md
+0
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/module.py
...Image_gan/style_transfer/animegan_v2_shinkai_33/module.py
+1
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/README.md
...Image_gan/style_transfer/animegan_v2_shinkai_53/README.md
+0
-2
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/module.py
...Image_gan/style_transfer/animegan_v2_shinkai_53/module.py
+1
-2
未找到文件。
modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/README.md
浏览文件 @
3f83a8b3
...
@@ -23,7 +23,6 @@ def style_transfer(
...
@@ -23,7 +23,6 @@ def style_transfer(
self
,
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
...
@@ -43,7 +42,6 @@ def style_transfer(
...
@@ -43,7 +42,6 @@ def style_transfer(
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
batch
\_
size (int): batch 的大小,默认设为 1;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v1_hayao_60/module.py
浏览文件 @
3f83a8b3
...
@@ -28,13 +28,12 @@ class Animegan_V1_Hayao_60(Module):
...
@@ -28,13 +28,12 @@ class Animegan_V1_Hayao_60(Module):
def
style_transfer
(
self
,
def
style_transfer
(
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
max_size
=
1024
):
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
)
outputs
=
self
.
model
.
predict
(
processor
.
input_datas
)
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/README.md
浏览文件 @
3f83a8b3
...
@@ -23,7 +23,6 @@ def style_transfer(
...
@@ -23,7 +23,6 @@ def style_transfer(
self
,
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
...
@@ -43,7 +42,6 @@ def style_transfer(
...
@@ -43,7 +42,6 @@ def style_transfer(
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
batch
\_
size (int): batch 的大小,默认设为 1;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_64/module.py
浏览文件 @
3f83a8b3
...
@@ -28,13 +28,12 @@ class Animegan_V2_Hayao_64(Module):
...
@@ -28,13 +28,12 @@ class Animegan_V2_Hayao_64(Module):
def
style_transfer
(
self
,
def
style_transfer
(
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
max_size
=
1024
):
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
)
outputs
=
self
.
model
.
predict
(
processor
.
input_datas
)
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/README.md
浏览文件 @
3f83a8b3
...
@@ -23,7 +23,6 @@ def style_transfer(
...
@@ -23,7 +23,6 @@ def style_transfer(
self
,
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
...
@@ -43,7 +42,6 @@ def style_transfer(
...
@@ -43,7 +42,6 @@ def style_transfer(
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
batch
\_
size (int): batch 的大小,默认设为 1;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_hayao_99/module.py
浏览文件 @
3f83a8b3
...
@@ -28,13 +28,12 @@ class Animegan_V2_Hayao_99(Module):
...
@@ -28,13 +28,12 @@ class Animegan_V2_Hayao_99(Module):
def
style_transfer
(
self
,
def
style_transfer
(
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
max_size
=
1024
):
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
)
outputs
=
self
.
model
.
predict
(
processor
.
input_datas
)
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/README.md
浏览文件 @
3f83a8b3
...
@@ -23,7 +23,6 @@ def style_transfer(
...
@@ -23,7 +23,6 @@ def style_transfer(
self
,
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
...
@@ -43,7 +42,6 @@ def style_transfer(
...
@@ -43,7 +42,6 @@ def style_transfer(
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
batch
\_
size (int): batch 的大小,默认设为 1;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_54/module.py
浏览文件 @
3f83a8b3
...
@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_54(Module):
...
@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_54(Module):
def
style_transfer
(
self
,
def
style_transfer
(
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
max_size
=
1024
):
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
)
outputs
=
self
.
model
.
predict
(
processor
.
input_datas
)
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/README.md
浏览文件 @
3f83a8b3
...
@@ -23,7 +23,6 @@ def style_transfer(
...
@@ -23,7 +23,6 @@ def style_transfer(
self
,
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
...
@@ -43,7 +42,6 @@ def style_transfer(
...
@@ -43,7 +42,6 @@ def style_transfer(
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
batch
\_
size (int): batch 的大小,默认设为 1;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_74/module.py
浏览文件 @
3f83a8b3
...
@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_74(Module):
...
@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_74(Module):
def
style_transfer
(
self
,
def
style_transfer
(
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
max_size
=
1024
):
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
)
outputs
=
self
.
model
.
predict
(
processor
.
input_datas
)
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/README.md
浏览文件 @
3f83a8b3
...
@@ -23,7 +23,6 @@ def style_transfer(
...
@@ -23,7 +23,6 @@ def style_transfer(
self
,
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
...
@@ -43,7 +42,6 @@ def style_transfer(
...
@@ -43,7 +42,6 @@ def style_transfer(
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
batch
\_
size (int): batch 的大小,默认设为 1;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_97/module.py
浏览文件 @
3f83a8b3
...
@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_97(Module):
...
@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_97(Module):
def
style_transfer
(
self
,
def
style_transfer
(
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
max_size
=
1024
):
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
)
outputs
=
self
.
model
.
predict
(
processor
.
input_datas
)
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/README.md
浏览文件 @
3f83a8b3
...
@@ -23,7 +23,6 @@ def style_transfer(
...
@@ -23,7 +23,6 @@ def style_transfer(
self
,
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
...
@@ -43,7 +42,6 @@ def style_transfer(
...
@@ -43,7 +42,6 @@ def style_transfer(
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
batch
\_
size (int): batch 的大小,默认设为 1;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_paprika_98/module.py
浏览文件 @
3f83a8b3
...
@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_98(Module):
...
@@ -28,13 +28,12 @@ class Animegan_V2_Paprika_98(Module):
def
style_transfer
(
self
,
def
style_transfer
(
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
max_size
=
1024
):
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
)
outputs
=
self
.
model
.
predict
(
processor
.
input_datas
)
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/README.md
浏览文件 @
3f83a8b3
...
@@ -23,7 +23,6 @@ def style_transfer(
...
@@ -23,7 +23,6 @@ def style_transfer(
self
,
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
...
@@ -43,7 +42,6 @@ def style_transfer(
...
@@ -43,7 +42,6 @@ def style_transfer(
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
batch
\_
size (int): batch 的大小,默认设为 1;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_33/module.py
浏览文件 @
3f83a8b3
...
@@ -28,13 +28,12 @@ class Animegan_V2_Shinkai_33(Module):
...
@@ -28,13 +28,12 @@ class Animegan_V2_Shinkai_33(Module):
def
style_transfer
(
self
,
def
style_transfer
(
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
max_size
=
1024
):
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
)
outputs
=
self
.
model
.
predict
(
processor
.
input_datas
)
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/README.md
浏览文件 @
3f83a8b3
...
@@ -23,7 +23,6 @@ def style_transfer(
...
@@ -23,7 +23,6 @@ def style_transfer(
self
,
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
...
@@ -43,7 +42,6 @@ def style_transfer(
...
@@ -43,7 +42,6 @@ def style_transfer(
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
images (list
\[
numpy.ndarray
\]
): 图片数据,ndarray.shape 为
\[
H, W, C
\]
,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
paths (list
\[
str
\]
): 图片的路径,默认为 None;
*
batch
\_
size (int): batch 的大小,默认设为 1;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
visualization (bool): 是否将识别结果保存为图片文件,默认设为 False;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
output
\_
dir (str): 图片的保存路径,默认设为 output;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
*
min
\_
size (int): 输入图片的短边最小尺寸,默认设为 32;
...
...
modules/thirdparty/image/Image_gan/style_transfer/animegan_v2_shinkai_53/module.py
浏览文件 @
3f83a8b3
...
@@ -28,13 +28,12 @@ class Animegan_V2_Shinkai_53(Module):
...
@@ -28,13 +28,12 @@ class Animegan_V2_Shinkai_53(Module):
def
style_transfer
(
self
,
def
style_transfer
(
self
,
images
=
None
,
images
=
None
,
paths
=
None
,
paths
=
None
,
batch_size
=
1
,
output_dir
=
'output'
,
output_dir
=
'output'
,
visualization
=
False
,
visualization
=
False
,
min_size
=
32
,
min_size
=
32
,
max_size
=
1024
):
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
)
outputs
=
self
.
model
.
predict
(
processor
.
input_datas
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录