Questions tagged [albumentations]

62 questions
3
votes
2 answers

using ImageFolder with albumentations in pytorch

I have a situation where I need to use ImageFolder with the albumentations lib to make the augmentations in pytorch - custom dataloader is not an option. To this end, I am stumped and I am not able to get ImageFolder to work with albumenations. I…
AJW
  • 5,569
  • 10
  • 44
  • 57
2
votes
2 answers

How to use Custom (or albumentation) augmentations on Detectron 2?

I have the below code where I'm using default augmentation during training of Detectron 2 but the problem is that there are very few augmentations that are useful to me. Here is something like what I to achieve with my own functions. This github…
Deshwal
  • 3,436
  • 4
  • 35
  • 94
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…
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…
2
votes
1 answer

Albumentations in Pytorch: Inconsistent Augmentation for multi-target datasets

I'm using Pytorch and want to perform the data augmentation of my images with Albumentations. My dataset object has two different targets: 'blurry' and 'sharp'. Each instance of both targets needs to have identical changes. When I try to perform the…
Ruffybeo
  • 78
  • 1
  • 9
2
votes
3 answers

Agumenting data in keras using albumentations

I am trying to train a keras ResNet50 model for image classification model using a tutorial. Instead of the inbuilt data generator, I want to use albumentations library for augmentation. from albumentations import Compose transforms =…
pkj
  • 559
  • 1
  • 9
  • 21
2
votes
3 answers

ValueError: Expected x_max for bbox (0.65, 0.51, 1.12, 0.64, 3) to be in the range [0.0, 1.0], got 1.1234809015877545

I want to apply data augmentations from PyTorch's Albumentations to images with bounding boxes. When I apply the HorizontalFlip Transformation, I receive this error ValueError: Expected x_max for bbox (0.6505353259854019, 0.517013871576637,…
2
votes
1 answer

AttributeError: 'MpoImageFile' object has no attribute 'shape'

images, labels = next(iter(self.loader)) grid = torchvision.utils.make_grid(images) images, labels = next(iter(self.loader)) triggers the error. I have a custom dataset class where I load each image (RGB) from an url : image =…
user
  • 93
  • 10
2
votes
1 answer

Getting truth value of array with more than one element in ambigous for albuementation transform

I am using albumentations for applying transform to a Pytorch model but getting this error and I m not getting any clue of what this error is about. Only thing I know is this is occuring due to transform which is being applied but not sure what is…
1
vote
0 answers

Pytorch: Segmentation model's dice score is not improving if i use augmentation

I am doing a brain MRI segmentation task using Unet model. My problem is it does no matter what transformation i use during training my val dice score after few epochs stucks around 77% score. I already have a successfuly trained model with 93% dice…
1
vote
1 answer

Loss becomes NaN in training

I am working on a Faster-RCNN model with below codes. I am using roboflow chess pieces dataset def get_model(n_classes): model = models.detection.fasterrcnn_mobilenet_v3_large_fpn(pretrained=True) in_features =…
1
vote
0 answers

OpenCV warpAffine error during image augmentation using Albumentations

I have been trying to do image augmentation using a library called Albumentations. But I got some error from OpenCV while transforming the images. I ran the code below on Kaggle's notebook. The dataset is called "Intel image classification" on…
1
vote
0 answers

Visualize image batch from DataLoader

I'm building a classifier for MIT Indoor Scenes dataset (https://web.mit.edu/torralba/www/indoor.html). Downloading the data gives me an 'Images' folder with 67 subfolders (for 67 classes), and different number of images within each subfolder. So…
Tejas
  • 131
  • 6
1
vote
1 answer

Albumentations error : __call__() got an unexpected keyword argument 'force_apply'

I try to make a simple dataloader with albumentations: train_transforms = A.Compose( [ A.GaussNoise(always_apply=False, p=0.4, var_limit=(0, 70.0)), A.Blur(always_apply=False, p=0.3, blur_limit=(3, 7)), …
1
vote
1 answer

Install albumentations with custom opencv-python version using pip?

The albumentations package requires some version of opencv-python. From setup.py: # If none of packages in first installed, install second package CHOOSE_INSTALL_REQUIRES = [ ( ("opencv-python>=4.1.1", "opencv-contrib-python>=4.1.1",…
dfrankow
  • 20,191
  • 41
  • 152
  • 214
1
2 3 4 5