Detection of weeds in vegetables using image classification neural networks and image processing - Jin, Huiping; Han, Kang; Xia, Hongting; Xu, Bo; Jin, Xiaojun (Frontiers in Physics, 2025)
Weed management presents a major challenge to vegetable growth. Accurate identification of weeds is essential for automated weeding. However, the wide variety of weed types and their complex distribution creates difficulties in rapid and accurate weed detection. In this study, instead of directly applying deep learning to identify weeds, we first created grid cells on the input images. Image classification neural networks were utilized to identify the grid cells containing vegetables and exclude them from further analysis. Finally, image processing technology was employed to segment the non-vegetable grid images based on their color features. The background grid cells, which contained no green pixels, were identified, while the remaining cells were labeled as weed cells. EfficientNet, GoogLeNet, and ResNet models achieved overall accuracies of over 0.956 in identifying vegetables in the testing dataset, demonstrating exceptional identification performance. Among these models, the ResNet model exhibited the highest computational efficiency, with a classification time of 12.76 ms per image and a corresponding frame rate of 80.31 fps, satisfying the requirement for real-time weed detection. Effectively identifying vegetables and differentiating weeds from soil significantly reduces the complexity of weed detection and improves its accuracy.