I've been using Mac's photos to recognize faces in my pictures. I'm interested in seeing some basic stats such as the occurrences and co-occurrences of people and how they change over time. Is there a place where the raw data are stored so that I can write codes to perform analysis?


2 Answers 2


In Mojave and earlier: Photos library (right click) > Show package contents > Resources > Media > Face. The sub-folders within the Face folder contains thumbnails of all faces. Additional data about them can be found in Database > photos.db but you'll need DB Browser for sqlite or similar program. Face related data is in a table named RKFace, several other tables named RKFace..., and elsewhere.

In Catalina and later, use the same approach as above but the folder names are different. You'll be querying Database > photos.sqlite, and looking at tables such as ZDETECTEDFACE, ZFACECROP, and basically any other with "face" in it.

Be very careful not to modify, delete or move anything when you open Photos library.photoslibrary.


~/Pictures/Photos\ Library.photoslibrary

Use show package contents in right click menu. They will be separated using dates. In some folders, there are thumbnails of faces cropped out. You can write some simple scripts to traverse the folders and arrange them separately. Making a backup of the library is a good idea before running scripts.

  • I ran the code and found five items: "Attachments Masters database private resources". Which one contains the people information?
    – Dr_Hope
    Oct 26, 2019 at 18:40
  • @Dr_Hope that is something I've never looked into, except what I've mentioned in the answer.
    – anki
    Oct 26, 2019 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .