Questions tagged [image-augmentation]
84 questions
4
votes
1 answer
Normalization before and after Albumentations augmentations?
I use Albumentations augmentations in my computer vision tasks. However, I don't fully understand when to use normalization on my images (I use min-max normalization). Do I need to use normalization before augmentation functions, but values would…

ztsv-av
- 91
- 7
4
votes
1 answer
Keras ImageDataGenerator brightness range
In the docs for Keras ImageDataGenerator, there is reference to an arg called brightness_range (default None). The documentation says that this arg accepts
Tuple or list of two floats. Range for picking a brightness shift value from.
That is…

Yehuda
- 1,787
- 2
- 15
- 49
3
votes
2 answers
Difference between channel_shift_range and brightness_range in ImageDataGenerator (Keras)?
There are multiple pages (like this and this) that present examples about the effect of channel_shift_range in images. At first glance, it appears as if the images have only had a change in brightness applied.
This issue has multiple comments…

Tedpac
- 862
- 6
- 14
3
votes
1 answer
How to save augmented images using ImageDataGenerator and flow_from_directory in keras
I want to augment images that are in two different directories (folders: benign/malignant) using ImageDataGenerator in Keras.
Then I want to save the augmented images of each class in a separate folder.
My directory structure is like as…

ma_shamshiri
- 61
- 1
- 9
2
votes
1 answer
Augmentation layer warnings in tensorflow 2.10
In tensorflow 2.10.0 I am trying some data augmentation layers, for example:
data_augmentation = keras.Sequential(
[
layers.RandomFlip('horizontal'),
layers.RandomRotation(0.1),#rad
layers.RandomZoom(0.2)
])
#let's…

roschach
- 8,390
- 14
- 74
- 124
2
votes
1 answer
I got error trying to use albumentations on tensorflow data pipeline
Im pretty new at deep learning and tensorflow, then when i try to use albumentations on tensorflow data pipeline, this error occurs (i use google colabs):
error: OpenCV(4.1.2) /io/opencv/modules/core/src/matrix.cpp:757: error: (-215:Assertion…

Yusuf Syam
- 701
- 1
- 4
- 18
2
votes
1 answer
Image augmentation on deep learning training data
I have a question about mean and standard deviation in image augmentation.
Are the two parameters recommended to be filled in?
If so, how could I know the number? Do I have to iterate through the data, also each channel of image, before the train to…

Amnesie
- 31
- 4
2
votes
1 answer
How resize dataset label in albumentations label to work with tensorflow image_dataset_from_directory function?
I am running the following code:
[https://pastebin.com/LK8tKZtN]
The error obtained is following:
File "C:\Users\Admin\PycharmProjects\BugsClassfications\main2.py",
line 45, in set_shapes *
label.set_shape([])
ValueError: Shapes must be equal…

Ion Caciula
- 45
- 4
2
votes
0 answers
How to fit data for augmentation to avoid out of memory error?
Doing augmentation for training segmentation but the total number of images is about 26,000+. That's the reason facing problem in making an array of images.
Tried:
def get_data():
X_data = []
train_images =…

MSI
- 105
- 9
2
votes
1 answer
Getting this while using pytorch transforms--->TypeError: integer argument expected, got float
I cloned transfer-learning-library repo and working on maximum classifier discrepancy. I am trying to change the augmentation but getting the following error
Traceback (most recent call last):
File "mcd.py", line 378, in
main(args)
…

hs_s
- 53
- 5
2
votes
0 answers
How augmentation increase number of images
I am confused about how augmentation increases the number of images. Can I calculate it?
Let say I have 10 images in batch
def augmentation():
aug=transforms.Compose([
transforms.Resize(size=(248,248)),
…

Talha Anwar
- 2,699
- 4
- 23
- 62
2
votes
1 answer
how to create an augmented dataset in pythorch
I have to add to the original CIFAR dataset, for each image, the corrispondent ones, rotated by 90 deg. The idea is to create the a RotationDateset, a class which extends datasets.VisionDataset, which takes the CIFAR and does what describes…

Marco Verderami
- 31
- 1
- 4
1
vote
2 answers
Getting AttributeError: 'FigureCanvasAgg' object has no attribute 'set_window_title' using IMGAUG python package
I have found this simple code below on some internet page, but I'm getting an error trying to execute it on my laptop. It should display an image with some bounding boxes on it.
The error occurs not in my code, but in ingaug.py, so inside of the…

tomxor
- 11
- 1
- 2
1
vote
1 answer
How can I apply imgaug augmentation to a tensorflow dataset created with dataset_from_directory?
I'm curently trying to apply some data augmentation using imgaug to my existing trainDataset.
The dataset is created using dataset_from_directory as shown below.
trainDataset = tf.keras.utils.image_dataset_from_directory(
directory,
…

prmrab146
- 11
- 3
1
vote
0 answers
How to save file adding previous name as prefix after ImageDataGenerator
Using ImageDataGenerator of Keras.
suppose my folder structure is like
a -
1.jpg
2.jpg
3.jpg
b -
5.jpg
6.jpg
7.jpg
I am doing the augmentation like below :
for i in range (20):
for label in LABELS: # "LABELS" is the folder name…

siam
- 109
- 7