✨YOLOv8-based Vehicle Detection Android Application-2024
YOLOv8 Vehicle Detection Android Application
Computer Vision | Mobile AI Deployment | Real-time Object Detection
Project Overview
A prototype system developed in my 2024—an end-to-end vehicle detection solution ranging from model training to mobile deployment. Based on the YOLOv8 architecture, this project implements real-time vehicle detection on the Android platform. The workflow covers the entire pipeline: dataset preprocessing, model training, format conversion, and Android application development, resulting in a high-performance app with switchable CPU/GPU inference.
Core Technology Stack
| Phase | Core Technology | Tools / Frameworks |
|---|---|---|
| Model Training | Object Detection, Data Augmentation | YOLOv8 / PyTorch / OpenCV |
| Model Conversion | Cross-framework Compatibility, Lightweighting | ONNX / ncnn |
| Mobile Deployment | Real-time Inference, Local Computing | Android SDK/NDK / C++ / JNI |
| Engineering | Cross-platform Compilation | CMake / Gradle |
Core Pipeline
📊 Data Preparation (VOC/YOLO) → 🏋️ Model Training (YOLOv8) → 📦 Model Conversion (PyTorch→ONNX→ncnn) → 📱 Android Deployment
Project Highlights
- High-Performance Inference: Implemented lightweight mobile inference based on the Tencent ncnn framework, supporting one-click switching between CPU and GPU to ensure real-time efficiency.
- Complete Engineering Pipeline: Covered the full lifecycle from data preprocessing and model training to mobile integration, achieving a closed-loop end-to-end system.
- Modular Architecture: The Android side utilizes a layered design (JNI + C++ + Java), decoupling the UI from the algorithm logic for better scalability.
- Real-time Interactive Experience: Features front/rear camera switching and real-time FPS display, compatible with Android 7.0+ devices.
Key Features
- 🚗 Real-time Vehicle Detection: High-precision recognition for vehicle categories.
- ⚡ High-Performance Inference: Flexible dual-mode switching between CPU and GPU.
- 📷 Dynamic Capture: Seamless switching between front and rear cameras.
- 📈 Status Monitoring: Real-time FPS monitoring and visualized detection results.
System Architecture
┌───────────── Training Side (Python) ─────────────┐ ┌───────────── Deployment Side (Android) ──────────┐
│ Data Layer → Training → Conversion → Utility │ ──▶ │ UI (Java) → JNI → Algorithm (ncnn + OpenCV) │
└──────────────────────────────────────────────────┘ └──────────────────────────────────────────────────┘





