Lumen Ai
Lumen AI's entry point.
Install it once, in Application.onCreate, before anything else here runs: background indexing and model downloads start in their own process launches and need it.
LumenAi.install(this) // every photo and video, default settings
LumenAi.models.download(context, ModelPack.Search)
val results = LumenAi.search(context, "cat sleeping on a chair")Functions
For an app that kept the download queue and video-text version itself before using the library: hands them over once, so nothing is lost or redone. Later calls do nothing.
Installs Lumen AI with a host of your own, for full control over every setting.
Installs Lumen AI with defaults: it indexes every photo and video on the phone (from MediaStore), shows its own notification icon, and opens your launcher activity from its notifications. Change any of that in configure.
The lines of text in a photo, with their positions, for selecting and copying. Instant for indexed photos; others are read now (about a second) and kept. Null when it has no text or the Text feature isn't downloaded.
The text in one frame of a video, at atMs: for a paused video.
Searches the library, the way Lumen does. Words in quotes find that exact phrase in the text of photos and videos. Two or more names find the photos with all of those people. Otherwise, photos whose text has the words come first, then Smart Search's matches. Uses whichever features are downloaded; empty results when none are.
Search suggestions drawn from the library: things there are many photos of.