Dual branches deep neural network for semantic segmentation in agricultural scenes
Accurate localization of crops and weeds in agricultural field scenes is the foundation for targeted spraying of herbicides and mechanical intelligent weeding.To address the issues of mutual occlusion between targets and target deformation that existing algorithms are susceptible to,a semantic segmentation algorithm was proposed for agricultural field scenes based on a dual-branch neural network.This algorithm achieves pixel-level classification of crops and weeds,thereby obtaining their precise location information.Firstly,we designed a backbone network based on the ResNeSt architecture to extract features from input images.Then,we proposed a parallel dual-branch neural network consisting of a detail branch and a semantic context branch.The detail branch focuses on extracting fine-grained information from images,while the semantic context branch captures high-level semantic contextual information.Attention mechanisms were introduced to better extract contextual features and enhance the performance of semantic segmentation.Next,we performed effective feature fusion using a dual-branch feature fusion module to combine the features extracted from the detail branch and the semantic context branch.Finally,the semantic segmentation head module outputs the semantic segmentation results for crops and weeds.Experimental results on our self-built dataset demonstrate that the proposed semantic segmentation algorithm for agricultural field scenes achieves pixel-level accurate segmentation of crops and weeds,with an mIoU(mean Intersection over Union)value of 93.8%.This algorithm meets the practical application requirements of intelligent weeding and targeted herbicide spraying.