Replies: 11 comments 27 replies
-
Beta Was this translation helpful? Give feedback.
-
Interesting -- thanks for sharing! I wonder how the
(Assumes an English locale otherwise |
Beta Was this translation helpful? Give feedback.
-
I posted this on reddit but re-posting here as it's easier to track the discussion here. Some additional details on what photoanalysisd is doing. I think we can probably get more details about analysis state from the database it self that's more accurate than looking at scores. For example, for two photos, one that is analyzed (has scores) and one that isn't, the following are interesting (done inside the >>> selected[0].tables().ZASSET.ZPHOTOANALYSISATTRIBUTES
(22510,)
>>> selected[0].tables().ZASSET.ZMEDIAANALYSISATTRIBUTES
(186,)
>>> selected[0].tables().ZASSET.ZANALYSISSTATEMODIFICATIONDATE
(714412529.694129,)
>>> selected[0].tables().ZADDITIONALASSETATTRIBUTES.ZSCENEANALYSISTIMESTAMP
(712063504.375,)
>>> no_score[0].tables().ZASSET.ZPHOTOANALYSISATTRIBUTES
(None,)
>>> no_score[0].tables().ZASSET.ZMEDIAANALYSISATTRIBUTES
(None,)
>>> no_score[0].tables().ZASSET.ZANALYSISSTATEMODIFICATIONDATE
(None,)
>>> no_score[0].tables().ZADDITIONALASSETATTRIBUTES.ZSCENEANALYSISTIMESTAMP
(None,)
So there's a timestamp of when the analysis was done. The |
Beta Was this translation helpful? Give feedback.
-
A few observations at this point:
To some extent, I wonder if I'm looking at an incomplete scoring system, or at least one that's still a work in progress - or one that will be constantly evolving. That is, while the db schema exists with score entries and there are values generated, that doesn't mean the models are actually working well and Apple could be tuning these over time, or releasing functionality over time (quietly, of course, as is their way). I'd wager there's a photo scoring analysis roadmap somewhere and there are plenty of items yet to be tuned, worked on or released. And it could also be that some of these scores - current or future - depend on/will depend on ML machine hardware to either execute or execute efficiently, and I might not have the hardware that unlocks everything. This may also explain why an Intel system chews on the library for weeks and weeks while M1 hardware is essentially complete within a day or so. Regardless of the above, I find this all fascinating and will continue looking into these scores. I'll load in the post-rebuilt MBP scores into the stats tool and look for any meaningful differences, and the same for the Mac mini's database. Note, the MBP had favorites included in the library so that will let me know if favoriting anything changes scores or scoring methods in any way. I'll also add camera and other information into the export query and re-analyze the data set. I've long wondered if somehow Apple isn't biasing results towards iPhone photos, that's one thing I'd like to look at. If I can figure out how to properly export generated tags so they can be correctly analyzed by the stats package, that's something I'd like to do. While I've been burned by taking beta MacOS releases in the past, perhaps Sonoma is stable enough for me to try the new Photos version. Here, I'd create a new user account on my MBP, then create a small, new Sonoma-version photoslibrary by not importing images, and importing from the existing originals directory; my assumption is that EXIF data is not changed/removed for the originals. I suppose I should double-check that. TL; DR: suspect photoanalysis is a work in progress by Apple and it continues to evolve, so any findings I may come up with could be invalidated by a software update or model update, but I'm still delving into this out of curiosities sake. |
Beta Was this translation helpful? Give feedback.
-
Looking at this a different way, even though almost all of the OK, that's not strictly true, as Back to Note, I stopped favoriting photos a couple of years ago; to make this accurate I'll have to go through my library and select more. I'll do that but with 75,000 photos to look at it won't be quick (and if I cheat and use existing scores I'll likely bias my selection). So I wouldn't draw any conclusions from this just yet. As mentioned before, I don't think Photos is scoring my favorites higher, it's more like we "agree" that the photos I selected as favorites are curated at 0.75 or higher. But with more favoriting this may change. |
Beta Was this translation helpful? Give feedback.
-
Before I forget, one of the things that frustrated me very much and got me looking into this analysis in the first place is the "Days" tab of the Library. I really like this presentation. As far as I know, it's the only place where videos get presented alongside photos. It's easily digestible and just pleasant overall. The issue is that I cannot get items into this view. Sure, I can remove ones I don't like, but some how, some way, Photos is making the decision on what to display there. Is there a way to dump a list of all of the assets shown in that view? It's persistent so I'd have to think it's in the db somewhere... |
Beta Was this translation helpful? Give feedback.
-
Curiosity got the better of me so I've been playing with Sonoma. It hasn't been a smooth ride. Installation to an external USB SSD failed twice, then I tried a TB-based SSD and that worked. But let's just say switching back and forth between boot drives has been a nightmare. Twice I was left with a completely unresponsive MBP, which isn't a great feeling. Turns out regardless of battery level you MUST be attached to power to reliably change boot devices. As far as Photos goes, attempting to import more than a handful of originals fails with "unknown error" for 99% plus of the photos when trying to bulk import. But if I choose a few hundred, they import fine. One note, Photos does change originals to a unique hashed filename. I'm wondering if that's somehow impacting the importation process. So they're not completely untouched. Whether or not that makes a material difference... shrugs. In Sonoma, I did not add the originals to the library; I wanted to see if that had any impact on the photoanalysisd process. So far, things seem about the same but it's early. Somewhat surprisingly, the originals don't look like they're being read during analysis. The drive with the referenced originals on it has a power/activity light and it powers down after a few minutes if it's not being used; I haven't seen it light up once during analysis, but the external boot drive's activity LED has been flickering. That means lower quality renders are tapped for analysis. Perhaps the generated tags are a bit more specific and more words are generated, but again it's early. I'll be trying to compare scores as well, especially photo-to-photo. Also looks like my suspicion that I've been carrying along cruft from previous versions back to iPhoto and Aperture is correct, but also early days there. But now there's just a handful of directories. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It chewed on the library quite a bit overnight, love an easily-seen LED disk activity light... I also use iStats Menus so I track both CPU and disk access activity, it was busy last night. Good news, no more UUID changes - everything lined up as expected, which means I could (somewhat) easily check for scores being updated. I checked a handful of scores and there were only a smattering of updates, meaning maybe 20-5000 updated scores - 5000 sounds like a lot but it's 5% of the total:
Clearly some secondary and even tertiary re-scoring going on, especially for videos. If it's going to really chew through every video I have, I could see it taking months - actually I suspect it may never catch up and new ML models or even new Photos versions may come along before it's ever really "finished." There are 570 assets - mainly photos - with I need to shelve this project for a bit but there are still items to figure out and I will get back to this in maybe a week or so.
I need my daily driver back on Ventura! Thanks so much for this software, it's been and will be extremely useful! |
Beta Was this translation helpful? Give feedback.
-
Still too early to tell if this will work but I've found the private API for "PHAManager" which is the "Photo Analysis Manager". I'm able to access it without crashing the machine (that's the first step!). If I can get this to work, there are interesting methods such as: stopAllBackgroundActivities If I can get this to work, I think a status bar app that lets you start/stop photoanalysis and check status would be useful. |
Beta Was this translation helpful? Give feedback.
-
This is graphical, so I couldn't put it in the reddit thread...
Here's the distribution of overall scores for my library:
Pretty much a bell-shaped curve. I do take a lot of snapshots as well as photos so this isn't all that surprising. The snapshots are taken as memory joggers and not necessarily for artistic content.
Curation:
I wonder if everything starts with 0.5000 and things get distributed from there.
If we work from that assumption, then it's curious that few photos are actually curated. NOTE: for this test I un-did all of my favorites. I will re-favorite photos and see if there's any change in curation scores over time.
For the rest of these, not a lot commentary yet, I still need to compare pictures to the scores to get an idea of what's being scored... the name of the score is in the screenshot.
For sharply focussed it starts from zero and goes up:
I suppose Photos is giving me just 0.2 credit for taking well-composed shots... lol
I take a lot of night-time and sunset/sunrise photos, so this may account for this:
I take that back on well-composed shots...
Noise only hurts, which would be interesting if you're going for the grain look:
Another bell curve for lively color:
It does catch when there's something in the picture that isn't helping the scene. Again, likely due to me taking snapshots as opposed to pictures:
Photos does not like my subjects!
No idea of what this is yet:
Or this, but it's got a log function in it...
This seems to get a boost in sunsets/golden hour/blue skies...
I find failure to be pretty good at spotting mistakes.... but not perfect.
No idea here...
The ones with the high score are almost always videos or timelapses:
Next up, correlations to overall score in the next post.
Beta Was this translation helpful? Give feedback.
All reactions