Closed KamiCalcium closed 3 years ago
@KamiCalcium
Hi, you try set fix_imports to True to save the array in Python 2 compatible way. See the following docs. If it does not work, you can save the annotation in a .txt file and read it in Python 2.
numpy.save(file, arr, allow_pickle=True, fix_imports=True)[source] Save an array to a binary file in NumPy .npy format.
Parameters fix_imports [bool, optional] Only useful in forcing objects in object arrays on Python 3 to be pickled in a Python 2 compatible way. If fix_imports is True, pickle will try to map the new Python 3 names to the old module names used in Python 2, so that the pickle data stream is readable with Python 2.
@KamiCalcium
Hi, you try set fix_imports to True to save the array in Python 2 compatible way. See the following docs. If it does not work, you can save the annotation in a .txt file and read it in Python 2.
numpy.save(file, arr, allow_pickle=True, fix_imports=True)[source] Save an array to a binary file in NumPy .npy format.
Parameters fix_imports [bool, optional] Only useful in forcing objects in object arrays on Python 3 to be pickled in a Python 2 compatible way. If fix_imports is True, pickle will try to map the new Python 3 names to the old module names used in Python 2, so that the pickle data stream is readable with Python 2.
Yeah I did try that and it doesn't work... I will try the txt method later and let you know the result..
.txt will definetly work. Python 2 can read txt file.
Hi,
As far as I understand, we first run annotation_2D.py in py3 environment, get the annotation.npy. Then we run the fit_3d.py in py2 environment to get the fitting parameters using smpl tool. However, fit_3d.py under py2 cannot load the annotation.npy since it is generated in py3 environment from annotation_2D.py. The error is shown as followed:
Am I missing something? Thanks in advance!