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
2
votes
0 answers

steps_per_epoch for keras model.fit with data augmentation

I am using tensorflow+keras. I am unsure about the steps_per_epoch parameter in model.fit when using data augmentation. My data augmentation is done using map function in tfrecord, not the image generator in keras. In this way, if I augment my data…
Lianli Liu
  • 21
  • 2
2
votes
1 answer

Keras: poor performance with ImageDataGenerator

I try to augment my image data using the Keras ImageDataGenerator. My task is a regression task, where an input image results in another, transformed image. So far so good, works quite well. Here I wanted to apply data augmentation by using the…
Martin
  • 594
  • 1
  • 8
  • 32
2
votes
1 answer

Automatically make a composite image for cnn training

i would like to train a CNN for detection and classification of any kind of signs (mainly laboratory and safety markers) using tensorflow. While I can gather enough training data for the classification training set, using e.g. The Bing API, I‘m…
2
votes
1 answer

Use keras ImageDataGenerator with multiple preprocessing functions

Let say I wanted to train an image database with Keras, and I want to automatically generate new images using Keras ImageDataGenerator, the thing is that some functions are not available with the classical settings (flip, shift etc..) Is it possible…
Fou
  • 161
  • 1
  • 9
2
votes
1 answer

Data augmentation by zooming in

I want to augment my data set of images by creating new, synthetic images. One of the operations I want to try is zooming in, i.e. take a subsection of the original image (say 80% of the original size), and intelligently increase that subsection so…
1
vote
0 answers

How to add data augmentation to an object detection model (DETR) HuggingFace

I am trying to follow the Hugging Face DETR Tutorial for fine-tuning in my own dataset. Here they explain that some data augmentation techniques are applied. Note regarding data augmentation DETR actually uses several image augmentations during…
1
vote
0 answers

How to get and generate the Labels of the augmented data?

I am working on classification of images breast cancer using DensetNet121 pretrained model. I want to apply data augmentation on the training data. I tried on the below code to augment the data using Keras and ImageDataGenerator. The data augmented…
Eda
  • 565
  • 1
  • 7
  • 18
1
vote
1 answer

Tensorflow Keras RandomFlip is applying the same flip to all images

version: tensorflow-gpu 2.10.0 I have created a data augmentation layer that is applied during pre-processing. In addition to flips, it involves random changes in contrast, rotation and brightness. I use the following code to test the…
1
vote
1 answer

How to train XGBoost with probabilities instead of class?

I am trying to train an XGBoost classifier by inputting the training dataset and the training labels. The labels are one hot encodings and instead of sending in the classes such as [0,1,0,0], I wanted to send an inputs of the probabilities like…
Jeff Boker
  • 803
  • 1
  • 9
  • 25
1
vote
0 answers

How to visualize the result of data augmentation that we configured in pipeline.config of tensorflow model garden?

I am training an object detection model out of the TensorFlow Model Garden (namely, 'http://download.tensorflow.org/models/object_detection/tf2/20200711/ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8.tar.gz'). I configure my data augmentation in the…
1
vote
1 answer

Python nlpaug Sentece augmenter error (50256 is not in list)

The following code is yielding this error for both GPT2 and Xlnet bases. The download of the bases occurs, but the same error prompt is displayed at the end every time. I am using google colab, by the way. ValueError: 50256 is not in list ` import…
1
vote
0 answers

ValueError: Input arrays must be multi-channel 2D images

I am trying to do a deep learning model using Keras and VGG16 algorithm on DICOM images. I used thhe following data generator to process my images: `` # tested on tf 2.1 from keras_preprocessing.image.dataframe_iterator import DataFrameIterator …
1
vote
1 answer

PyTorch: Apply data augmentation on training data after random_split

I have a dataset that does not have separate folders for training and testing. I want to apply data augmentation with transforms only on the training data after doing the split train_data, valid_data = D.random_split(dataset, lengths=[train_size,…
alice
  • 59
  • 1
  • 2
  • 7
1
vote
1 answer

TypeError: 'bool' object is not callable

whenever I try run this code, I receive a TypeError: 'bool' object is not callable. How could I fix this? train_data = datasets.MNIST(root='D:\medical_imaging_radiation_therapy\medimg_udemy', train=True, download=True,…
aismail
  • 11
  • 1
1
vote
0 answers

Does torch.utils.data.ConcatDataset preserve individual torch.transforms on the datasets?

If I have two separate datasets declared with separate sets of torch.transforms, and then I concatenate the datasets using torch.utils.data.ConcatDataset to create the final dataset, will the different sets of transforms be preserved when the…