The related study, which was published in The Journal of Neuroscience, involved 23 volunteers who were shown 1,000 color photos of random faces. During this session, their brains were connected to an fMRI machine that monitored their neurological activity. So was an artificial intelligence program that was aimed to read the brain activity of the volunteers and capture a mathematical description of the shown faces.
In fact, this was the phase two of the experiment as the study had one more preceding phase that involved a training session for the mind-reading AI. Its purpose was to make the program memorize the correlation between certain patterns of brain activity and certain facial features.