Bug with masks
See original GitHub issue🐛 Bug
The masks do not follow the rotation of the images
To Reproduce
Steps to reproduce the behavior:
1.Define the following transformation:
from albumentations import (
PadIfNeeded,
HorizontalFlip,
VerticalFlip,
CenterCrop,
Crop,
Compose,
Transpose,
RandomRotate90,
ElasticTransform,
GridDistortion,
OpticalDistortion,
RandomSizedCrop,
OneOf,
CLAHE,
RandomBrightnessContrast,
RandomGamma,
RandomScale,
LongestMaxSize
)
from albumentations.pytorch.transforms import ToTensor as AlbToTensor
inputs_transformations = Compose([
RandomScale(scale_limit=0.3, p=0.5),
LongestMaxSize(256),
HorizontalFlip(p=0.3),
VerticalFlip(p=0.3),
CLAHE(p=0.5),
RandomBrightnessContrast(p=0.5),
RandomGamma(p=0.5),
AlbToTensor()])
I am using kaggle penumonothorax dataset The result of applying three different transformations to the image and the mask can have the following result:
As you can see, the image is horizontally flipped, whereas the mask is vertically filpped.
Version I use is from pip: 0.3.0
The same error can be seen when applying Flip
transform
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
31 Bugs And Insect Masks ideas - Pinterest
Apr 19, 2019 - Explore Nicole Meyer's board "Bugs And Insect Masks" on Pinterest. See more ideas about bugs and insects, animal masks,...
Read more >bug masks for head - Amazon.com
Minelife 4 Pack Head Net Face Mesh, Mosquito Hat Mask Head Cover for Camping Hiking Fishing Protecting from Insect Bug Bee Mosquito Gnats...
Read more >Bug Mask - Walmart.com
Shop for Bug Mask at Walmart.com. Save money. Live better. ... HEMOTON 2 PCS Anti-mosquito Bee Bug Insect Fly Mask Cap Hat with...
Read more >Bug Mask - Etsy
Browse a wide selection of bug mask and face coverings available in various fabrics and configurations, made by a community of small ...
Read more >Bug Face Masks for Sale - Redbubble
Wear a mask, wash your hands, stay safe. Shop unique Bug face masks designed and sold by independent artists. Get up to 20%...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yeah, we will consider supporting non-rgb or even add warning to all transforms which does not support grayscale
This is a subtle bug, spent an hour figuring it out. There should be a warning for non three channel cases. As of now, it returns the transposed image (weird, yeah) @albu what do you think?