智慧农业 (Mar 2024)

Transplant Status Detection Algorithm of Cabbage in the Field Based on Improved YOLOv8s

  • WU Xiaoyan,
  • GUO Wei,
  • ZHU Yiping,
  • ZHU Huaji,
  • WU Huarui

DOI
https://doi.org/10.12133/j.smartag.SA202401008
Journal volume & issue
Vol. 6, no. 2
pp. 107 – 117

Abstract

Read online

ObjectiveCurrently, the lack of computerized systems to monitor the quality of cabbage transplants is a notable shortcoming in the agricultural industry, where transplanting operations play a crucial role in determining the overall yield and quality of the crop. To address this problem, a lightweight and efficient algorithm was developed to monitor the status of cabbage transplants in a natural environment.MethodsFirst, the cabbage image dataset was established, the cabbage images in the natural environment were collected, the collected image data were filtered and the transplanting status of the cabbage was set as normal seedling (upright and intact seedling), buried seedling (whose stems and leaves were buried by the soil) and exposed seedling (whose roots were exposed), and the dataset was manually categorized and labelled using a graphical image annotation tool (LabelImg) so that corresponding XML files could be generated. And the dataset was pre-processed with data enhancement methods such as flipping, cropping, blurring and random brightness mode to eliminate the scale and position differences between the cabbages in the test and training sets and to improve the imbalance of the data. Then, a cabbage transplantation state detection model based on YOLOv8s (You Only Look Once Version 8s) was designed. To address the problem that light and soil have a large influence on the identification of the transplantation state of cabbage in the natural environment, a multi-scale attention mechanism was embedded to increase the number of features in the model, and a multi-scale attention mechanism was embedded to increase the number of features in the model. Embedding the multi-scale attention mechanism to increase the algorithm's attention to the target region and improve the network's attention to target features at different scales, so as to improve the model's detection efficiency and target recognition accuracy, and reduce the leakage rate; by combining with deformable convolution, more useful target information was captured to improve the model's target recognition and convergence effect, and the model complexity increased by C3-layer convolution was reduced, which further reduced the model complexity. Due to the unsatisfactory localization effect of the algorithm, the focal extended intersection over union loss (Focal-EIoU Loss) was introduced to solve the problem of violent oscillation of the loss value caused by low-quality samples, and the influence weight of high-quality samples on the loss value was increased while the influence of low-quality samples was suppressed, so as to improve the convergence speed and localization accuracy of the algorithm.Results and DiscussionsEventually, the algorithm was put through a stringent testing phase, yielding a remarkable recognition accuracy of 96.2% for the task of cabbage transplantation state. This was an improvement of 2.8% over the widely used YOLOv8s. Moreover, when benchmarked against other prominent target detection models, the algorithm emerged as a clear winner. It showcased a notable enhancement of 3% and 8.9% in detection performance compared to YOLOv3-tiny. Simultaneously, it also managed to achieve a 3.7% increase in the recall rate, a metric that measured the efficiency of the algorithm in identifying actual targets among false positives. On a comparative note, the algorithm outperformed YOLOv5 in terms of recall rate by 1.1%, 2% and 1.5%, respectively. When pitted against the robust faster region-based convolutional neural network (Faster R-CNN), the algorithm demonstrated a significant boost in recall rate by 20.8% and 11.4%, resulting in an overall improvement of 13%. A similar trend was observed when the algorithm was compared to the single shot multibox detector (SSD) model, with a notable 9.4% and 6.1% improvement in recall rate. The final experimental results show that when the enhanced model was compared with YOLOv7-tiny, the recognition accuracy was increased by 3%, and the recall rate was increased by 3.5%. These impressive results validated the superiority of the algorithm in terms of accuracy and localization ability within the target area. The algorithm effectively eliminates interferenced factors such as soil and background impurities, thereby enhancing its performance and making it an ideal choice for tasks such as cabbage transplantation state recognition.ConclusionsThe experimental results show that the proposed cabbage transplantation state detection method can meet the accuracy and real-time requirements for the identification of cabbage transplantation state, and the detection accuracy and localization accuracy of the improved model perform better when the target is smaller and there are weeds and other interferences in the background. Therefore, the method proposed in this study can improve the efficiency of cabbage transplantation quality measurement, reduce the time and labor, and improve the automation of field transplantation quality survey.

Keywords