Search code examples
windowspython-2.7mxnet

How to use im2rec in MXnet to create my own dataset


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.


Solution

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