ChangeColorTemperature() 导致错误: 操作数无法与形状一起广播(32,)(32,3) 在官方示例中
作者: joej970创建于 2024年5月17日更新于 2024年5月17日
进口0.4.0 ZZ 3.11.5
例如:https://imgaug.readthedocs.io/en/latest/source/examples basics.html。
将数字导入为 np 导入为 ia 将 imgaug.augmenters 导入为iaa
亚种子(1)
图片的示例。
该阵列有外形(32,64,64,3)和 Dtype uint8.
图像 = np.array () [ia.quokka(大小=(64,64)),适用于在幅度(32)内的 , dtype=np.uint8 类型 (中文(简体) ).
下行=iaa. =. 顺序( [] iaa.Fliplr (0.5), # 水平翻转 iaa.crop(百分比=(0,0.1)),# 随机作物 没错 有时( E) 0.5, (韩语). (西格玛=(0, 0. , (中文(简体) ). ia.Linearcontrast((0.75, 1.5))), (中文(简体) ). aa. Additive GausianNoise( loc=0; scale= (0.0; 0.05*255), per channel=0.5), ), iaa. multiply ((0.8, 1.2), per channel=0. 2), (中文(简体) ). 没错 亚芬( A) (0.8,1.2),"y":(0.8,1.2))}, 翻译 % % "x":(-0.2,0.2),"y":(-0.2,0.2)}, 旋转=(-25, 25), 剪切=(8,8) , (中文(简体) ).
添加此掷出错误: 操作无法与形状一起播放( 32, ) (32, 3)
iaa. Change CorororTemperature ((5000, 8000)) (英语). 错误!
],随机 顺序=True)# 按随机顺序应用辅助器
图像 aug = 下行( 图像=图像)
内容来源: aleju/imgaug