Skip to content
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

jabooth
Copy link
Member

@jabooth 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 added a commit that referenced this pull request Sep 4, 2014
Adds HDF5able serialization support to Menpo
@jabooth jabooth merged commit f22e908 into menpo:master Sep 4, 2014
@jabooth jabooth deleted the hdf5able_pull branch September 4, 2014 20:51
@jabooth jabooth mentioned this pull request Oct 2, 2014
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant