New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds HDF5able serialization support to Menpo #427

Merged
merged 1 commit into from Sep 4, 2014

Conversation

Projects
None yet
1 participant
@jabooth
Member

jabooth commented Sep 4, 2014

Serialization of Menpo datatypes has long been on our wishlist (#164, see there for detailed discussion). This PR adds solid serialization support to Menpo in a fundamental way.

The actual meat of this solution is a separate package called hdf5able. This package defines a standardized approach for serializing and de-serializing basic Python types to and from HDF5 files. It also provides a class called HDF5able. Any custom subclass of HDF5able can also be safely serialized to disk. This PR:

  1. Adds HDF5able as a superclass of Copyable, making most Menpo types serializable, with no extra effort.
  2. Classes that hold callables as variables (most notably feature functions in the fit package) need to specialize a few methods of HDF5able to be serializable. Support is added for AAM serialization in this PR. Future small PR's in Menpo can add support to classes as we go.
  3. Adds menpo.io.load(path) and menpo.io.save(path, objects). These are the new API for saving Menpo objects.

Note that because HDF5 is an open standard, any files saved out from Menpo can be easily inspected by any number of tools. Matlab also supports HDF5, so immediately Menpo data can be read into Matlab (we may right a small Matlab function to make this easier to encourage support).

@jabooth jabooth added the in progress label Sep 4, 2014

jabooth added a commit that referenced this pull request Sep 4, 2014

Merge pull request #427 from jabooth/hdf5able_pull
Adds HDF5able serialization support to Menpo

@jabooth jabooth merged commit f22e908 into menpo:master Sep 4, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@jabooth jabooth deleted the jabooth:hdf5able_pull branch Sep 4, 2014

@jabooth jabooth referenced this pull request Oct 2, 2014

Closed

Serialization of data #164

@jabooth jabooth self-assigned this Oct 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment