You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/22 15:59:32 UTC

[GitHub] PhanTask opened a new issue #9181: How to make a signed float32 multi-channel input .rec file for ImageRecordIter?

PhanTask opened a new issue #9181: How to make a signed float32 multi-channel input .rec file for ImageRecordIter?
URL: https://github.com/apache/incubator-mxnet/issues/9181
 
 
   I have some multi-channel grid data ( shape is (100 x 100 x 3) ) whose type are signed float32 (e.g. -12.5486, 65.3112), and I have read them and converted them to some numpy arrays. I want to use them as 3 channel image inputs for some CNN models, and I also want to use ImageRecordIter to achieve image data augmentation, but I don't know how to pack those data correctly.
   I `tried mx.recordio.pack_img` but it seems that it can only pack the data into `.jpg` or `.png` format, which doesn't support signed float data storage (for example, the negative float numbers will be 0, and the positive float numbers will be changed after unpacking (500.5=>255 or 497.xxxxxx or 505.xxxxxx, depending on the image format parameter I set in `mx.recordio.unpack_img` ) ).
   I'm not familiar with mxnet data packing/unpacking/loading API, so could anyone tell me how to use multi-channel signed float32 data as the image input and apply data augmentation by ImageRecordIter in a right way? Any suggestions would be greatly appreciated.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services