deepaugment.build_features module¶
-
class
deepaugment.build_features.DataOp[source]¶ Bases:
object-
static
load(dataset_name)[source]¶ Loads dataset from keras and returns a sample out of it
- Args:
- dataset_name (str): training_set_size (int): validation_set_size (int):
- Returns:
- dict: data, with keys X_train, Y_train, X_val, Y_val list: input shape
-
static
preprocess(X, y, train_set_size, val_set_size=1000)[source]¶ - Preprocess images by:
- normalize to 0-1 range (divide by 255)
- convert labels to categorical)
- Args:
- X (numpy.array): y (numpy.array): train_set_size (int): val_set_size (int):
- Returns:
- dict: preprocessed data
-
static
split_train_val_sets(X, y, train_set_size, val_set_size)[source]¶ Splits given images randomly into train and val_seed groups
val_seed -> is validation seed dataset, from where validation sets are sampled
- Args:
- X (numpy.array): y (numpy.array): train_set_size (int): val_set_size (int):
- return:
- dict: dict with keys X_train, y_train, X_val_seed, y_val_seed
-
static