save and load jets as hdf5 file

34 views
Skip to first unread message

Lee Zandro Trazo

unread,
Mar 4, 2017, 9:40:58 AM3/4/17
to bob-devel
can someone help me find a way to save and load jets as hdf5 file. your help will be very much appreciated thanks

Manuel Günther

unread,
Mar 4, 2017, 11:38:56 AM3/4/17
to bob-devel
What about jet.save(hdf5) and Jet(hdf5) or jet.load(hdf5)? See documentation here: http://pythonhosted.org/bob.ip.gabor/py_api.html#bob.ip.gabor.Jet.save

If you have several jets, you can also use bob.ip.gabor.load_jets and bob.ip.gabor.save_jets, as documented here: http://pythonhosted.org/bob.ip.gabor/py_api.html#bob.ip.gabor.load_jets

Lee Zandro Trazo

unread,
Mar 9, 2017, 4:44:28 AM3/9/17
to bob-devel

im having difficulties saving extracted jets into hdf5 here is the snippet of the code and the error i get


Noong Sabado, Marso 4, 2017 ng 10:40:58 PM UTC+8, si Lee Zandro Trazo ay sumulat:

Manuel Günther

unread,
Mar 10, 2017, 12:28:42 PM3/10/17
to bob-devel
Yes, this is clear. The function expects a bob.io.base.HDF5File object, not a string. The simplest way of running your code is:
bob.ip.gabor.save_jets(self.jets,bob.io.base.HDF5File('test.hdf5', 'w'))

The same is true for loading the jet:
jets = bob.ip.gabor.load_jets(bob.io.base.HDF5File('test.hdf5', 'r'))


Manuel

Lee Zandro Trazo

unread,
Mar 12, 2017, 11:35:58 AM3/12/17
to bob-devel
thank you manuel. we were able to save and load jets as hdf5 file and the recognition process became faster than before.
Reply all
Reply to author
Forward
0 new messages