hzxie/GRNet

Bugs in eithor the lmdb datasets or the serialization script?

Closed this issue · 3 comments

I downloaded the ShapeNet dataset in lmdb format and tried to organize it into classname/modelname folders by using the script in utils/

cd $GRNET_HOME/utils
python lmdb_serializer.py /path/to/shapenet/train.lmdb /path/to/output/shapenet/train
python lmdb_serializer.py /path/to/shapenet/valid.lmdb /path/to/output/shapenet/val

While I got errors as follows:

$python lmdb_serializer.py ../data/ShapeNetCompletionZZZ/train.lmdb ../data/ShapeNetCompletionZZZ/
Failed to import tensorflow.
Traceback (most recent call last):
  File "lmdb_serializer.py", line 48, in <module>
    main()
  File "lmdb_serializer.py", line 25, in main
    df = dataflow.LMDBSerializer.load(lmdb_file_path, shuffle=False)
  File "/home/xieyunwei/.conda/envs/sparenet/lib/python3.7/site-packages/tensorpack/dataflow/serialize.py", line 114, in load
    df = LMDBData(path, shuffle=shuffle)
  File "/home/xieyunwei/.conda/envs/sparenet/lib/python3.7/site-packages/tensorpack/dataflow/format.py", line 90, in __init__
    self._set_keys(keys)
  File "/home/xieyunwei/.conda/envs/sparenet/lib/python3.7/site-packages/tensorpack/dataflow/format.py", line 110, in _set_keys
    self.keys = loads(self.keys)
  File "/home/xieyunwei/.conda/envs/sparenet/lib/python3.7/site-packages/tensorpack/utils/serialize.py", line 93, in loads
    return pickle.loads(buf)
_pickle.UnpicklingError: invalid load key, '\xdd'.

Is this because of the Chinese characters in uploaded train/valid.lmdb datasets? Maybe lmdb in python cannot process such characters? Anyway this needs fix.

hzxie commented

I'm not sure whether using Python 2 could solve this problem.
You can also consider using the processed dataset here.

hzxie commented

Duplicated with #4

@AlexsaseXie ,Have you successfully solved your problem?