Converting jpeg images to LMDB format

137 views
Skip to first unread message

Christopher Turnbull

unread,
Feb 26, 2016, 4:42:52 AM2/26/16
to Caffe Users
If I had a set of jpeg images, let's say for face recognition... how would I go about labelling them and storing them as data pairs in an lmdb format?


shini gami

unread,
Nov 27, 2016, 8:21:51 AM11/27/16
to Caffe Users
I'm sad no one  has replied to this, I have nor found any script to auto-label an imageset. There is "convert_imageset.cpp" in the tools folder but it expects a parameter LISTFILE [convert_imageset [FLAGS] ROOTFOLDER/ LISTFILE DB_NAME].

It says LISTFILE should be a list of files as well as their labels, in the format as subfolder1/file1.JPEG 7.

Is there a tool to create a LISTFILE?

I know this is an "old" post but if anyone could shed some light into this it would be greatly appreciated.

I am considering writing my own script or code in python to auto-label but I feel like it probably already exists and I do not have the time to code this at the moment. I find it weird that I haven't found this yet, it seems like something basic.

Greetings,
shinigami

NickB

unread,
Nov 28, 2016, 2:04:39 PM11/28/16
to Caffe Users
There is no tool to create a list file.  You'll have to do it yourself.  You'll want to put your list file in the format of:

file1 label1
file2 label2
file3 label3

where file is the name of the file and label is a number corresponding to that particular label.  So if you have bob1.jpg, bob2.jpg, and alice1.jpg, your file should look like

bob1.jpg 0
bob2.jpg 0
alice1.jpg 1

0 corresponds to a label of bob and 1 to a label of alice.

GA_UP

unread,
Jul 22, 2018, 9:39:36 PM7/22/18
to Caffe Users
About the categories/labels, what happens if data is for a text detection system. What sort of labels should be specified? Thank you so much for any response.
Reply all
Reply to author
Forward
0 new messages