Real-Time Deep Learning-Based Object Detection for Walnut Processing
Automating the final stages of walnut processing, including kernel grading and shell separation, remains a significant challenge due to subtle visual differences between kernel grades. In this work, we propose a novel real-time deep learning approach for multi-class separation of walnut components into shells, membranes, and two kernel quality classes. A key obstacle lies in the ambiguous visual distinction between first and second-class kernels, with the former typically being lighter in color and the latter darker, which hampers detection accuracy. To address this, we propose an annotation method based on thresholding the first derivative of sorted average blue channel (visible blue light) values, enabling clearer class separation and yielding a 2.02% [email protected] improvement. Building on this, we train a detector using only the blue channel and apply targeted data augmentation and balancing strategies, achieving a further 1.42% [email protected] gain. Finally, we introduce a new lightweight YOLOv4-tiny variant that incorporates convolutional attention blocks while reducing parameter count, resulting in a 56.52% faster inference with only a 1.35% drop in [email protected]. This combined approach significantly enhances the reliability of automated walnut kernel grading in real-time settings.
Authors
- Zoran Ivanovski (ORCID: https://orcid.org/0000-0002-6078-7170)
- Ivan Mihajlov
- Dejan Pejchinoski
Institutions
- Agency for Electronic Communications (MK)
- Ss. Cyril and Methodius University in Skopje (MK)
Publication Details
- Journal
- Procedia Computer Science
- Published
- 2026-01-01
- DOI
- https://doi.org/10.1016/j.procs.2026.02.172
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00