Wood Knot Detection App
Custom-annotated lumber surface images
YOLOv8 custom feature convergence
Highly responsive real-time on-device execution
ONNX to quantized TensorFlow Lite format
Edge device optimization & custom AI pipeline
About the Project
This project involved building an on-device, real-time computer vision application for identifying wood knots. The core AI model was developed by training YOLOv8 on an extensive custom dataset of over 10,000 annotated wood images for under 75 epochs to achieve optimal feature convergence. To facilitate highly efficient deployment on mobile hardware, the trained YOLOv8 model was first exported to the ONNX (Open Neural Network Exchange) format and subsequently converted to a quantized TensorFlow Lite (TFLite) model. This robust pipeline enables high-accuracy, real-time, on-device inference without relying on external server resources.
Challenges
Optimizing a complex object detection model like YOLOv8 for real-time mobile execution was a multi-stage challenge. It required selecting the right model scale, converting the model architecture through ONNX with correct tensor layouts, and applying integer quantization in TensorFlow Lite to drastically reduce the memory footprint without degrading detection accuracy. Additionally, managing real-time camera frames and rendering bounding boxes with minimal latency on low-to-mid range mobile processors required writing highly efficient multi-threaded operations in Dart and Flutter.
Learnings
Through this project, I mastered the end-to-end edge AI pipeline. I gained deep experience in custom dataset curation (annotating over 10,000 images), hyperparameter tuning during YOLOv8 training across multiple epochs, cross-framework model translation using ONNX, and quantized hardware-accelerated inference with TFLite in Flutter. It proved that deep learning models can be effectively compacted and deployed directly to the edge with high reliability.
Development Journey
Image Acquisition & Custom Labeling
Sourced and manually annotated over 10,000 high-resolution wood surface samples, carefully highlighting wood knot defects.
Model Training & Validation Iterations
Trained a custom YOLOv8 detection architecture for 75 epochs, achieving precise and optimal weight convergence.
ONNX Translation & INT8 Quantization
Exported weight states into intermediate ONNX format and applied structural integer quantization to reduce model weight by 85%.
Flutter Camera Frame Processing Loop
Implemented an optimized camera thread in Dart that streams frames to TensorFlow Lite, rendering immediate overlay boxes under 45ms.
