Data augmentation of deep learning

Source: Internet
Author: User
Tags constant in degrees keras

Deep learning is a data-driven discipline, and data augmentation (data expansion) can be used to effectively expand and perform some data normalized operations. This makes it easy to expand data sets, enrich data diversity, facilitate learning to more extensive features, and avoid the overfit and underfit of models.
The Imagedatagenerator in Keras.preprocessing.image is called directly here. This function contains common image transformations and normalization methods. function Introduction

From keras.preprocessing.image import imagedatagenerator

? Imagedatagenerator # View Function Help
The function parameter list (with default values) is as follows:
Featurewise_center=false:
Set the mean value of the input feature to 0 (per dimension, feature-wise)
Set input mean to 0 over the dataset, Feature-wise. Samplewise_center=false:
Set the mean value of each sample to 0. (average of the sample level, i.e. the sum of all the characteristics of the sample is 0)
Set Each of the sample mean to 0. Featurewise_std_normalization=false
Each feature dimension is divided by the standard deviation of the dimension.
Divide inputs by STD of the dataset, Feature-wise. Samplewise_std_normalization=false
Each feature (all dimensions) is divided by the corresponding standard deviation.
Divide each input by its Std. zca_whitening=false
Use Zca whitening operation.
Apply ZCA (zero-phase Component analysis) Whitening zca_epsilon=1e-06
Epsilon value
Epsilon for ZCA whitening. Default is 1e-6. rotation_range=0.0
The maximum value of the random rotation.
Degree range for random rotations. width_shift_range=0.0
Scale range for horizontal panning (maximum value of the range)
Float (fraction of total width). Range for random horizontal shifts. height_shift_range=0.0
Scale back in portrait translation (maximum value of range)
Float (fraction of total height). Range for random vertical shifts. Brightness_range=none shear_range=0.0
Maximum clipping strength range (counterclockwise direction angle)
Shear Intensity (Shear angle in counter-clockwise direction in degrees) zoom_range=0.0
Random zoom range (in the end zoom in/out)
Float or [lower, upper]. Range for Random zoom. If a float, [lower, upper] = [1-zoom_range, 1+zoom_range]. channel_shift_range=0.0
Range for random channel shifts. Fill_mode= ' nearest '
One of {"Constant", "nearest", "reflect" or "wrap"}. Default is ' nearest '.
Points outside the boundaries of the input is filled according to the given mode:
' Constant ': kkkkkkkk|abcd|kkkkkkkk (cval=k)
' Nearest ': aaaaaaaa|abcd|dddddddd
' Reflect ': ABCDDCBA|ABCD|DCBAABCD
' Wrap ': ABCDABCD|ABCD|ABCDABCD cval=0.0
Value used for points outside the boundaries when fill_mode = "constant". Horizontal_flip=false
Randomly flip inputs horizontally. (Is it not =true, must flip?), if it is a random flip, then, after selecting the item, the operation is randomly performed on the picture during training, rather than necessarily executed. If you do, the number of training sets will increase. It should be flipped randomly. Vertical_flip=false
Randomly flip inputs vertically. Rescale=none
Defaults to None. If None or 0, no rescaling is applied,otherwise we multiply the data by the value provided (before applying all other Tran sformation). Preprocessing_function=none
function that would be is implied on each input. The function would run after the image is resized and augmented. The function should take one argument:one image (Numpy tensor with rank 3), and should output a Numpy tensor with the SAM E shape. Data_format=none
One of {"Channels_first", "Channels_last"}.
"Channels_last" mode means that the images should has shape (samples, height, width, channels),
"Channels_first" mode means that the images should has shape (samples, channels, height, width).
It defaults to the Image_data_format value found in your
Keras config file at ~/.keras/keras.json.
If you never set it, then it'll be "channels_last". validation_split=0.0
Fraction of images reserved for validation (strictly between 0 and 1)

Deep learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.