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-517643365
 
 
   thanks a lot @kshitij12345  for your reply. 
   
   First of all, I apologise for the code I put in the message, which was not 
even runnable (I have checked then)!
   Second, I am little bit confused on the results:
   -  I think my error is to have found a difference in behaviour between png 
and jpeg. I have re run my code, and now I do not find any difference (except 
that the lossy format of jpeg makes that the value are different. NOTA: if we 
use (0,100,200) instead of [0,1,2] we can easily guess where the channels are)
   - But in someway, I clearly see that there is an inversion of order in the 
channel, It looks like that the ImageRecordIter reorders the channel.
   in your results, your input image is:
   
   ```
   [[[  0.   1.   2.]
     [255. 255. 255.]
     [255. 255. 255.]]
   
    [[255. 255. 255.]
     [255. 255. 255.]
     [255. 255. 255.]]
   
    [[255. 255. 255.]
     [255. 255. 255.]
     [255. 255. 255.]]]
   ```
   
   and your output image after transposing to (H;W;C) is
   
   ```
   [[[[  2.   1.   0.]
      [255. 255. 255.]
      [255. 255. 255.]]
   
     [[255. 255. 255.]
      [255. 255. 255.]
      [255. 255. 255.]]
   
     [[255. 255. 255.]
      [255. 255. 255.]
      [255. 255. 255.]]]]
   ```
   Am I missing something?
   Thanks
   

----------------------------------------------------------------
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