Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
479 views
in Technique[技术] by (71.8m points)

Extracting image files from LMDB format in python

I have come across a file of type .lmdb.

I need to work on it but, I am not able to understand the structure of the data as I am not able to extract the images out of it.

The file is available at link. The file is of size 170MB.

I tried:

import lmdb
from tensorpack import dataflow

df = dataflow.LMDBSerializer.load("valid.lmdb", shuffle=False)
size = df.size()
print(size)

but I am getting an error:

Traceback (most recent call last):
  File "D:/Dl-3d/shape_completion/visualizing_image.py", line 20, in <module>
    df = dataflow.LMDBSerializer.load("valid.lmdb", shuffle=False)
  File "D:Dl-3dshape_completionlibsite-packagesensorpackdataflowserialize.py", line 114, in load
    df = LMDBData(path, shuffle=shuffle)
  File "D:Dl-3dshape_completionlibsite-packagesensorpackdataflowformat.py", line 90, in __init__
    self._set_keys(keys)
  File "D:Dl-3dshape_completionlibsite-packagesensorpackdataflowformat.py", line 110, in _set_keys
    self.keys = loads(self.keys)
  File "D:Dl-3dshape_completionlibsite-packagesensorpackutilsserialize.py", line 93, in loads
    return pickle.loads(buf)
_pickle.UnpicklingError: invalid load key, 'xdc'.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...