import caffe
import lmdb
lmdb_env = lmdb.open('directory_containing_mdb')
lmdb_txn = lmdb_env.begin()
lmdb_cursor = lmdb_txn.cursor()
datum = caffe.proto.caffe_pb2.Datum()
for key, value in lmdb_cursor:
    datum.ParseFromString(value)
label = datum.label
data = caffe.io.datum_to_array(datum)
for l, d in zip(label, data):
    pass
Caffe: Reading LMDB from Python