Sunalwing opened a new issue #19571:
URL: https://github.com/apache/incubator-mxnet/issues/19571


   What I think is that imageRecordIter is meant to use with .rec files saved 
with image in BGR format, and outputs data in RGB as gluon network expects. (By 
the way can you confirm that assumption on gluon?)
   
   Actually im2rec.py scripts given by mxnet reads the image with opencv 
(cv2.imread) if the "pass-through" parameters is true,  and pack it into the 
.rec files. So in that case, the .rec files stored data in BGR (opencv format), 
imageRecordIter correctly applies color normalisation on the correct channel, 
and flip back the channel for the output image to be in RGB. 
   
   What it seems wrong, is that im2rec.py does not always flip the channel, for 
example, when the "pass-through" parameters is not set. And in the 
documentation of ImageRecordIter, there is no trace of BGR vs RGB format.
   
   _Originally posted by @anotinelg in 
https://github.com/apache/incubator-mxnet/discussions/15710#discussioncomment-62741_


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@mxnet.apache.org
For additional commands, e-mail: issues-h...@mxnet.apache.org

Reply via email to