I have 30, 000 pictures now. How can I save them in numpy format?

as mentioned above, I am going to save about 30, 000 pictures in numpy format first, so that it will be much more convenient and faster to use later.

but in the process of running, it seems that there is an error due to insufficient memory, which is reported after reading more than 90 pictures. Here is my code. Is there any problem?

(I used the server of the lab, and the memory is about 10g)

Code:

   

Feb.28,2021
Menu