1

In windows 10, I followed the step-by-step MXnet tutorial to use im2rec.py to create a dataset. I created a image list file like this:

integer_image_index \t label_index \t path_to_image

enter image description here

Next, I modified .txt to .lst.

enter image description here

Finally, I executed the command:

python im2rec.py --exts '.jpg' --train-ratio 0.41 --test-ratio 0.49 --recursive=True --pack-label=True D:\CUB_200_2011\data\image_label.lst D:\CUB_200_2011\CUB_200_2011\image

It is shown that "read no error", but the files created by the command like .lst and .rec are 0K, there is empty. I don't know why.

Please tell me what mistakes I made.

Leopd
  • 41,333
  • 31
  • 129
  • 167
Y.Weng
  • 33
  • 5

1 Answers1

0

im2rec.py will print

read none error:(filename)

for any file that it can't load for whatever reason. Maybe some of the files you list aren't there or are empty? Or maybe the base path you've specified is wrong -- I notice you have the folder name CUB_200_2011 twice.

Leopd
  • 41,333
  • 31
  • 129
  • 167
  • 1
    I have modified the code in im2rec.py and a mistake about path.Now it works well.Thanks a lot! – Y.Weng Nov 23 '16 at 05:06
  • Sure thing! I also improved the error messaging in `im2rec`: https://github.com/dmlc/mxnet/pull/3942 so hopefully this will be more clear in the future. – Leopd Nov 23 '16 at 17:52
  • I get the following error in Windows 10, x64: AttributeError: 'module' object has no attribute 'MXIndexedRecordIO', what should I do to create my own dataset? – Mohammad Mar 29 '17 at 08:50