py123d_detection.mmcv_export.writer¶
Writing the infos to a pickle that the training environment can read.
Conversion needs py123d (Python >= 3.9), while mmdetection3d setups are usually on Python 3.8 and numpy 1.x. Three things break a pickle across that gap:
Pickle protocol 5 is unreadable before Python 3.8, so the default is 4.
Any custom class (
pathlib.Path, a 123D enum, …) only unpickles where it is importable.validate_portable()rejects everything but built-ins and numpy arrays before writing.Arrays pickled under numpy 2 fail to load under numpy 1 (
No module named 'numpy._core'). Either installnumpy<2for the conversion, or writearray_format="portable", which stores arrays as nested lists and needspy123d_detection.mmcv.pluginto rebuild them.
Functions
|
The |
|
Write |
|
|
|
|
|
Recursively replace numpy arrays and scalars with lists and Python numbers. |
|
Raise |
Classes
|
Exceptions
|
The payload holds something that would not unpickle in a clean environment. |