Serialize an object. Returns: Implementation-dependent bytes-like object
(obj)
| 24 | |
| 25 | |
| 26 | def dumps_pyarrow(obj): |
| 27 | """ |
| 28 | Serialize an object. |
| 29 | Returns: |
| 30 | Implementation-dependent bytes-like object |
| 31 | """ |
| 32 | return pa.serialize(obj).to_buffer() |
| 33 | |
| 34 | |
| 35 | def folder2lmdb(json_data, img_dir, mask_dir, output_dir, split, write_frequency=1000): |