| Literature DB >> 36017261 |
Lele Wang1,2, Yingjie Zhao1,2, Zhangjun Xiong1,2, Shizhou Wang2,3, Yuanhong Li1,2, Yubin Lan1,4,2,3,5.
Abstract
The fast and precise detection of dense litchi fruits and the determination of their maturity is of great practical significance for yield estimation in litchi orchards and robot harvesting. Factors such as complex growth environment, dense distribution, and random occlusion by leaves, branches, and other litchi fruits easily cause the predicted output based on computer vision deviate from the actual value. This study proposed a fast and precise litchi fruit detection method and application software based on an improved You Only Look Once version 5 (YOLOv5) model, which can be used for the detection and yield estimation of litchi in orchards. First, a dataset of litchi with different maturity levels was established. Second, the YOLOv5s model was chosen as a base version of the improved model. ShuffleNet v2 was used as the improved backbone network, and then the backbone network was fine-tuned to simplify the model structure. In the feature fusion stage, the CBAM module was introduced to further refine litchi's effective feature information. Considering the characteristics of the small size of dense litchi fruits, the 1,280 × 1,280 was used as the improved model input size while we optimized the network structure. To evaluate the performance of the proposed method, we performed ablation experiments and compared it with other models on the test set. The results showed that the improved model's mean average precision (mAP) presented a 3.5% improvement and 62.77% compression in model size compared with the original model. The improved model size is 5.1 MB, and the frame per second (FPS) is 78.13 frames/s at a confidence of 0.5. The model performs well in precision and robustness in different scenarios. In addition, we developed an Android application for litchi counting and yield estimation based on the improved model. It is known from the experiment that the correlation coefficient R 2 between the application test and the actual results was 0.9879. In summary, our improved method achieves high precision, lightweight, and fast detection performance at large scales. The method can provide technical means for portable yield estimation and visual recognition of litchi harvesting robots.Entities:
Keywords: ShuffleNet v2; YOLOv5; litchi; object detection; yield estimation
Year: 2022 PMID: 36017261 PMCID: PMC9396223 DOI: 10.3389/fpls.2022.965425
Source DB: PubMed Journal: Front Plant Sci ISSN: 1664-462X Impact factor: 6.627
FIGURE 1The geographical location of the image acquisition.
The weather conditions and quantity distribution during the image collection period.
| Date | Weather conditions | Number |
| May 17, 2021 | Rainstorm to cloudy | 375 |
| June 11, 2021 | Sunny to cloudy | 500 |
| June 30, 2021 | Sunny and breezy | 500 |
FIGURE 2Data annotation example: the blue box represents mature litchi, and the yellow box represents immature litchi.
Details of the litchi image dataset.
| Dataset | Number of original images | Number of augmented images |
| Training set | 962 | 5772 |
| Validation set | 138 | 138 |
| Test set | 275 | 275 |
| Total | 1375 | 6175 |
FIGURE 3ShuBlock module.
FIGURE 4Convolution block attention module structure.
FIGURE 5Network structure diagram of the improved model.
The experimental environment in this study.
| Name | Value |
| CPU | AMD R5-5600X 6-Core |
| Memory | 32GB |
| Storage SSD | 512GB |
| Graphics card | Nvidia RTX 2060 SUPER |
| Graphics memory | 8GB |
| Operating System | Windows10 |
| CUDA version | 10.2 |
| PyTorch version | 1.7.1 |
FIGURE 6The comparison of mAP@0.5 of the model before and after improvement on the training set.
Evaluation results of the improved model on the test set.
| Class | P/% | R/% | mAP@ | F1- | Model | FPS |
| litchi | 88.1 | 88.4 | 93.9 | |||
| raw_litchi | 87.1 | 82.7 | 90.8 | 0.87 | 5.1 | 78.13 |
| all | 87.6 | 85.6 | 92.4 |
FIGURE 7The improved model’s detection results at different maturity stages. Where the white oval indicates that the fruit was falsely detected; the yellow oval represents the missed detected fruits; the green oval represents that the model is temporarily unable to distinguish whether it is immature or mature litchi.
FIGURE 8The detection effect of the improved model for various occlusion methods appearing in the dataset. (A–D) Indicates that the occluded litchi can be detected accurately by the improved model, and (E–F) indicates that the occluded litchi are not detected correctly by the improved model (false detection or missed detection).
FIGURE 9The detection effect of the improved model on litchi images with three density levels.
The effect of different improvement schemes on the model performance.
| Models | Image size | mAP@0.5 (%) | Parameters | Model size (MB) | FPS |
| YOLOv5s | 640 × 640 | 88.9 | 7,015,519 | 13.7 | 104.17 |
| + ShuffleNet v2 | 640 × 640 | 87.1 | 3,680,751 | 7.42 | 119.05 |
| + CBAM | 640 × 640 | 89.7 | 7,058,821 | 13.8 | 108.70 |
| + 1280 | 640 × 640 | 93.2 | 7,015,519 | 14.1 | 48.31 |
| + ShuffleNet v2 + CBAM | 640 × 640 | 88.4 | 3,716,133 | 7.5 | 114.94 |
| + 1280 + ShuffleNet v2 + CBAM | 1,280 × 1,280 | 92.5 | 3,716,133 | 7.95 | 56.82 |
| + 1280 + ShuffleNet v2 + CBAM + cut | 1,280 × 1,280 | 92.4 | 2,251,496 | 5.1 | 78.13 |
Bold values indicates the final version of model improvements in this paper.
Detection results of different object detection algorithms on litchi images.
| Models | mAP (%) | Model size (MB) | FPS |
| YOLOv5s_ShuffleNet_v2_ |
|
| 78.13 |
| YOLOv5s | 88.9 | 13.7 | 104.17 |
| YOLOv4-tiny | 74.7 | 22.4 |
|
| MobileNetv3-YOLOv4 | 82.87 | 53.7 | 56.83 |
| SSD with VGG | 69.13 | 91.1 | 25.66 |
Bold values represent the best performance exhibited among detection models.
FIGURE 10Schematic diagram of the detection scheme of the Litchi APP.
FIGURE 11The fitted curve between the ground truth in the orchard and the predicted value of the Litchi APP.