← all repositories
jenly1314/MLKit

Google's ML Kit, wrapped in Kotlin convenience

An Android toolkit that wraps Google's on-device ML APIs into pluggable CameraX analyzers for barcode scanning, face detection, OCR, and more.

MLKit
Velocity · 7d
+0.6
★ / day
Trend
steady
star history

What it does

MLKit is a Kotlin/Android packaging layer around Google’s ML Kit on-device vision APIs. It splits functionality into nine optional modules—barcode scanning, face detection, face mesh, image labeling, object detection, pose detection (standard and accurate), selfie segmentation, and text recognition—each providing a ready-made Analyzer and base Activity/Fragment classes that plug into a separate CameraScan library.

The interesting bit

The 2.x rewrite decoupled the camera core and viewfinder into standalone libraries (CameraScan and ViewfinderView). That means the MLKit modules themselves are now thinner, and you compose them rather than inheriting a monolithic stack. The README is explicit that this is mostly a package-name migration for existing users.

Key highlights

  • Nine vision features as optional Gradle dependencies; pull only what you need
  • Each module exposes a concrete Analyzer (e.g., BarcodeScanningAnalyzer) and matching base activity/fragment for quick integration
  • Built on CameraX via the external CameraScan library
  • Supports API 23+; current v2.4.0 requires compileSdk ≥ 35
  • Published to Maven Central and JitPack with a downloadable demo APK

Caveats

  • The README is in Chinese; English documentation is absent, which may slow down non-Chinese-speaking developers
  • The 2.x upgrade changed package names for extracted libraries; the README warns this is a breaking migration from 1.x
  • Object detection is capped at five objects per image, per Google’s underlying API limitation

Verdict

Worth a look if you’re building a Chinese-market Android app and want drop-in ML Kit vision features without wiring CameraX yourself. Skip it if you need custom models or extensive documentation in English; Google’s raw ML Kit SDK may be less abstraction and less friction for those cases.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.