What is photoanalysisd and why running?

I restarted my computer (MBP M1 Max) and noticed that for the first time it got a little warm with the fan running. What is this (below) and why would it be running when I don’t have Photos running?

The photoanalysisd process is used by the Photos app on your Mac to search for faces and objects in the Photos Library.

It runs in the background, I guess.

1 Like

Thanks. That is strange. I haven’t added any photos recently so I’m surprised its running. The only change I’ve made is I reinstalled Alfred on this new computer this morning after listening to the latest episode of MPUs.

It checks periodically, and when new algorithms are rolled out, I assume it has to rescan.

1 Like

That makes sense, thanks!

1 Like

I wish mine would run like that and finally finish the initial scan.

I hate photoanalysisd so much that I turned off iCloud Photos so that my (older) Mac can run without the fan screaming at me consistently. With the new M1 MacBook Air which has no fan, I happily turned it on.

I’m running a 2014 Mac Mini with 4GB of memory and PhotoAnalysis is not even in my top 10 problems. And I have more than 25,000 photos, significant numbers in Raw format

Yes, I’m fortunate in that the scanning has stopped. Apparently it is periodic.

Don’t you wish that the background tasks (especially the ones that you would never need) would ask permission the first time? I thought MY computer belonged to ME.

As @ tipper-bonylad said, it’s a background process for Photos.app that detects faces, objects, and scene classification to improve search in Photos. For example, in Photos you can search for “dog” to find all photos with dogs in them even though you have not tagged or labeled the photos. IMHO this is one of the killer features of Photos.app but very under appreciated because Apple doesn’t hype it. I’m the author of a free open-source tool osxphotos which, among other things, can show you all the data that photoanalysisd collects. For example, labels/categories of the image, the reverse geolocation info about the image, etc. If you install and run osxphotos from the Terminal with the command osxphotos inspect, it will display all this metadata for whichever photo is currently selected in Photos. For example, I picked a random photo and the inspect tool showed me the following (along with a lot of other data):

Place: Mountain View, California, United States
Categories/Labels: Bar, Drinking Glass, Furniture, Interior Room, People, Table, Tableware, Utensil │
Search Info: street: Castro St, sub_locality_5: Mountain View, city: Silicon Valley, state: California, country: United States, month: May, year: 2023, label: Bar, Drinking Glass, Furniture, Interior Room, People, Table, Tableware, Utensil, activity: Travel, Trip, season: Spring, photo_name: IMG_2497.HEIC

photoanalysisd also computes qualitative measures of “goodness” of the photo which helps Photos pick photos for memories, etc. For the above mentioned photo these are:

Scores: overall: 0.39, curation: 0.50, promotion: 0.00, highlight_visibility: 0.04, behavioral: 0.10, failure: -0.00, harmonious_color: 0.01, immersiveness: 0.00, interaction: 0.06, interesting_subject: -0.21, intrusive_object_presence: -0.08, lively_color: 0.14, low_light: 0.02, noise: -0.01, pleasant_camera_tilt: -0.01, pleasant_composition: -0.10, pleasant_lighting: -0.17, pleasant_pattern: 0.04, pleasant_perspective: 0.01, pleasant_post_processing: -0.01, pleasant_reflection: -0.15, pleasant_symmetry: 0.01, sharply_focused_subject: 0.14, tastefully_blurred: 0.21, well_chosen_subject: -0.20, well_framed_subject: 0.65, well_timed_shot: 0.01

This was just a picture at a restaurant but since photoanalysisd has categorized all of this, it makes the photo much easier to find by searching any of the above terms in Photos. While Photos.app does not expose these to the user, osxphotos can read them and query them so you can use a command like the following to add all photos with a low aesthetic score to the album “Bad Photos” to help with cleaning out the library:

osxphotos query --query-eval "photo.score.overall < 0.2" --only-photos --not-screenshot --add-to-album "Bad Photos"

I use this regularly to quickly triage photos not worth keeping.

3 Likes

Even worse, if you store your Photos library in an external drive, photoanalysisd will make it impossible to unmount the external disk if it is running.