anotinelg commented on issue #15710: Inconsistent behaviour of ImageRecordIter 
depending on encoding format png vs jpeg
URL: 
https://github.com/apache/incubator-mxnet/issues/15710#issuecomment-518554165
 
 
   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.
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to