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

Do images with large dimensions (e.g. 2000 x 2000) be auto-scaled to 300 x 300 when using them for training data in AWS Sagemaker?

I'm working on a project that trains an ML model to predict the location of Waldo in a Where's Wally? image using AWS Sagemaker with the underlying object detection algorithm being Single Shot Detection, but I am thinking that using an actual puzzle…
0
votes
0 answers

Replace group of similor colored pixels with image - iOS

I am using the fritz person model and from that, I am getting one mask image of a person. Now, I want to add one different image on that mask. So, basically, I want to replace mask with some different image or in other words you can say I want to…
Prashant Gaikwad
  • 3,493
  • 1
  • 24
  • 26
0
votes
1 answer

Data Augmentation with torchvision.transforms in pytorch

I found out data augmentation can be done in PyTorch by using torchvision.transforms. I also read that transformations are apllied at each epoch. So I'm wondering whether or not the effect of copying each sample multiple times and then applying…
Farzad
  • 113
  • 1
  • 8
0
votes
0 answers

Read training files one by one in datagenerator

I have a very large dataset that does not fit into memory I split it into files and I want to use them in a data generator for training I use the following code def csv_image_generator(i,inputPath1, bs, lb, mode="train", aug=None): # open the…
0
votes
1 answer

How to calculate the amount of generated images from the image augmentation API of keras

I want to calculate the amount of generated images from the image augmentation API from Keras. It is unclear to me if each setting is also used in combination with other settings. I have the following settings: Rotation range: 0.2, Width shift:…
Eeuwigestudent1
  • 161
  • 1
  • 2
  • 13
0
votes
2 answers

Data augmentation in validation

I am a little bit confused about the data augmentation. If I perform data augmentation in train dataset, validation dataset should have the same operations? For example data_transforms = { 'train': transforms.Compose([ …
Ce Jiang
  • 3
  • 2
0
votes
1 answer

How many images are generated by keras fit_generator?

I use keras to do image augmentation and segmentation. I want to investigate the number of images generated, so I test the following setting of arguments: (1) set batch_size as 1 in flow_from_directory when define the generator: def myGene(...): …
George
  • 45
  • 7
0
votes
1 answer

How to replace words with their synonyms of word-net?

i want to do data augmentation for sentiment analysis task by replacing words with it's synonyms from wordnet but replacing is random i want to loop over the synonyms and replace word with all synonyms one at the time to increase…
0
votes
1 answer

Why do some images save properly and others don't when using ImageDataGenerator and .flow()?

I have been trying to augment some training data and the corresponding labels using ImageDataGenerator. Here's the way I've approached it (apologies if the formatting is a bit off) def create_morph(): i = 0 img_type = 'png' #get the path to…
B1ueMang0
  • 33
  • 1
  • 5
0
votes
1 answer

Inconsistent augmentation results for masks and images while flipping in tensorflow

I am currently trying to implement my own function to do paired data augmentation in tensorflow. To do this, I need to apply random image transformations to the input image and relevant transformations to the output mask (i.e. rotations and…
iliupersis
  • 61
  • 6
0
votes
0 answers

Tensorflow ImageDataGenerator Number of Outputs

Please forgive me if this is a silly question, I only recently started using tensorflow's data augmentation capabilities and I want to know how tell how many different variation the ImageDataGenerator produces for each inputed image. A copy of the…
0
votes
1 answer

Data Augmentation hurts accuracy Keras

I'm trying to adapt Deep Learning with Python section 5.3 Feature extraction with Data Augmentation to a 3-class problem with resnet50 (imagenet weights). Full code at https://github.com/morenoh149/plantdisease from keras import models from keras…
Harry Moreno
  • 10,231
  • 7
  • 64
  • 116
0
votes
1 answer

using Keras' flow_from_directory with FCNN

I trained a constitutional neural net for image segmentation with Keras successfully. Now I am trying to improve performance applying some data augmentation to my images. To do so I use the ImageDataGenerator and then flow_from_directory to load…
lorenzori
  • 737
  • 7
  • 23
-1
votes
1 answer

How to handle Data Augmentation?

I'm building a CNN to perform a binary image classification. However, my dataset is very unbalanced with 10000 images from one class and the oter contains only 3000 (more or less). That's how my model is looking so far: model_1 = Sequential([ …
-1
votes
1 answer

Data Augmentation for instance segmentation yolov8

I have been trying to train yolov8 instance segmentation model but before that I have to augment data. I could not find any resources for instance segmentation (which is labeled by polygons not mask) about positional augmentation technics such as…
1 2 3
30
31