Skip to content

daverlon/KotlinYOLO

Repository files navigation

KotlinYOLO (Vuzix, Android)

Real-time, on-device object detection Android app for the Vuzix M400 smart glasses using Kotlin + CameraX + ONNX Runtime, with preprocessing + NMS in native C++ (JNI/CMake). Built for and used in a production demo.

KotlinYOLO demo

How It Works

  • End-to-end on-device pipeline: CameraX frames → model tensor → ONNX inference → filtered detections → overlay rendering
  • Latency-aware camera loop: ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST
  • Hot paths in native code: YUV→RGB + letterbox into 1x3x640x640, plus class-aware NMS

Quickstart

  1. Open in Android Studio and run the app module on a Vuzix device (or any Android device with Camera2 support).
    • Expected input: name images, shape [1, 3, 640, 640]

Prerequisites

  • Android API 24+ (Vuzix M400 runs API 29)
  • ONNX model file in app/src/main/assets/
  • Vuzix smart glasses device preferred, or any Android device with Camera2

Build (CLI)

./gradlew :app:assembleDebug

Install (optional)

adb install -r app/build/outputs/apk/debug/app-debug.apk

About

YOLO11n and YOLOv8n inference via ONNX & JNI on Vuzix M400 smart glasses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors