-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem reading 4 channels .png image using ImageDeserializer #2332
Comments
Are you working on segmentation? Can you use composite reader to load two images? |
Yes, I'm trying to do prediction on the alpha channel. I was actually using composite reader like you suggested at first, but there is a bug where both readers will not get the same random transform for minibatch size > 1, according to issue #2309. So I was hoping I could just load the image as 4 channels as a workaround. Will there be any problem if the flag is set to cv::IMREAD_UNCHANGED? |
I see. There should not be an issue to load with cv::IMREAD_UNCHANGED. Can you tell me what's your difficulty compiling the source? |
I'm not quite sure what the problems are, I have followed the development environment setup described here: https://docs.microsoft.com/en-us/cognitive-toolkit/setup-cntk-with-script-on-windows. But still got a lot of errors as following: Severity Code Description Project File Line Suppression State |
I have manged to compile the image deserializer by turning off some projects' treat warning as errors. I will close this for now. |
Hi,
I am having trouble read in 4 channels .png images with ImageDeserializer. What I am trying to do is read the 4 channel images, and split the alpha channel as my groundtruth label. Something like:
but the image does not seem to be loading correctly. From my understanding, flag cv::IMREAD_COLOR in ImageDataDeserializer.cpp line 298 will only read the color image as 3 channels, to make it support 4 channels, will it be better if the flag is changed to cv::IMREAD_UNCHANGED (sorry I have trouble compiling the source, can not try it myself)?
The text was updated successfully, but these errors were encountered: