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.
- 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
- Open in Android Studio and run the
appmodule on a Vuzix device (or any Android device with Camera2 support).- Expected input: name
images, shape[1, 3, 640, 640]
- Expected input: name
- 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
./gradlew :app:assembleDebugadb install -r app/build/outputs/apk/debug/app-debug.apk