What are the required conditions for Photos to start a facial scan? I've recently been building a large photo library, and, now that almost all of the content is in, I would like to start completing the people album. Photos says that it will "continue to scan your remaining photos when you're not using the app and your Mac is connected to power", so what I've been doing is letting the app run in the background (opening it and the focusing to another Window), telling my Mac never to sleep, plugging it in and leaving it on overnight.
This, however, does not seem to be working; indeed, the number of faces scanned seems to be going DOWN (yesterday 57,807 photos had been scanned and now it's just 57,381). I seem to be meeting perfect conditions and yet nothing's happening. I should perhaps mention, however, that I've been getting it a little off each time, but not in a way that should affect it, I hope.


The first two nights I quit photos 
The third night I left Photos focused.
And tonight I left Mission Control focused 


The third night I left Photos
   focused and tonight I left Mission Control running.

What is causing this problem, and what am I doing wrong?
If it helps, here are my system specs:
The conditions are unclear at this time.


  Apple does not inform on how photoanalysisd or photolibraryd work. It is something they need to address properly. As far as I know, photoanalysis uses CoreML and Vision to analyse what images contain, not only Faces in People. So if you search for mountain, it should retrieve images of mountains.


When it comes to how this daemon actually work, I've looked at the process and how it responds to different changes in the macOS environment. From a bit of trial, 
I think I've figured out how to make it work in a somewhat expectable way. To summarise, the following technique (if you will) should help you crawl about 1K images an hour. 


  Note: this depends on the hardware you are currently running on. You milage may vary.


Prerequisites:


Have photos imported into Photos.app
Have manually marked faces of people you want Photos to recognise.
Make sure you do not have any items in your library that can cause havoc. You can use Smart Filters with Unable to Upload.
Ensure that your power settings are set to never sleep. (Screen saver can still be on).
Plug your Mac to power, it will be running for a while depending on your collection size.


Solution:

Close all apps, reboot your Mac, make sure you untick the "Reopen windows..." before you reboot. We want macOS to return to desktop without any apps loading. 
Also make sure you have disabled any apps from starting with macOS too: Users &amp; Groups &gt; Your User &gt; Login Items

Then, once rebooted:


Open Activity Monitor.app and search for photoanalysisd. It should not be found (but leave the window open). 
Open Photos.app, wait a minute, then close it. You should see photolibraryd and photoanalysisd in Activity Monitor.app now. 
Give it a minute or two (or maybe 10), and now you should see photoanalysisd begin to churn through your photos rather quickly.


For the best possible result, make sure you leave the Mac running over night. If you have a lot of images (50000+) you probably need to do this a couple of nights.


  A few things to consider. 
  
  
  The daemon can take some time to get it going. When I open Safari it starts churning. You can try this if you don't see any activity after 10 minutes.
  photoanalysisd can hang up some times. If this happens, check if photolibraryd is doing something (check Activity Monitor.app). If this is the case, It is probably pushing updates to the library.
  It can sometimes help if you leave your iPhone/iPad unplugged. It seems that Photos only work on a single device at one time. 
  If there is no activity for a while and you don't manage to solve it with the above. Reboot and repeat.
  


The above has worked for me on 12K photos. I've re-imported them twice to confirm. It took me two days total (by making sure it starts and leave it over night).

Enjoy.