FaceIndexer

class FaceIndexer(context: Context, model: AiModel?)(source)

One faces pass: brings FaceStore in line with the library, then groups new faces into people (FaceGrouping). Photos first, newest first; then videos, read like Smart Search reads them (one frame a second up to two minutes, else 120 spread out, near-identical frames skipped) at the Video Detail size, decoded a few frames ahead on another thread. A video keeps one face per person in it, the biggest, with its moment and a saved crop; otherwise one reel would outweigh a whole album. The first pass of the background job: it's the fastest.

Decoding is most of a video's cost, so while a video is open its frames are also saved small (FrameCache) for Smart Search (model), if that video still needs its vectors.

Constructors

Link copied to clipboard
constructor(context: Context, model: AiModel?)

Functions

Link copied to clipboard
suspend fun run(limit: Int = Int.MAX_VALUE): Indexer.Outcome

Looks at most limit photos and videos.