files = Import["~/blog/faces94/male"][[1 ;; -1 ;; 30]];
The call Import["~/blog/faces94/male"]
reads the names of all the files in the folder ~/blog/faces94/male
. Then they filter it out using [[1 ;; -1 ;; 30]];
which I find strange way of doing it. I do not know why they did not use FileNames[]
for this part.
SetDirectory[NotebookDirectory[]];
dim = {200, 180};
files = Import["faces94/male"][[1 ;; -1 ;; 30]]
faces = Map[Import["~/blog/faces94/male/" <> #] &, files];
This line imports each image from the list of the files from the above operation. Now all these images are stored in faces list
faces = Map[Import["faces94/male/" <> #] &, files];
Length[faces]
(*76*)