据我所知,路径是正确的,我也在遵循Augmentor文档。在
代码:
import Augmentor
import os
import warnings
warnings.filterwarnings('ignore')
import keras
import glob
for img in glob.glob("C:\\Users\\Diganta\\Desktop\\Courses and Projects\\Projects\\Bennet\\irregular*.jpg"):
p = Augmentor.Pipeline(img)
p.rotate(probability=0.7, max_left_rotation=10, max_right_rotation=10)
p.zoom(probability=0.5, min_factor=1.1, max_factor=1.5)
p.sample(100)
这确实运行过,但是没有按照Augmentor文档中指定的在目录中创建包含增强图像的输出文件夹
我不是增强器专家,但是通过查看source code它看起来像是管道需要一个源目录作为参数,它会自动找到其中的所有图片。在
尝试直接传递目录,而不传递globs和loops:
在我看来,你想在所有图像上运行你的管道,而不是一个子集。如果是这样,那么将
^{pr2}$p.sample(100)
替换为:或者:
相关问题 更多 >
编程相关推荐