0

I'm trying to go through the MXNET tutorial (https://statist-bhfz.github.io/cats_dogs_finetune), but have trouble making the RecordIO ".rec" files used to process the pictures.

I have tried the suggested approach: python C:/mxnet-20170203/tools/im2rec.py --list=1 --recursive=1 --train-ratio=0.8 cats_dogs train_pad_224x224

python C:/mxnet-20170203/tools/im2rec.py --num-thread=4 --pass-through=1 cats_dogs_train.lst train_pad_224x224

python C:/mxnet-20170203/tools/im2rec.py --num-thread=4 --pass-through=1 cats_dogs_val.lst train_pad_224x224

But i get the error: "AttributeError: 'module' object has no attribute 'MXIndexedRecordIO'" when doing so.

Is there a way to generate the ".rec" files in R directly? And if not, how do i get pass the error?

Thanks.

Kr,

Daniel

Daniel Safai
  • 45
  • 1
  • 7
  • I don't think there is an R version of imtorec. I just tested im2rec.py and it seems to work fine (https://gist.github.com/indhub/a2db93daed908d62a736b5e951639763). Which version of MXNet are you using? If built from source, can you let me know the commit hash (git rev-parse HEAD)? – Indhu Bharathi Mar 23 '17 at 21:19

1 Answers1

0

The error you are getting seems related to the fact that you are trying to use a newer version of im2rec.py than the one that came with your installed version of mxnet, hence the missing modules.

try using the im2rec.py script located in your own mxnet installation folder, somewhere like this python2.7/site-packages/mxnet/tools/im2rec.py

Also note that if you upgrade your version of mxnet, the syntax of im2rec has changed to:

im2rec.py --list --recursive --train-ratio=0.8 cats_dogs train_pad_224x224

Thomas
  • 676
  • 3
  • 18