Need documentation about caffe data format
Hi all,
Where can I find some documentation about the data format that caffe use. I need to translate our data into caffe compatible format (leveled) but just don't know how to do this.
Best regards,
Jaonary
I think it's just this http://code.google.com/p/leveldb/ There is also a tool included in caffe that takes a directory with images and a file containing the names of the images and a class and create a leveldb for you. It's named "convert_imageset"
As far as I know, leveldb is a key/value database. What should I use for the key and the value ?
Have a look at tools/convert_imageset.cpp . Line 88 to 95 prepares the key and value and puts it in the db. The key looks like the line number of the Image in the list file and appended filename, formated like this: "%08d_%s". The value is an Instanze of Datum serialized, which basically holds the Image and the class.
Ok thank you. This was I understood but I just wonder why caffe uses a key/value store since the value is the pair (data,label).
Glad someone asked this. I'd appreciate it if there was a small description of this somewhere more efficient than reading a script.
There is now a data section of the tutorial documentation and the layer catalogue. If the description is lacking then please PR further details you find helpful.
I still don't get the point, as the documents still describe nothing about the data structure. Can anyone writes like this: (with the correct format, of course)
key: data sequence number value: label string followed by '\0' then data
or something? I want to convert non-image (PCM) byte arrays into leveldb.
@shelhamer I tried to generate the leveldb files from CIFAR-10 binary data using create_cifar10.sh with DBTYPE=leveldb. But, I got four empty files (lock, log, and log.old, MANIFEST) and no .sst files in both training and testing data folder. There was no error generated while execution.