new image and hdf5 support
First attempt of using imageio for image support and h5py for HDF5 support.
This is still a working in progress. I hope to have definite MR by tomorrow.
closes #23 (closed)
PS: I'll open an issue on imageio to get some issues solved as soon as possible
Merge request reports
Activity
added 1 commit
- 76ba2dbd - Deprecation move. ported image and new hdf5 support
There you go.
In this MR I rewired
bob.io.base
to use imageio as image support and h5py as hdf5 support. Follow bellow what was done in this package.- Removed all the C++ code. bob wise, this package depends on bob.extension only
- Kept the
bob.io.base.load
andbob.io.base.save
API; so all the code that depends on this API will not break - Used imageio to read/write all types of image format.
- Used h5py to read/write numpy arrays
- Dropped the support to
HD5File
. All complex hdf5 files used upstream should be ported to h5py. - Moved some functionalities from
bob.io.image
to this package (to_bob, to_matplotlib, opencvbgr_to_bob, bob_to_bgropencv)
I'm already testing this on my facerec baselines to see if has some impact on error rates.
This MR is big and will allow us to deprecate
bob.blitz
andbob.core
added 1 commit
- 8ce63866 - Created a test case for a real gray png image
- Resolved by Tiago de Freitas Pereira
I've just benchmarked this MR against several FR experiments.
I'm posting here the most extreme one: iresnet100 on IJB-C_test1.
Differences are slight as you can see in the table below and in the plot attached.
I think we are good to go with this MR.
Objections??
[Min. criterion: EER ] Threshold on Development set `new-io`: -7.842037e-01 ===================== ======================= .. Development ===================== ======================= Failure to Acquire 0.00% False Match Rate 3.50% (547768/15638932) False Non Match Rate 3.50% (685/19557) False Accept Rate 3.50% False Reject Rate 3.50% Half Total Error Rate 3.50% ===================== ======================= [Min. criterion: EER ] Threshold on Development set `old-io`: -7.843422e-01 ===================== ======================= .. Development ===================== ======================= Failure to Acquire 0.00% False Match Rate 3.51% (548566/15638932) False Non Match Rate 3.51% (686/19557) False Accept Rate 3.51% False Reject Rate 3.51% Half Total Error Rate 3.51% ===================== =======================
Edited by Tiago de Freitas Pereira40 respecting each environment's constraints. 41 """ 79 42 80 from sys import version_info 43 from sys import version_info 81 44 82 return (version_info[0] < 3 and isinstance(s, (str, unicode))) or \ 83 isinstance(s, (bytes, str)) 45 return (version_info[0] < 3 and isinstance(s, (str, unicode))) or isinstance( 46 s, (bytes, str) 47 ) 84 48 85 49 86 @numpy.deprecate(new_name="os.makedirs(directory, exist_ok=True)") 50 @np.deprecate(new_name="os.makedirs(directory, exist_ok=True)") 87 51 def create_directories_safe(directory, dryrun=False): - Resolved by Tiago de Freitas Pereira