I am trying to build a deep learning model for Saliency analysis using caffe (I am using the python wrapper). But I am unable to understand how to generate the lmdb data structu
In caffe both lmdb and hdf5 supports multiple labels per image, matrices if you like, see this thread:
https://github.com/BVLC/caffe/issues/1698#issue-53768814
See this tutorial on how to create a multi-label dataset (lmdb here) for caffe with python code:
http://www.kostyaev.me/article/Multilabel%20Dataset/
EDIT: For example for the labels it uses the caffe-python function which converts a 3-dimensional array to datum, found in caffe/python/caffe.io.py: array_to_datum(arr, label=None):