import_pickle

menpo.io.import_pickle(filepath, **kwargs)[source]

Import a pickle file of arbitrary Python objects.

Menpo unambiguously uses .pkl as it’s choice of extension for Pickle files. Menpo also supports automatic importing and exporting of gzip compressed pickle files - just choose a filepath ending pkl.gz and gzip compression will automatically be applied. Compression can massively reduce the filesize of a pickle file at the cost of longer import and export times.

Parameters

filepath (pathlib.Path or str) – A relative or absolute filepath to a .pkl or .pkl.gz file.

Returns

object (object) – Whatever Python objects are present in the Pickle file