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 would expect that the parameter related to the visibility is applyable at the instance level.
I mean if the bbox is not enough visible, it should remove the corresponding mask.
but in that case it does not apply augmentation on the masks.
To Reproduce
In order to reproduce, you can use the code bellow :
importalbumentationsasAimportnumpyasnpimg=np.zeros((2048, 2048, 3), dtype=np.uint8)
# Format des bbox : [x_min, y_min, x_max, y_max]bboxes= [
[800, 800, 1200, 1200], # bbox à l'intérieur du recadrage
[1500, 1500, 1700, 1700] # bbox à l'extérieur du recadrage
]
labels= [0,1]
masks= [
np.zeros((2048, 2048), dtype=np.uint8),
np.zeros((2048, 2048), dtype=np.uint8)
]
masks[0][800:1200, 800:1200] =1masks[1][1500:1700, 1500:1700] =1aug=A.Compose(
[
A.CenterCrop(1024, 1024)
],
bbox_params=A.BboxParams(format='pascal_voc', label_fields=['labels'],min_visibility=0.3),
)
# Apply Transformationaugmented=aug(image=img, bboxes=bboxes, masks=masks, labels=[0, 1])
# Get back resultsprint(len(augmented['bboxes']))
print(len(augmented['labels']))
print(len(augmented['masks']))
# Returns112=>Shouldbe1
Expected behavior
I would expect that the parameter related to the visibility is applyable at the instance level.
I mean if the bbox is not enough visible, it should remove the corresponding mask.
Actual behavior
If i do not add masks to label_fields, i have inconsistency.
If i do add masks to label_fields, augmentations are not applyed to it.
The text was updated successfully, but these errors were encountered:
Describe the bug
I work on a usecase of instance segmentation with torchvision. In this case, i have :
I'have created an augmentation set with albumentation, something like that :
I would expect that the parameter related to the visibility is applyable at the instance level.
I mean if the bbox is not enough visible, it should remove the corresponding mask.
I tried adding "masks" in the bbox_params :
but in that case it does not apply augmentation on the masks.
To Reproduce
In order to reproduce, you can use the code bellow :
Expected behavior
I would expect that the parameter related to the visibility is applyable at the instance level.
I mean if the bbox is not enough visible, it should remove the corresponding mask.
Actual behavior
If i do not add masks to label_fields, i have inconsistency.
If i do add masks to label_fields, augmentations are not applyed to it.
The text was updated successfully, but these errors were encountered: