I have created Mxnet Rec data through Im2rec. I would like to feed this into Tensorflow. Is it possible ? and How would i do that? Any idea ?
Asked
Active
Viewed 452 times
2 Answers
1
You can probably feed the data. You will need to use MXNet Iterators to get the data out of the records, and then each record you will need to cast to something that Tensorflow understands.

Stanley Kirdey
- 602
- 5
- 20
0
In order to get the data out of the records, you can use the following python script. Maybe it would be helpful for someone who already has .rec
file.
import numpy as np
import mxnet as mx
import cv2 as cv
index = 1
imgrec = mx.recordio.MXIndexedRecordIO('file.idx', 'file.rec', 'r')
header, s = mx.recordio.unpack(imgrec.read_idx(index))
img = mx.image.imdecode(s).asnumpy()
img = cv.cvtColor(img, cv.COLOR_RGB2BGR)
filename = '{}.jpg'.format(index)
cv.imwrite(filename, img)

young
- 11
- 3