Documentation for Im2Rec.py?


#1

Hello,

Is there any documentation around the Im2Rec.py script outputs - or more specifically:

1.) I have created some .lst files - but what do the first two columns of an .lst file represent? I don’t see a reference.

2.) I tried to run an ImageDetIter iterator over the .rec file I created from my .lst files but I received the error message:
Traceback (most recent call last):
File “recwork.py”, line 3, in
iterator = mx.image.ImageDetIter(1, (3, 600, 800), path_imgrec=‘cars.rec’)
File “C:\Python27\lib\site-packages\mxnet\image\detection.py”, line 682, in init
label_shape = self._estimate_label_shape()
File “C:\Python27\lib\site-packages\mxnet\image\detection.py”, line 703, in _estimate_label_shape
label = self._parse_label(label)
File “C:\Python27\lib\site-packages\mxnet\image\detection.py”, line 720, in _parse_label
raw = label.ravel()
AttributeError: ‘float’ object has no attribute ‘ravel’

I was hoping to find some guidance on inspecting/interrogating .rec files

Thanks!
burnsca


#2

An update to my own question. After a bit of time to think, I see now what the first two columns in the .lst file are. The first is an index. However, since Im2rec.py shuffles the classes and observations - I thought it was a random number. It is just a shuffled index.

The second column is the class that the observation belongs to. My .lst file has two decimal places. 0.00 - 9.00 the reference I used created from the caltech did not have the two decimal places so I am still uncertain why there is a difference there.

Still looking for the cause of the error 'float object has no attribute ‘ravel’


#3

@burnsca you can find more information on the DataIterator tutorial here: https://mxnet.incubator.apache.org/tutorials/basic/data.html

Try to run the tutorial and have a look at the generated idx and lst files to get a better understanding on how to format it yourself if you don’t want to use the im2rec tool directly.