You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was experimenting with albumentations functions when I found this bug. If "ignore_values" parameter in "CropNonEmptyMaskIfExists" isn't explicitly assigned a value, the transformation may modify the masks passed to it.
To Reproduce
Steps to reproduce the behavior:
import albumentations as A
import numpy as np
a = numpy.array([[1,2],[3,4]])
b = numpy.array([[5,6],[7,8]])
img = numpy.array([[11,12],[13,14]])
transform = A.augmentations.crops.transforms.CropNonEmptyMaskIfExists(1,2)
out = transform(image = img, masks = [a,b])
Expected behavior
According to the documentation, I assumed the transformation will work as if ignore_values=[0] and simply give a randomly cropped image and masks. However, the values of variable "out" are:
Setting "ignore_channels" parameter wouldn't change this behavior. However, if "mask" was passed instead of "masks", the transformation would work as it's supposed to.
Environment
Albumentations version (e.g., 0.1.8): 1.1.0
Python version (e.g., 3.7): python 3.9.6
OS (e.g., Linux): windows 10
How you installed albumentations (conda, pip, source): pip
The text was updated successfully, but these errors were encountered:
🐛 Bug
I was experimenting with albumentations functions when I found this bug. If "ignore_values" parameter in "CropNonEmptyMaskIfExists" isn't explicitly assigned a value, the transformation may modify the masks passed to it.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
According to the documentation, I assumed the transformation will work as if ignore_values=[0] and simply give a randomly cropped image and masks. However, the values of variable "out" are:
Meanwhile, the values of "a" are now:
Setting "ignore_channels" parameter wouldn't change this behavior. However, if "mask" was passed instead of "masks", the transformation would work as it's supposed to.
Environment
conda
,pip
, source): pipThe text was updated successfully, but these errors were encountered: