OcrModel

Reading text in photos: Baidu's PP-OCRv6 small (Apache 2.0), text detection and recognition, 50 languages (Chinese, English, Japanese, Latin scripts), plus our GPU conversion of the detector (tools/ocr/; the repo also has GPU line readers, tried and left out: no faster on real lines). Downloaded with either Smart Search tier. rec.yml carries the recognizer's character list.

Properties

Link copied to clipboard
val bytes: Long
Link copied to clipboard
const val Commit: String
Link copied to clipboard
const val DetGpu: String

Detection for LiteRT's GPU, 960×960; used where GpuCheck passes.

Link copied to clipboard
Link copied to clipboard
const val Repo: String

Functions

Link copied to clipboard
fun complete(context: Context): Boolean

Every file of this version is in place; otherwise Settings offers the rest as an update.

Link copied to clipboard
fun dir(context: Context): File
Link copied to clipboard
fun installed(context: Context): Boolean

Text can be read; an earlier download, missing this version's newer files, still reads.

Link copied to clipboard
fun recFile(context: Context): File

The line reader to use: the int8 one once downloaded, else an earlier download's.

Link copied to clipboard
fun removeUnused(context: Context)

Deletes files this version doesn't use: GPU line readers, and the old reader once replaced.

Link copied to clipboard
fun url(file: ModelFile): String