Questions tagged [data-augmentation]
The data-augmentation tag has no usage guidance, but it has a tag wiki.
470
questions
-1
votes
0
answers
15
views
AttributeError: module 'keras.api._v2.keras.layers.experimental.preprocessing' has no attribute 'RandomBrightness'
AttributeError: module 'keras.api._v2.keras.layers.experimental.preprocessing' has no attribute 'RandomBrightness' while data augmentation ,
preprocessing.RandomBrightness(0.2), preprocessing....
0
votes
0
answers
14
views
Save batches of images for each epochs in Tensorflow via ImageDataGenerator
I create batches of images using ImageDataGenerator function in Tensorflow.
I know that each batch of images for each epochs is slightly different according to the different transformations that ...
0
votes
0
answers
16
views
Facing Auto Augmentation Problem in YOLO-NAS
I have trained a YOLO-NAS L model for some Pavement markings like Crossmarks, Left arrow, Right arrow, Bike lane, Junction etc. While testing the model on Unseen data the right and left arrow is ...
0
votes
1
answer
25
views
Applying MONAI transforms to sequences of images uniformly
I am working with a medical dataset in which each datapoint is a sequence of 10 images. I want to apply MONAI transforms (Rand2DElastic, RandRotate, RandZoom, RandGaussianNoise) to these sequences for ...
1
vote
1
answer
57
views
TypeError: time_stretch() takes 1 positional argument but 2 were given
enter image description here
def stretch(data, rate=0.8):
return librosa.effects.time_stretch(data, rate)
x = stretch(data)
plt.figure(figsize=(14,4))
librosa.display.waveplot(y=x, sr=sample_rate)...
0
votes
0
answers
33
views
How do I implement CutMix augmentation for semantic segmentation in PyTorch?
Context: I'm working on a binary semantic segmentation task on 3D medical images, using PyTorch and MONAI. Currently I have setup my Dataset and DataLoader using the dictionary API of the MONAI ...
0
votes
0
answers
17
views
data augmentation using pytorch : making additional data
and I want to apply data augmentation to my dataset using pytorch and I am working with the faceLandmarks dataset in th official pytorch exemple and instead of making transformation on the fly at ...
0
votes
0
answers
20
views
problem applying augmentation on train data
I have image dataset of 102 images belong to 3 classes. I have stored the image_path, label, image (loaded using io so its np.array) in a dataframe. Split to train test val, then I'm trying to apply ...
0
votes
0
answers
30
views
Computing coordinates of points of an image after elastic deformation
My task is: given an image and set of points of interest, elastically and randomly deform the image and save it with the modified aforementioned points.
example: (blue points are the points of ...
0
votes
0
answers
63
views
Populate augumented Data in data frame
I have an unbalanced multi-class banking text data with around 76 classes.
Classes are badly distributed such as one class which is combination of 240 other different categories, represents 50% of ...
-1
votes
1
answer
47
views
Insufficient Training Data for GAN Model - Seeking Augmentation Methods
I am currently working on training a Generative Adversarial Network (GAN) model and I am facing some challenges. I have a dataset of approximately 100 MRI slices of the pelvis, but it seems that this ...
-1
votes
1
answer
35
views
Highly imbalanced Alzheimer's Disease MRI image dataset
I am currently doing my final year project and I need your humble opinion. My dataset consists of 4 classes which contain :
Mild demented - 896 images
Moderate demented - 64 images
Non demented - 3200 ...
1
vote
0
answers
781
views
runtime error trying to resize storage that is not resizable
I am working on a script with data augmentation techniques centercropping,cornercropping and horizontalflip
and I want to keep only the centercropping an horizontalflip
this is the functions
the first ...
0
votes
0
answers
21
views
How to add Data_augmentation to a CNN Sequential model with CIFAR10 dataset
####New to the stack overflow community. Thank you in advance for everyone's help####
I am trying to add data augmentation to a CNN Sequential Model to see how it affects on generalization. I have ...
0
votes
1
answer
190
views
zoom in and zoom out images for training dataset augmentation
I want to train a deep learning model with some image data. Since my dataset is small, I want to perform a zoom-in and zoom-out augmentation to get a 3 times larger dataset. I have done the zoom-in ...
0
votes
0
answers
20
views
Generate Artificial Data for Small Infrared Object Detection Task
I want to use GANs to generate artificial data or do data augmentation for object detection tasks, especially "small object detection" in "infrared space", such as detecting drones ...
0
votes
2
answers
609
views
How to add additional augmentation to yolov8 model training
I have tried to modify existig augument.py code in yolov8 repository but it is still implementing the default albumentations while training. Is there any method to add additonal albumentations.
This ...
0
votes
0
answers
44
views
fine-tuning an efficentnet_lite1 model with tflite model maker
i am fine-tuning an efficentnet_lite1 model to train it on my own data using tflite model maker:
spec = model_spec.get("efficientdet_lite1")
model = object_detector.create(train_data, ...
0
votes
0
answers
104
views
K-fold cross validation in PyTorch, augmenting train and valid data separately
I want to perform k-fold CV, but in my past approach, the augmentations where leaking into the validation dataset.
For this, I am using the WrapperDataset class, I found in this post: Augmenting only ...
-1
votes
1
answer
48
views
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 ...
0
votes
1
answer
183
views
'label_fields' are not valid even when assigning label fields in Albumentations
I'm using albumentations with the following code:
augmentor = alb.Compose([alb.RandomCrop(width=450, height=450),
alb.HorizontalFlip(p=0.5),
...
0
votes
2
answers
2k
views
YOLOv8 - What is the clean and correct way to specify augmentation parameter?
as the title says, how do I set parameters for augmentation while using YOLOv8? I want to use the Python SDK and not the CLI commands.
The mantainer of the repo refer several times to
https://docs....
0
votes
1
answer
25
views
In this case, is there a different augmentation for each epoch?
I want different augmentation to be applied to each epoch
Below is part of my training code
for epoch in range(100):
for i, data in enumerate(train_dataset):
#training code
And DataLoader's ...
-1
votes
1
answer
629
views
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) ...
0
votes
0
answers
44
views
On-the-fly data augmentation
I would like to train a dataset for images on the fly adversarial. That means I would have to apply data augmentation on the fly and additionally I could integrate different attacks and sampling ...
0
votes
0
answers
35
views
How can I use data augmentation for images with more than 3 channels?
I have X_train images of shape [256, 256, 8] and their corresponding y_train matrix with shape of [256, 256] as follows:
import numpy as np
X_train = [np.random.rand(256, 256, 8) for i in range(100)]
...
0
votes
0
answers
12
views
Training labels unequal distribution
My task is to estimate diastolic blood pressure (DBP) from PPG and ECG data. However the DBP labels are distributed unequally.
I am using Diastolic blood pressure as training labels. The range that I ...
0
votes
0
answers
17
views
Multi-channel "local variation augmentation"
I'm trying to augment my sensor data (M samples x N channels) according to a method called "local variation augmentation" described in EMGSense: A Low-Effort Self-Supervised Domain ...
0
votes
0
answers
18
views
Trouble with Keras ImageDataGenerator .flow()
I was writing down some lines to implement an image data augmentation step im my galaxy image ML classification project. I have a dataset of N images of format (300x300x3). I chose the Tf.keras ...
0
votes
1
answer
84
views
Data augmentation using PyTorch
I'm using torchvision.transforms.Compose function to construct a transformation object to use it for data augmentation.
When I call the class BloodCellDataSet without a transform, it returns the ...
0
votes
0
answers
135
views
Augmentation and transformations in Detectron2
I'm working on a custom Faster RCNN with Detectron2 framework and I have a doubt about transformation during training and inference. I created a custom Trainer inheriting from DefaultTrainer class and ...
0
votes
0
answers
128
views
How can I accurately extract dimensions and coordinates of rectangles using OpenCV in Python?
I am currently trying to get the right dimensions/coordinates of some rectangles (check picture below) . I have so far tried two methods ;
the first being through contours where I get the contours of ...
0
votes
0
answers
302
views
Data augmentation using keras.layers.RandomRotation() doesnt yield same results
In my project I have dataset of original images and correcponding masks. I want to perform augmentation so it is random, yet same for image and matching mask. For this I have defined keras sequential ...
0
votes
0
answers
12
views
How do I replace a string in this code example so it runs through a whole column of strings from my df?
Let's say I have the code below, but I don't want to have to manually enter different strings after the t.augment. How do I change it so it will run down a list of strings from my dataframe and ...
1
vote
0
answers
103
views
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 ...
0
votes
0
answers
64
views
Is there a way to use "from torchvision import transforms" to perform data augmentation for semantic segmentaion task in PyTorch?
I have seen many examples with Albumentation library after writing own class for the custom data. However I dunno if we could do augmentation with transforms.compose() directly using PyTorch for ...
1
vote
0
answers
90
views
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 ...
0
votes
2
answers
448
views
Data augmentation in Pytorch for CNN
I want to do data augmentation to my set of images in order to have more data to train a convolutional neural network in Pytorch.
Example of transnformations:
train_transforms = Compose([LoadImage(...
0
votes
0
answers
22
views
Apply customized augmentations using tensorflow object detection api
I'm quite new to tensorflow and I was trying to train an object detector using their api. I was wondering if there is a way to pass customized augmentations in the .config file or include them in some ...
1
vote
1
answer
209
views
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 ...
0
votes
0
answers
83
views
How to convert yolo format annotations after applying rotation to the image?
I tried to apply a function that rotate a point then tries to rotate the annotation, but I get many bad results... any idea on how to improve on it?
Images are squared and of 640x640 size
Images are ...
0
votes
0
answers
15
views
Prediction after Data Augmentation
Good morning everyone, I have to predict y_new from an augmented dataset of 5000 simulated x_new but it returns me the same number of y_new as my original model and not 5000 like the simulated.
Good ...
0
votes
0
answers
16
views
Adding Number of Sequence into dataset
I will adding the number of sequence to original data. each array will be adding number of sequence based on iteration.
original data :
a = np.array([
[-0.939,3838,393],
[7.937,7373,283],
[...
1
vote
1
answer
240
views
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 ...
0
votes
0
answers
71
views
Custom Data Augmentation function does not align augmentation on image and mask
I'm not sure the way that I am using data augmentation for my semantic segmentation task is working properly. I define my own pyTorch Dataset PositiveOnly of images and their masks. However, when I ...
0
votes
1
answer
510
views
Apply Torchvision Transforms to a numpy array
I wrote the following code:
transform = transforms.Compose([
transforms.ToPILImage(),
transforms.RandomResizedCrop(224),
transforms.RandomHorizontalFlip(),
transforms.ToTensor(),
...
1
vote
0
answers
96
views
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....
0
votes
0
answers
92
views
keras.fit doesn't display validations results
model.fit(train_set , steps_per_epoch = train_set.n//32, epochs = 100 , validation_data =test_set ,validation_steps = valid_set.n//32 )
Epoch 1/100
1/1 [==============================] - 6s 6s/step - ...
0
votes
0
answers
27
views
I want to apply augmentation on the traning dataset.But i am recieving an error with the system is crushed after it used the available RAM
I am using Resent50 model to classify ultrasound images in to fatty liver and normal liver.while training the model i have received high accuracy on the training set than validation set.The model is ...
0
votes
0
answers
230
views
Albumentations - TypeError: clahe supports only uint8 inputs
I have the following augmentations in my code
import albumentations as A
import torch
def get_train_transform():
transform = A.Compose([
A.RandomRotate90(),
A.Flip(),
A.Transpose(),
...