A real-time object detection Android application powered by YOLOv8 and ONNX Runtime.
This Android application demonstrates object detection using a YOLOv8 model exported to ONNX format. It takes an image input, runs inference with ONNX Runtime, and displays results with bounding boxes, class labels, and confidence scores.
- Works offline β no network dependency.
- Lightweight and mobile-optimized.
- Extensible and cleanly structured codebase.
- Loads and executes a YOLOv8n model in ONNX format.
- Runs inference with efficient mobile performance via ONNX Runtime.
- Preprocessing: Resize to 640Γ640, normalize to
[0, 1]range. - Postprocessing: Applies confidence filtering and Non-Maximum Suppression (NMS).
- Draws bounding boxes with class names and confidence values.
- Supports dynamic class names from
labels.txt.
- Designed for Android 7.0+ (API 24+).
- Uses native bitmap processing for visualization.
| Technology | Description |
|---|---|
| Android SDK | Core Android app development |
| Java | Main development language |
| ONNX Runtime | Executes the YOLOv8 ONNX model |
| Bitmap/Canvas API | For drawing detections on images |
- Android Studio (latest stable)
- Android device or emulator (API 24+)
yolov8n.onnxandlabels.txt(inres/raw/)
git clone https://github.com/your-repo/onnx-yolov8-android.git
cd onnx-yolov8-androidThis Android app showcases the integration of YOLOv8 object detection via ONNX Runtime. It is ideal for mobile AI projects and can serve as a foundation for more advanced applications, including real-time video analysis, robotics, and industrial automation.