Wood Knot Detection App — wood detection

Wood Knot Detection App

Mobile App
AI
Flutter
Dart
TensorFlow Lite
YOLOv8
Dataset Size10,000+ Images

Custom-annotated lumber surface images

Training Iterations75 Epochs

YOLOv8 custom feature convergence

Inference Latency<45ms

Highly responsive real-time on-device execution

Model Compaction85% Size Reduction

ONNX to quantized TensorFlow Lite format

Complexity Score9.4 / 10

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

Phase 1: Dataset CurationWeeks 1-2

Image Acquisition & Custom Labeling

Sourced and manually annotated over 10,000 high-resolution wood surface samples, carefully highlighting wood knot defects.

Phase 2: YOLOv8 TrainingWeeks 3-4

Model Training & Validation Iterations

Trained a custom YOLOv8 detection architecture for 75 epochs, achieving precise and optimal weight convergence.

Phase 3: Model ConversionWeek 5

ONNX Translation & INT8 Quantization

Exported weight states into intermediate ONNX format and applied structural integer quantization to reduce model weight by 85%.

Phase 4: Client IntegrationWeek 6

Flutter Camera Frame Processing Loop

Implemented an optimized camera thread in Dart that streams frames to TensorFlow Lite, rendering immediate overlay boxes under 45ms.

    Meshary AI

    Gemini 3.6

    Portfolio Assistant

    Hello! I'm Meshary AI, your interactive portfolio assistant powered by Gemini. Ask me anything about Meshary's projects, technical skills, or background!

    07:17 AM