Open aginpatrick opened 6 years ago
Hi, @aginpatrick. Thanks for opening the issue - well yes, if you convert to greyscale then you will have an image with a single layer. What you want is actually to save a greyscale image as an RGB or other 3 layer format? I can add that as a parameter, sure (if that's what you mean). M.
That's what I mean @mdbloice. Thank you by the way for your very useful package.
@mdbloice Actually I realized after testing it that the third dimension is preserved with Augmentor 0.1.10. Problem appears with Augmentor 0.2.0. Bug? EDIT: the shape is calculated on image with np.asarray(img).shape
I have been able to reproduce this bug.
Using augmentor 0.2.0 , pillow 5.0.0 and numpy 1.14.2. Printing np.asarray(image) of an augmented image gives me.
(350, 633)
Using augmentor 0.1.10 , pillow 5.0.0. and numpy 1.14.2. Printing np.asarray(image) of an augmented image gives me.
(350, 633, 3)
Ok I will fix this by adding a parameter to preserver the old functionality. I made some changes between versions because I figured by specifying greyscale, most users would want single layer images actually. But I will add a parameter so that you can specify that you want 3 layer RGB greyscale images.
Thank you :+1:
When B&W (or greyscale) transformation is applied to a RGB image, third channel is lost. Example: before transf, image shape is (436, 650, 3) and after it is (436, 650). Would it be possible (via a parameter maybe) to return result without losing dimension 3? ML frameworks often expect tensors of fixed size.