1

I am developing a DNN algorithm and am in need of saving thousands of 2D (maybe 4 channels of 2D) Numpy arrays as labels. 2000 X 2000 array of integers.

I am not sure what is the most efficient way (in terms of speed and storage space) to save these arrays. I have tried: - Numpy save and load, resulting in huge file sizes (hundreds of Mbs for one array) - skimage package's imsave and imload, which is much faster but lossy and changes the numbers when reading back. Generally any package I use for saving image is lossy.

Please advise.

Vahid
  • 13
  • 4
  • You can try `np.savez_compressed` – Primusa Jul 10 '18 at 23:37
  • h5py may also suitable for this task. You can use many compression algorithms with different compression efficiency and speed. I would recommend Blosc. eg. https://stackoverflow.com/a/48997927/4045774 – max9111 Jul 11 '18 at 07:44

0 Answers0