Questions tagged [data-augmentation]

Data augmentation

Data augmentation is the technique of increasing the size of data used for training a model. It also helps in preventing overfitting.

Some of the most common data augmentation techniques for images include:

  • Scaling
  • Cropping
  • Flipping
  • Rotation
  • Color jittering
465 questions
0
votes
1 answer

Why do we need test_generator and val_generator for data augmentation

Data augmentation is applied for training only. I'm wondering why several tutorials create test_generator and val_generator. Why don't we create only train_generator.
0
votes
0 answers

Tensorflow 2.0 ImageAugmentation using tf.keras.preprocessing.image.ImageDataGenerator and tf.datasets: model.fit() is running infinitely

I am facing issue while running the fit() function in TensorFlow with augmented images(using ImageDataGenerator) passed as a dataset. The fit() function is running infinitely without stopping. I tried it with the default code which was shared in…
Thomas John
  • 101
  • 1
  • 1
  • 5
0
votes
0 answers

How do I double data for classes which have less number of images compare to other classes?

My training data is imbalanced. So I decided to resample my dataset. I want to do slightly changes while resampling. I'd like to apply a horizontal flip and Gaussian filter to minority classes to make all classes equal. To do so, I'd like to use…
0
votes
1 answer

Keras fit_generator gives a dimension mismatch error

I am working on MNIST dataset, in which X_train = (42000,28,28,1) is the training set. y_train = (42000,10) is the corresponding label set. Now I create an iterator from the image generator using Keras as…
0
votes
1 answer

How do I perform Data Augmentation for landmarks localization?

I'm building a neural network using Keras to perform landmarks localization on a grayscale images. I saw that for classification task there is a Keras function to perform Data Augmentation. But for localization task I have not found a function to…
jumpy
  • 73
  • 7
0
votes
1 answer

Training design / sequential loading of images for Mask-RCNN

I am training a deep learning model using Mask RCNN from the following git repository: matterport/Mask_RCNN. I rely on a heavy augmentation of my dataset (original dataset: 59 images of 1988x1355x3 with each > 80 annotations), which I store locally…
skna.1000
  • 51
  • 8
0
votes
2 answers

Fast Dataset Augmentation in Python- Deep Learning

I am working on a project where there is a need for data augmentation. I wanted to flip the image horizontally and add that to the training data array. The problem is that there is over 10,000 images. This is the code for manually flipping each…
0
votes
0 answers

is there a way to apply data augmentation on a numpy array of images?

I was wondering if it's possible to apply data augmentation on my NumPy array of images instead of using it with the help of image data generator I'm currently working on Keras framework
0
votes
1 answer

Passing single image throwing error through imgaug

I found an example on:https://github.com/aleju/imgaug You can check the example under this :https://github.com/aleju/imgaug#example-augment-images-and-bounding-boxes I am passing this image through it: This is code: import numpy as np import…
pink puffles
  • 93
  • 1
  • 10
0
votes
1 answer

Create custom datagenerator in Keras using my own dataset

I want to create my own custom DataGenerator on my own dataset. I have read all the images and stored the locations and their labels in two variables named images and labels. I have written this custom generator: def data_gen(img_folder, y,…
0
votes
1 answer

How to apply data-augmentation on acoustic datasets?

I have a small acoustic dataset of human sounds which I would like to augment and later pass to a binary classifier. I am familiar with data augmentation for images, but how is it done for acoustic datasets? I've found 2 related answers regarding…
21kc
  • 23
  • 5
0
votes
1 answer

Error during reading an image using skimage

I have been trying to read a bunch of images from a specific path , the code I am using is ~ images = [os.path.join(folder_path, f) for f in os.listdir(folder_path) if os.path.isfile(os.path.join(folder_path, f))] num_generated_files = 0 while…
0
votes
2 answers

Combine two data generator to train a CNN

I am trying to train a model using a dataset that i split in two parts, for each part i create a different ImageDataGenerator using keras and tensorflow. my question is , how to combine the data from both of my generators to train the model. I don t…
Soufiane
  • 368
  • 1
  • 3
  • 14
0
votes
1 answer

How do i disable the flipping of images on Darkflow YOLOv2?

I am currently training a model based on orientation. I want to be able to train a model that can tell the estimated orientation of an object. Currently, i am at around 1000 epoch and the accuracy is not good. My theory is that the flip operation…
0
votes
1 answer

ImageDataGenerator - trained with model.fit instead of model.fit_generator

I am a beginner in using the ImageDataGenerator from Keras and I accidentally used model.fit instead of model.fit_generator. train_gen = gen_Image_data() test_gen = ImageDataGenerator() train_samples = train_gen.flow(X,y, batch_size=64) test_samples…
Code Now
  • 711
  • 2
  • 9
  • 20