Abstract:
The current degradation of grasslands is severe, posing a serious threat to ecological stability, forage yield, and the sustainable development of animal husbandry. The use of agricultural robots (such as unmanned aerial vehicle (UAV) platforms) for monitoring and reseeding degraded grassland patches has become an important means of grassland ecological restoration. Given the insufficient accuracy of patch identification in existing UAV operations and the low accuracy of patch positioning due to easy target loss or unstable tracking, this study proposes a computer vision method that integrates advanced object detection and tracking algorithms to achieve efficient detection and positioning of grassland patches, providing technical support for precise reseeding operations. This study uses the YOLO series model for patch detection and introduces an adaptive feature pyramid network to enhance multi-scale feature fusion capabilities, thereby improving detection accuracy in complex grassland backgrounds. Lightweight convolution is used to achieve channel compression and nonlinear activation, while optimizing the expression ability of deep features and computational efficiency. The Swin Transformer sliding window self-attention mechanism and residual convolution structure are adopted to establish long-range dependencies between patches and the grassland background within the local receptive field. The input RGB patch images are converted to the YUV color space, and the single-channel luminance map is extracted as the input to enhance the luminance contrast of the grassland and patch texture structures. In terms of temporal consistency and target tracking, the DeepOCSORT algorithm is combined to perform multi-target tracking of patches in consecutive image sequences. The improved SCTD-YOLO detector significantly outperforms the baseline YOLOv8 in detection performance. In ablation experiments, the addition of different module combinations improved the model performance to varying degrees. When using the improved SCTD-YOLO model, the accuracy rate increased to 94.7%, the recall rate was 86.2%, and the effect was the best; the average precision increased by 2.4 percentage points, and the mAP increased by 2.2 percentage points. Under different lighting conditions, complex grassland texture backgrounds, partial patch occlusion by plants, and significant changes in patch size, the model still maintains high robustness, with significantly reduced missed detection and false detection rates. In multi-target tracking, after combining with the DeepOCSORT tracker, the algorithm effectively maintains the consistency of patches in multi-frame sequences, with an IDF1 of 85.15%, an MOTA of 88.2%, and an MOTP of 86.71%, significantly reducing false detections and ID switches. Experiments show that in scenarios of rapid camera panning, grass leaf shaking caused by wind, and dynamic background changes, DeepOCSORT can still stably maintain target trajectories, significantly improving the reliability of long-term monitoring. Finally, the predicted latitude and longitude coordinates are obtained through image modeling and external parameter calculation, and compared with high-precision RTK-GPS measurement coordinates. The spatial positioning error is calculated using the Vincenty formula. The results show that the combination of the improved SCTD-YOLO and stable tracking algorithm significantly reduces the overall positioning error, with an average error of 0.316m and an error range of 0.278m to 0.423m. The improved algorithm shows higher positioning accuracy and error stability in all test samples, effectively improving the overall consistency of target detection, tracking, and positioning. The overall results meet the requirement of less than 0.5m for positioning accuracy in intelligent reseeding operations of degraded grassland patches. The integrated framework of SCTD-YOLO and DeepOCSORT proposed in this study provides a high-precision and stable solution for patch detection, tracking, and positioning in complex multi-scenario and multi-interference environments for agricultural robots. This research not only improves the efficiency and reliability of grassland patch reseeding but also provides technical support for the generalization application of agricultural robot vision algorithms in different agronomic models and environmental conditions, which is of great significance for sustainable grassland management, resource conservation, and ecological restoration. In the future, further exploration will be conducted on seasonal monitoring and adaptive reseeding decision-making methods based on multi-source remote sensing data.