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 'imgaug Flipud' is not working for polygons?

import imgaug as ia import imgaug.augmenters as iaa import cv2 import numpy as np import matplotlib.pyplot as plt # image is numpy array of size (327, 327, 3). images = np.expand_dims(image, axis=0) # define polygons polygons = [ [ …
Sanchit.Jain
  • 568
  • 2
  • 7
0
votes
1 answer

How to append images to a list inside a Keras network

I would like to append the images which are procurred by the ImageDataGenerators to two different lists. I believed I could do that with a lambda layer but I am getting an error message. For a toy example see the code below. You can use any set…
0
votes
1 answer

Keras - CNN - adjust dataset - remove biased class and data augmentation attempt

I have a a predicament with the model I am developing based on a popular dataset of skin-cancer images. I have to points I'd like some guidance on - A. The original dataset is over +10K images with which almost 7000 images belong to one of the…
OAK
  • 2,994
  • 9
  • 36
  • 49
0
votes
2 answers

Is it the right way for data augumentation for training a model?

I'm new to keras and deep learning. I'have tried to use data augmentation for for training my model, but not sure if i'm doing it the right way. Can anyone assure me it my approach is correct? here is my code: train_path = 'Digital_Mamo/OPTIMAM' …
Annanya
  • 7
  • 8
0
votes
1 answer

How to use augumented data when using transfer learning?

I have used VGG16 for transfer learning and got very low accuracy. Is it possible to use data augmentation technique to increase the accuracy when using transfer learning? Following is the code for better understanding: # Show the image…
0
votes
1 answer

How to do object detection on high resolution images?

I have images of around 2000 X 2000 pixels. The objects that I am trying to identify are of smaller sizes (typically around 100 X 100 pixels), but there are lot of them. I don't want to resize the input images, apply object detection and rescale the…
exAres
  • 4,806
  • 16
  • 53
  • 95
0
votes
0 answers

Balancing an Unbalanced Dataset with K-Fold Cross Validation

I'm trying to train/validate a CNN using Pytorch on an unbalanced image dataset (class 1:250 images, class 0: 4000ish images), and right now, I've tried augmentation solely on my training set (thanks @jodag). However, my model is still learning to…
jinsom
  • 125
  • 1
  • 11
0
votes
1 answer

Data transformation cropping with Normal Distribution using Pytorch

I running a model on unsupervised learning for images. Before the images go in for learning I am performing various data augmentations, such as rotate, random erasing, flips, etc. However, I would like to also crop my images based on their…
Eilleen
  • 357
  • 1
  • 16
0
votes
0 answers

Rotating image and its key points label in tensorflow2.0

I am trying to add rotation to my dataset of images where the labels have some facial keypoints. tf.contrib is removed from tensorflow 2.0 and any other library like PIL does not work as I am using tf.data.Dataset. I need angle rotated to be random…
0
votes
1 answer

Data augmentation in training only with tensorflow

I want to do some random augmentation , only at train time. I've combined the augmentation as part of the graph - which I think is kind of mistake since the same graph is used for testing also - and I don't want the test images to be augmented. x =…
M.F
  • 345
  • 3
  • 15
0
votes
1 answer

How to combine two RGB images along the depth axis to prepare 6-channel input data while using Keras flow_from_directory?

The train_generator reads batches of RGB image data from disk using Keras flow_from_directory (example code below). But in my case, I have two directory of images such that I want to read a pair of images and stack them along the depth-axis to form…
0
votes
0 answers

Can choose some data in training data after doing data augmentation?

I am training a UNET for semantic segmentation but I only have 200 labeled images. Given the small size of the dataset, it definitely needs some data augmentation techniques. I have question about the test and the validation set. I have custom data…
Pro_gram_mer
  • 749
  • 3
  • 7
  • 20
0
votes
1 answer

Mask tensors parts in tensorflow, data augmentation

I am trying to implement the following paper: https://arxiv.org/abs/1904.08779 in order to achieve better results in Speech to Text. I am trying to implement it using the mozilla DeepSpeech repo. It uses the tensorflow dataset model to load the…
0
votes
1 answer

What are the disadvantages of mirroring CNN training images that contain anchored data?

I am training various CNNs (AlexNet, InceptionV3 and ResNet). The dataset consists of screen captures of a game and an array of 4 classes representing the input for that given capture as [w,a,s,d]. To reduce the data I need to gather, I've looked…
Roqux
  • 608
  • 1
  • 11
  • 25
0
votes
1 answer

Tensorflow 2.0 CNN training: Image augmentation function shifts pixel values outside of the [0, 1] range. Is this a problem?

I am working on my specific data augmentation function to train a CNN in TensorFlow 2.0. The image data I'm using are stored in a numpy multidimensional RGB array; all its pixel values are floats in the [0, 1] range. While playing with function…
Leevo
  • 1,683
  • 2
  • 17
  • 34