🎯 The Agricultural Bottleneck
Manual fruit sorting in New Zealand packhouses is labor-intensive, error-prone, and fatigue-limited. Standard off-the-shelf vision models fail completely: standard COCO-pretrained weights classified a cluster of kiwifruit as “teddy bear” at 88% confidence and cannot distinguish ripe skin from fungal rot.
🏛️ Two-Stage Detection & Sizing Architecture
- Stage 1 (Fast Filter): YOLOv8 real-time detector passes flawless Grade-A fruit immediately with near-zero latency.
- Stage 2 (Defect Segmentation): Custom Detectron2 Mask R-CNN isolates surface lesions, bruises, and fungal rot.
- Sub-Millimeter Optical Calibration: OpenCV GrabCut isolates the defect boundary calibrated at 37 pixels/cm, quantifying exact physical surface area ($mm^2$).
- Multimodal Verification: Claude Vision API verifies edge cases and writes inspection records directly into PostgreSQL 15.
👓 Hands-Free AR Inspection (XReal One Glasses)
- Developed with Unity 2022.3 and XREAL C# SDK.
- Renders 3D world-anchored bounding boxes and color-coded defect confidence overlays directly into the packhouse operator’s field of view.
- Hands-free grading allows workers to handle and pack produce without checking external computer screens.
💻 Tech Stack & Repositories
- Vision Pipeline: PyTorch, YOLOv8, Detectron2 (Colab T4 fine-tuned), OpenCV GrabCut.
- Backend & Database: Flask REST API, PostgreSQL 15, Gunicorn, Docker.
- Augmented Reality: Unity 2022.3, C#, XREAL NRSDK.
- GitHub Repository: ai-fruit-quality-inspection-ar