2026 Volume 35 Issue 2 Pages 40-48
Japanese agriculture faces serious labor shortages owing to the declining number and aging of farmers, which have created a strong demand for labor-saving and automation technologies. In the shipping of green onions in Oita Prefecture, outer leaves must be removed to achieve a “one-core-one-leaf” state. Trimming machines are inaccurate, and manual intervention is necessary. To address this issue, we developed a new automatic trimming machine that removes outer leaves with compressed air. Preliminary experiments revealed that adjusting the air pressure according to size categories (S/M/L) defined by the stem thickness near the root significantly improves trimming accuracy. Thus, fast and accurate classification of stem thickness is crucial for improving the machine’s performance. Here, we propose a method that classifies the size using semantic segmentation. Semantic segmentation extracts the marketable green onion region of the harvested plant, and the stem thickness near the root is quantitatively calculated from the mask image. The onions are then classified into S/M/L classes at optimized threshold values. Cases in which no onion is present are automatically detected and excluded. The measurement position and range for thickness evaluation were optimized to achieve high classification accuracy. The method achieved an accuracy of 97.4% and a macro-F1 score of 95.6%, outperforming the End-to-End classification model by 3.0% and 1.7%, respectively. The classification accuracy for the M class was notably improved, contributing to an overall performance increase. The total processing time, comprising preprocessing, inference, and classification, was only 22–25 ms, confirming the feasibility of real-time operation. These results demonstrate that the proposed combination of semantic-segmentation-based thickness classification and threshold-based classification is an effective approach for application to automatic green onion trimming machines.