用法:
mxnet.image.CreateAugmenter(data_shape, resize=0, rand_crop=False, rand_resize=False, rand_mirror=False, mean=None, std=None, brightness=0, contrast=0, saturation=0, hue=0, pca_noise=0, rand_gray=0, inter_method=2)
- data_shape:(
tuple of int
) - 輸出數據的形狀 - resize:(
int
) - 如果開始時大於 0,則調整短邊的大小 - rand_crop:(
bool
) - 是否啟用除中心裁剪以外的隨機裁剪 - rand_resize:(
bool
) - 是否開啟隨機大小裁剪,需要開啟rand_crop - rand_gray:(
float
) - [0, 1],所有通道轉換為灰度的概率,通道數不會減少到1 - rand_mirror:(
bool
) - 是否以 0.5 的概率對圖像應用水平翻轉 - mean:(
np.ndarray
or
None
) - [r, g, b] 的平均像素值 - std:(
np.ndarray
or
None
) - [r, g, b] 的標準差 - brightness:(
float
) - 亮度抖動範圍(百分比) - contrast:(
float
) - 對比度抖動範圍(百分比) - saturation:(
float
) - 飽和抖動範圍(百分比) - hue:(
float
) - 色相抖動範圍(百分比) - pca_noise:(
float
) - Pca 噪音水平(百分比) - inter_method:(
int
,
default=2
(
Area-based
)
) -所有調整大小操作的插值方法 可能的值: 0:最近鄰插值。 1:雙線性插值。 2:4x4 像素鄰域的雙三次插值。 3:基於區域(使用像素區域關係重采樣)。它可能是圖像抽取的首選方法,因為它會給出 moire-free 結果。但是當圖像被縮放時,它類似於最近鄰方法。 (默認使用)。 4:8x8 像素鄰域上的 Lanczos 插值。 9:放大的三次,縮小的麵積,其他的雙線性 10:從上麵提到的插值方法中隨機選擇。注意:在縮小圖像時,通常使用基於 AREA 的插值效果最好,而在放大圖像時,通常使用雙三次(慢)或雙線性(更快但看起來還不錯)效果最好。
- data_shape:(
參數:
創建一個增強器列表。
例子:
>>> # An example of creating multiple augmenters >>> augs = mx.image.CreateAugmenter(data_shape=(3, 300, 300), rand_mirror=True, ... mean=True, brightness=0.125, contrast=0.125, rand_gray=0.05, ... saturation=0.125, pca_noise=0.05, inter_method=10) >>> # dump the details >>> for aug in augs: ... aug.dumps()
相關用法
- Python mxnet.image.CreateMultiRandCropAugmenter用法及代碼示例
- Python mxnet.image.CreateDetAugmenter用法及代碼示例
- Python mxnet.image.resize_short用法及代碼示例
- Python mxnet.image.random_crop用法及代碼示例
- Python mxnet.image.imresize用法及代碼示例
- Python mxnet.image.center_crop用法及代碼示例
- Python mxnet.image.ImageIter.read_image用法及代碼示例
- Python mxnet.image.imread用法及代碼示例
- Python mxnet.image.ImageDetIter.sync_label_shape用法及代碼示例
- Python mxnet.image.ImageDetIter.draw_next用法及代碼示例
- Python mxnet.image.imdecode用法及代碼示例
- Python mxnet.image.scale_down用法及代碼示例
- Python mxnet.io.PrefetchingIter用法及代碼示例
- Python mxnet.initializer.register用法及代碼示例
- Python mxnet.initializer.One用法及代碼示例
- Python mxnet.io.NDArrayIter用法及代碼示例
- Python mxnet.io.ResizeIter用法及代碼示例
- Python mxnet.initializer.Constant.dumps用法及代碼示例
- Python mxnet.initializer.Mixed用法及代碼示例
- Python mxnet.initializer.Zero用法及代碼示例
注:本文由純淨天空篩選整理自apache.org大神的英文原創作品 mxnet.image.CreateAugmenter。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。