title: Caffe: Reading LMDB from Python
body: <p>I've extracted features using caffe, which generates a .mdb file.
  Then I'm trying to read it using Python and display it as a readable number.</p>
  
  <pre><code>import lmdb
  
  lmdb_env = lmdb.open('caffefeat')
  lmdb_txn = lmdb_env.begin()
  lmdb_cursor = lmdb_txn.cursor()
  
  for key, value in lmdb_cursor:
      print str(value)
  </code></pre>
  
  <p>This prints out a very long line of unreadable, broken characters.</p>
  
  <p>Then I tried printing int(value), which returns the following:</p>
  
  <pre><code>ValueError: invalid literal for int() with base 10: '\x08\x80 \x10\x01\x18\x015\x8d\x80\xad?5'
  </code></pre>
  
  <p>float(value) gives the following:</p>
  
  <pre><code>ValueError: could not convert string to float:? 5????5
  </code></pre>
  
  <p>Is this a problem with the lmdb file itself, or does it have to do with conversion of data type?</p>