Abstract:
Eye removal operation has been one of the most important steps in the process of pineapple production. However, manual operation cannot fully meet the large-scale production at present, due the high labor cost and low efficiency. In this study, an automatic eye removal machine was developed for the pineapple using machine vision. The automatic control system included the feeding clamping, image acquisition and processing, eye removal execution and motion control. A total of 480 images of 40 pineapples were firstly collected at 30°angle intervals throughout entire circumference. Then, data enhancement processing (such as rotation, horizontal and vertical image) was used to improve the robustness of recognition mode. 1000 pineapple images were obtained as the datasets. According to 8:1:1, the datasets were divided into the training set, validation set and test set. Four YOLOv5 (l, s, m, and x) models were used to train the data set of pineapple eyes. The 100 images in the test set were input into four models for manual detection. The optimal network model was selected after that. The YOLOv5l target detection was used to rapidly identify the pineapple eye. Two pictures with a difference of 90 in all angles were analyzed as a group to obtain the three-dimensional position of pineapple eye. Geometric vector was utilized to obtain the camera three-dimensional coordinate system (
XC,
YC, and Z
C) with the origin of the camera, and the three-dimensional space coordinate of pineapple eye (
X,
Y, and
Z). The probe positioning test was carried out to evaluate the positioning accuracy of the system. Among them, the three-dimensional spatial coordinates (
X,
Y,
Z) of pineapple eyes were transformed into (
L,
θ) spatial coordinates with the horizontal position L of the probe and the pineapple rotation angle
θ as the references. A numerical-controlled precision motion was applied to pierce the probes into the pineapple eyes, in order to validate the effect of the recognition and localization. In subsequent experiments for practical engineering applications, the three-dimensional space coordinate (
X,
Y,
Z) of the pineapple eye was transformed into the space coordinate (
L,
θ,
K) with eye removal position
L, pineapple rotation angle
θ and radial feed of the eye screw motor
K as the reference. Fifteen samples were selected to rotate the pineapple and move the cutter axially to align each pineapple eye in turn, and then rapidly remove with a dedicated cutter. The experimental results demonstrated that four YOLOv5 (l, s, m, and x) target detection performed better on the recognition of pineapple eyes. The values of accuracy
P, recall rate
R and mAP of four model test sets were all higher than 96%. The better performance was achieved in the YOLOv5l model with the detection accuracy of 98.0%, the recall rate of 96.6% and the mAP value of 98.0%. The average times required to detect one pineapple eye image were 0.015 s, with the best comprehensive performance. The probe test showed that the average deviation between the actual center of the pineapple eye and the puncture position of the probe was 1.01 mm, the maximum was 2.17 mm, and the root mean square error was 1.09 mm. The accuracy of complete removal of pineapple eye was 89.5% using machine, whereas, the imcomplete removal was 6.2%, and the leakage rate was 4.3%. The complete eye removal time
T of individual pineapples was 110.9 s. Pineapple automatic eye removal machine was fully met the needs of automatic eye removal operation. The finding can provide the technical reference for the research and development of pineapple automatic eye removal machine.