我想通过旋转90度、180度和270度来扩充数据集,并对图像的水平或垂直翻转版本应用相同的旋转。因此,一张图像总共有8张图像(4张来自原始图像旋转,4张来自翻转图像旋转)
API中只有90度旋转(random_rotation90
)。所以,我想这个函数应该连续应用,以获得180度和270度的旋转。在配置文件中执行此操作的正确方法是什么
data_augmentation_options {
random_horizontal_flip{
}
}
data_augmentation_options {
random_rotation90{
}
}
据我从preprocessor.py文件了解,上述配置直接将增强应用于原始图像,在这种情况下,不会连续应用增强。那么,以下配置是否符合我的目的
data_augmentation_options {
random_horizontal_flip{
}
random_rotation90{
}
}
data_augmentation_options {
random_horizontal_flip{
}
random_rotation90{
}
random_rotation90{
}
}
data_augmentation_options {
random_horizontal_flip{
}
random_rotation90{
}
random_rotation90{
}
random_rotation90{
}
}
data_augmentation_options {
random_rotation90{
}
}
data_augmentation_options {
random_rotation90{
}
random_rotation90{
}
}
data_augmentation_options {
random_rotation90{
}
random_rotation90{
}
random_rotation90{
}
}
不,对于每个选项,数据扩充只发生一次,每个选项分别创建一个图像。因此,使用多个旋转选项无法获得所需的旋转。为此,您必须执行以下操作: 随机旋转90{ 关键点旋转排列:3 关键点旋转排列:0 关键点旋转排列:1 关键点旋转排列:2 概率:0.5 }
相关问题 更多 >
编程相关推荐