creating lmdb for only labels for multi-target regression

30 views
Skip to first unread message

p.Paul

unread,
Feb 9, 2017, 11:09:46 AM2/9/17
to Caffe Users
I want to train a network with image as input and 45 (int or float) values as output for a regression task, using Euclidean loss.
So I came to know that lmdb cannot have more than 1 value as label.

Q1:
So if I uses create_imagenet.sh,
and modify only the convert_imageset.cpp , can I use a test file to create lmdb? Or a lot of changes need to be done?
for ex in my text file : img0001.png  23.2 24.4 234.5  232.6 34.9 24.9 34.5 34.5 ........(toal 45 labels)


Q2: What about creating two Llmdb, one for data and one for label?
so first file has image file name, and dummy label (image001.png 1)
and second text files has  only labels?(  23.2 24.4 234.5  232.6 34.9 24.9 34.5 34.5  ........(toal 45 labels) )
What changes should I do to convert_imageset.cpp  for this purpose? Changes only required in this file?


Q3: Is there any better way to do it? I heard of using HDF5. If so how do I create .hdf5 files for labels. How the mapping between input and output is done? If shuffling is kept off for both lmdb and hdf5(I dont know how to do it on HDF5). will this work?
Is there any preprocessing required to create .hdf5 format for labels or it is required only if hdf5 is created for image inputs?

I know many have had these questions , similar questions on this group. Could not find any clear solution.

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages