| With the widespread use of pesticides in agricultural production,understanding the residual status of pesticides in soil is of great significance for guiding agricultural production and soil pollution control,as well as for ecological environment,food safety,and human health.Traditional methods of detecting and analyzing pesticide residues in soil require a lot of time and manpower.In contrast,electronic nose systems based on gas sensors have lower detection costs and have been successfully applied to pesticide residue detection in crops.However,research on pesticide residue detection in soil is relatively insufficient,and there is still room for improvement in the performance and generalization of identification algorithms,especially in the recognition of lowconcentration signals and the ability to resist interference factors such as humidity.To address the above-mentioned issues,this paper adopts a transfer learning strategy and proposes two detection frameworks based on gas sensors.The specific work is as follows:(1)A two-stage framework for recognizing pesticide categories and concentrations is proposed.The first stage of the framework determines whether pesticide residues exist and identifies their categories,while the second stage determines the specific pesticide variety and its concentration.The framework adopts a multi-task learning strategy to enhance the robustness of the extracted features and improve the model’s generalization ability.Meanwhile,transfer learning pre-training is used for the second stage training,and several different pre-training methods are compared and analyzed.Experimental results show that the proposed two-stage framework can achieve an accuracy of 92.5% in the most difficult 24-class pesticide residue classification task,which outperforms other existing methods.(2)To eliminate the influence of different humidity levels on pesticide residue detection,a domain adaptive soil pesticide recognition transfer learning algorithm based on domain adaptation is proposed.The algorithm regards different humidity conditions as different domains and adopts domain adversarial training to make the model parameters insensitive to domains,meaning that the model has universality for different humidity conditions.The proposed domain adaptive transfer learning network model is compared with various methods through experiments,and the results verify the effectiveness of the proposed algorithm,which significantly improves the model’s classification performance in the target domain of pesticide residues,and performs the best among other methods with the same amount of data.This research focuses on the detection of pesticide residues in soil and proposes two detection methods based on gas sensors using transfer learning strategies.These methods not only have excellent detection capabilities but also have good universality under different environmental conditions,making it possible to achieve in-situ detection of agricultural residues in soil using gas sensors.The methods proposed in this article have important guiding significance for soil improvement,food safety,and ensuring agricultural production. |