Training method, recognition method and device of bird sound detection and recognition model

By utilizing the transfer learning method of local data sets and pre-trained data sets, the recognition accuracy and robustness of bird sound detection recognition model are improved, and the problem of model dependence on labeled data and data distribution differences in the prior art is solved.

CN119296549APending Publication Date: 2025-01-10GUANGZHOU UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411298392.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing bird sound detection recognition model requires a large amount of labeled data during the training process, and the training set data is different from the field data distribution in natural scenes, resulting in low robustness of the model and affecting the recognition accuracy.

Method used

By acquiring local binary data sets and local label-free data sets, the semi-supervised bird sound detection model is trained, and the pre-trained bird sound data sets are combined for transfer learning, reducing dependence on labeled data and improving model generalization capabilities.

Benefits of technology

It improves the recognition accuracy and generalization ability of bird sound detection recognition model, reduces dependence on labeled data, learns the characteristics of field data, and enhances the robustness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119296549A_ABST
    Figure CN119296549A_ABST
Patent Text Reader

Abstract

The invention discloses a training method, a recognition method and a device for a bird sound detection and recognition model, and the training method comprises the steps: carrying out the training of a semi-supervised bird sound detection model according to a local dichotomy data set and a local unlabeled data set, and obtaining a target detection model; inputting the local label-free data set into a target detection model for bird sound detection processing to obtain a bird sound detection data set; performing pre-training processing on the pre-training model according to the pre-training bird sound data set to obtain a bird sound recognition model; carrying out transfer learning fine tuning training processing on the bird sound recognition model according to the local target bird sound data set to obtain a target recognition model; and obtaining a bird sound detection and recognition model according to the target detection model and the target recognition model. The embodiment of the invention can improve the recognition accuracy of the model, and can be widely applied to the technical field of artificial intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a training method, an identification method and a device for a bird sound detection and identification model. Background Art

[0002] Passive acoustic monitoring technology is a popular emerging technology in bird monitoring. Through the acoustic recording unit, a large amount of audio data in the natural scene of the monitoring area can be collected, so that the audio data can be used to identify and classify bird sounds. In the related art, there is a classification method based on deep learning, that is, the complex patterns and feature representations in the data can be automatically learned through the deep learning method, thereby improving the accuracy and generalization ability of classification. However, in the model training process, a large amount of labeled data is required, and the training set data has a different data distribution from the field data in the natural scene, resulting in low robustness of the model, which affects the recognition accuracy of the bird sound detection and recognition model. In summary, the technical problems existing in the related art need to be improved. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a training method, a recognition method and a device for a bird sound detection and recognition model, which can improve the recognition accuracy of the bird sound detection and recognition model.

[0004] To achieve the above purpose, one aspect of an embodiment of the present application provides a training method for a bird sound detection and recognition model, the training method comprising:

[0005] Obtain a local binary classification dataset, a local unlabeled dataset, a pre-trained bird sound dataset, and a local target bird sound dataset;

[0006] Build a semi-supervised bird sound detection model and pre-training model;

[0007] The semi-supervised bird sound detection model is trained according to the local binary classification data set and the local unlabeled data set to obtain a target detection model;

[0008] Inputting the local unlabeled data set into the target detection model for bird sound detection processing to obtain a bird sound detection data set;

[0009] Performing pre-training learning processing on the pre-training model according to the pre-training bird sound data set to obtain a bird sound recognition model;

[0010] Performing transfer learning fine-tuning training on the bird sound recognition model according to the local target bird sound data set to obtain a target recognition model;

[0011] A bird sound detection and recognition model is obtained according to the target detection model and the target recognition model.

[0012] In some embodiments, training the semi-supervised bird sound detection model according to the local binary classification dataset and the local unlabeled dataset to obtain a target detection model includes the following steps:

[0013] Training the semi-supervised bird sound detection model according to the local binary classification data set to calculate a first loss function;

[0014] Performing data enhancement processing on the local unlabeled data set to obtain an enhanced data set;

[0015] Inputting the local unlabeled data set and the enhanced data set into the semi-supervised bird sound detection model for prediction processing, and calculating a second loss function;

[0016] Performing instance similarity calculation processing on the local unlabeled dataset and the enhanced dataset to obtain a third loss function;

[0017] The parameter update processing of the semi-supervised bird sound detection model is performed according to the first loss function, the second loss function and the third loss function to obtain the target detection model.

[0018] In some embodiments, the training process of the semi-supervised bird sound detection model according to the local binary classification data set to calculate a first loss function comprises the following steps:

[0019] Performing data preprocessing on the local binary classification data set to obtain a Mel-spectrogram;

[0020] Performing feature extraction processing on the Mel-frequency spectrum graph through a convolutional neural network encoder to obtain feature data;

[0021] Performing semantic mapping processing on the feature data through a fully connected layer prediction head to obtain a sample prediction result;

[0022] A cross entropy loss calculation process is performed based on the true label of the local binary classification data set and the sample prediction result to obtain the first loss function.

[0023] In some embodiments, the step of inputting the local unlabeled dataset and the enhanced dataset into the semi-supervised bird sound detection model for prediction processing and calculating a second loss function comprises the following steps:

[0024] Inputting the local unlabeled dataset and the enhanced dataset into the semi-supervised bird sound detection model for prediction processing to obtain model prediction results and pseudo labels;

[0025] Performing classification loss confidence calculation processing on the model prediction result to obtain a first confidence threshold;

[0026] A cross entropy loss calculation process is performed on the pseudo-label according to the first confidence threshold to obtain the second loss function.

[0027] In some embodiments, performing instance similarity calculation processing on the local unlabeled dataset and the enhanced dataset to obtain a third loss function includes the following steps:

[0028] Performing embedding mapping processing on the local unlabeled data set and the enhanced data set to obtain unlabeled data feature embedding and enhanced data feature embedding;

[0029] According to the local binary classification data set, respectively, the unlabeled data feature embedding and the enhanced data feature embedding are subjected to instance similarity calculation processing to obtain a first embedding similarity and a second embedding similarity;

[0030] A cross entropy calculation process is performed on the first embedding similarity and the second embedding similarity to obtain the third loss function.

[0031] In some embodiments, performing pre-training learning processing on the pre-training model according to the pre-training bird sound dataset to obtain a bird sound recognition model comprises the following steps:

[0032] Performing logistic regression training on the pre-trained model according to the pre-trained bird sound data set to obtain a trained deep feature extraction network backbone;

[0033] An initial recognition model is constructed according to the local target bird sound data set, and the parameter weights of the deep feature extraction network backbone are copied to the initial recognition model, and the initial recognition model is fine-tuned and trained to obtain the bird sound recognition model.

[0034] In some embodiments, performing transfer learning fine-tuning training on the bird sound recognition model according to the local target bird sound dataset to obtain a target recognition model includes the following steps:

[0035] Inputting the bird sound detection data set into the bird sound recognition model for recognition prediction processing to obtain recognition prediction results;

[0036] Performing prediction screening threshold calculation processing on the recognition prediction result to obtain a second confidence threshold;

[0037] Performing screening processing on the bird sound detection data set according to the second confidence threshold to obtain a screened data set;

[0038] The screening data set is added to the local target bird sound data set, and the local target bird sound data set is input into the bird sound recognition model for iterative training processing to obtain the target recognition model.

[0039] To achieve the above objectives, another aspect of the embodiment of the present application provides a recognition method for a bird sound detection and recognition model, which is used to detect and recognize bird sounds using a bird sound detection and recognition model trained by the training method described above. The recognition method includes:

[0040] Get local recording data;

[0041] The local recording data is input into the bird sound detection and recognition model to perform bird sound detection and recognition processing to obtain a bird sound recognition result.

[0042] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a training device for a bird sound detection and recognition model, the device comprising:

[0043] The first module is used to obtain a local binary classification dataset, a local unlabeled dataset, a pre-trained bird sound dataset, and a local target bird sound dataset;

[0044] The second module is used to build a semi-supervised bird sound detection model and a pre-training model;

[0045] A third module is used to train the semi-supervised bird sound detection model according to the local binary classification data set and the local unlabeled data set to obtain a target detection model;

[0046] A fourth module is used to input the local unlabeled data set into the target detection model to perform bird sound detection processing to obtain a bird sound detection data set;

[0047] A fifth module is used to perform pre-training learning processing on the pre-training model according to the pre-training bird sound data set to obtain a bird sound recognition model;

[0048] A sixth module is used to perform transfer learning fine-tuning training processing on the bird sound recognition model according to the local target bird sound data set to obtain a target recognition model;

[0049] The seventh module is used to obtain a bird sound detection and recognition model based on the target detection model and the target recognition model.

[0050] To achieve the above objectives, another aspect of the embodiment of the present application provides a recognition device for a bird sound detection and recognition model, the recognition device comprising:

[0051] The eighth module is used to obtain local recording data;

[0052] The ninth module is used to input the local recording data into the bird sound detection and recognition model to perform bird sound recognition processing to obtain a bird sound recognition result.

[0053] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the training method or recognition method described above when executing the computer program.

[0054] To achieve the above objectives, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the training method or recognition method described above is implemented.

[0055] The embodiments of the present application include at least the following beneficial effects: The present application provides a training method, a recognition method and a device for a bird sound detection and recognition model. The scheme trains and processes a semi-supervised bird sound detection model according to a local binary classification data set and a local unlabeled data set to obtain a target detection model, and can train local unlabeled data through an unsupervised learning model to improve the generalization ability of the model to local data. In addition, the scheme performs transfer learning processing on the pre-trained model according to the pre-trained bird sound data set to obtain a bird sound recognition model, and trains and processes the bird sound recognition model according to the bird sound detection data set and the local target bird sound data set to obtain a target recognition model, which can be pre-trained on a large amount of audio data through a transfer learning method, thereby greatly reducing the model's reliance on labeled data when transferring learning to process downstream tasks, and improving the generalization ability of the model. The scheme obtains a bird sound detection and recognition model according to a target detection model and a target recognition model, which can reduce the model's reliance on labeled data, and learn the characteristics of field data, thereby improving the recognition accuracy of the bird sound detection and recognition model. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a flow chart of a method for training a bird sound detection and recognition model provided in an embodiment of the present application;

[0057] Figure 2 is a training flow chart of a recognition model provided in an embodiment of the present application;

[0058] Figure 3 It is a structural diagram of a deep feature extraction network backbone provided in an embodiment of the present application;

[0059] Figure 4 It is an implementation flow chart provided by an embodiment of the present application;

[0060] Figure 5 It is a structural schematic diagram of a training device for a bird sound detection and recognition model provided in an embodiment of the present application;

[0061] Figure 6 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0063] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0064] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0066] Passive acoustic monitoring technology is a popular emerging technology in bird monitoring. Compared with traditional monitoring methods such as artificial sampling point monitoring and mark-recapture method, passive acoustic monitoring method can not only break through the limitations of weather conditions and space factors, but also maintain a long-term monitoring mode. Through the acoustic recording unit, a large amount of audio data in natural scenes of the monitoring area can be collected, and this data can be used as a long-term monitoring archive. However, it is unrealistic to identify the bird sounds in the massive audio data only by manual experts. The manual identification process is not only difficult to accurately identify, but also consumes a lot of manpower and time costs.

[0067] In the related art, there are classification methods based on machine learning and classification methods based on deep learning. Among them, the classification method based on machine learning can be mainly divided into three parts: audio signal preprocessing, bird sound feature extraction, and classifier construction. Feature vectors that accurately represent bird sounds are extracted from the original sound signal. These feature vectors are extracted based on multiple acoustic features of the sound signal. Subsequently, these feature vectors are input into various traditional machine learning models for classification tasks. In bird sound classification, commonly used traditional machine learning models include random forests, support vector machines (SVM), K nearest neighbor algorithms (KNN), naive Bayes classifiers, and decision trees. Deep learning can automatically learn the feature representation of input data through a multi-level neural network structure, thereby overcoming the reliance on manually designed features in traditional methods to a certain extent. The application of deep learning methods in bird sound classification tasks usually includes the use of model structures such as convolutional neural networks (CNNs) or recurrent neural networks (RNNs). CNN performs well in processing time domain or frequency domain data, can effectively capture local features of signals, and is suitable for processing sound waveform data. RNN is suitable for processing sound data with time series properties and can capture the timing information between sound sequences, such as the duration and frequency changes of bird calls. The advantage of deep learning methods lies in their efficient learning ability for large-scale data and automatic feature extraction. By training on a large amount of labeled data, deep learning models can automatically learn complex patterns and feature representations in the data, thereby improving classification accuracy and generalization ability. In addition, deep learning methods are also flexible and scalable, showing great potential in dealing with complex bird sound classification tasks.

[0068] However, in practical applications, it is found that a large amount of labeled data is required, and the training set data has a different data distribution from the field data in natural scenes, which leads to lower robustness of the model and affects the recognition accuracy of the bird sound detection and recognition model.

[0069] For example, for a bird song data sample, this usually means that the bird calls in each audio sample must be manually identified and labeled. This process is not only very time-consuming, but also requires the executor to have the corresponding professional knowledge and skills to ensure the accuracy of the annotation. In practice, the available data annotation resources are often limited, which has become the main limiting factor for training highly robust models. During the model training phase, the distribution type of field data, that is, the target domain data, is often invisible. This results in the model being unable to take into account all possible field data changes when it is designed, thereby limiting its generalization ability in practical applications. Field recording data may contain a variety of noise and interference, such as environmental noise, distortion caused by recording equipment, and the sounds of non-target species, which results in field data and training data often having different data distribution types. So a model that performs well on the training set may perform significantly worse when faced with field data.

[0070] In view of this, a training method, a recognition method and a device for a bird sound detection and recognition model are provided in an embodiment of the present application. The scheme trains and processes a semi-supervised bird sound detection model according to a local binary classification data set and a local unlabeled data set to obtain a target detection model, and can train local unlabeled data through an unsupervised learning model to improve the generalization ability of the model to local data. In addition, the scheme performs transfer learning processing on the pre-trained model according to the pre-trained bird sound data set to obtain a bird sound recognition model, and trains and processes the bird sound recognition model according to the bird sound detection data set and the local target bird sound data set to obtain a target recognition model, which can be pre-trained on a large amount of audio data through a transfer learning method, thereby greatly reducing the model's reliance on labeled data when transferring learning to process downstream tasks, and improving the generalization ability of the model. The scheme obtains a bird sound detection and recognition model based on a target detection model and a target recognition model, which can reduce the model's reliance on labeled data, and learn the characteristics of field data, thereby improving the recognition accuracy of the bird sound detection and recognition model.

[0071] A training method for a bird sound detection and recognition model provided in an embodiment of the present application relates to the field of artificial intelligence technology. A training method for a bird sound detection and recognition model provided in an embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements a training method for a bird sound detection and recognition model, etc., but is not limited to the above forms.

[0072] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0073] Figure 1 is an optional flowchart of a method for training a bird sound detection and recognition model provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S107.

[0074] Step S101, obtaining a local binary classification data set, a local unlabeled data set, a pre-trained bird sound data set, and a local target bird sound data set;

[0075] Step S102, constructing a semi-supervised bird sound detection model and a pre-training model;

[0076] Step S103, training the semi-supervised bird sound detection model according to the local binary classification data set and the local unlabeled data set to obtain a target detection model;

[0077] Step S104, inputting the local unlabeled data set into the target detection model to perform bird sound detection processing to obtain a bird sound detection data set;

[0078] Step S105, performing pre-training learning processing on the pre-training model according to the pre-training bird sound data set to obtain a bird sound recognition model;

[0079] Step S106, performing transfer learning fine-tuning training processing on the bird sound recognition model according to the local target bird sound data set to obtain a target recognition model;

[0080] Step S107, obtaining a bird sound detection and recognition model according to the target detection model and the target recognition model.

[0081] Steps S101 to S107 shown in the embodiment of the present application, by acquiring a local binary classification data set, a local unlabeled data set, a pre-trained bird sound data set and a local target bird sound data set, and constructing a semi-supervised bird sound detection model and a pre-trained model, then training the semi-supervised bird sound detection model according to the local binary classification data set and the local unlabeled data set, to obtain a target detection model, which can be trained on local unlabeled data through an unsupervised learning model to improve the generalization ability of the model to local data. The embodiment of the present application performs transfer learning processing on the pre-trained model according to the pre-trained bird sound data set to obtain a bird sound recognition model, and trains the bird sound recognition model according to the bird sound detection data set and the local target bird sound data set to obtain a target recognition model, which can be pre-trained on a large amount of audio data through a transfer learning method, thereby greatly reducing the model's reliance on labeled data when transferring learning to process downstream tasks, and improving the generalization ability of the model. Finally, the embodiment of the present application obtains a bird sound detection and recognition model according to the target detection model and the target recognition model, which can reduce the model's reliance on labeled data, and learn the characteristics of field data, thereby improving the recognition accuracy of the bird sound detection and recognition model.

[0082] In step S101 of some embodiments, a local two-category dataset, a local unlabeled dataset, a pre-trained bird sound dataset, and a local target bird sound dataset are obtained, and the obtained datasets are used to train the constructed semi-supervised bird sound detection model and the pre-trained model. Among them, the local two-category dataset is obtained by manually dividing the bird sound and non-bird sound segments of the local recording data. The local two-category dataset includes bird sound data and non-bird sound data. The categories of flying bird sound data mainly include man-made noise, natural interference noise such as wind and rain, insect noise, etc. The local unlabeled dataset is derived from the local recording data and does not require manual selection and processing. The pre-trained bird sound dataset contains bird audio data from around the world, which is obtained through open source bird sound websites (such as xeno-canto, etc.). The local target bird sound dataset contains bird species contained in the local bird sound list, which is obtained by manually identifying and recognizing the bird sounds in the local recording data. The amount of data required for each category is much smaller than the pre-trained bird sound dataset. The above datasets are obtained in the embodiment of the present application to form a training dataset. Table 1 is the metadata table of the training dataset, as shown in the following table:

[0083]

[0084] Table 1 Metadata table of training dataset

[0085] In the embodiment of the present application, the quantitative relationship between the number of categories of the above data set, the duration of each category of data and the total duration of the data set is generally set to: N source >N target ,K source >K target ,S source >S unlabeled ≥S target , where the local binary classification dataset has only two categories, and the number of categories of the local unlabeled dataset is unlimited.

[0086] In step S102 of the embodiment of the present application, a semi-supervised bird sound detection model and a pre-trained model are constructed, wherein the semi-supervised bird sound detection model is based on the SimMatch framework and introduces a pseudo-label adaptive threshold mechanism. SimMatch is a semi-supervised learning framework that combines semantic similarity and instance similarity to improve learning performance with a small amount of labeled data. The semi-supervised bird sound detection model uses two data sets, a local bird sound and non-bird sound binary classification data set and a local unlabeled data set, as training data. The structure of the pre-trained model includes a deep feature extraction network backbone, a fully connected layer, and a sigmoid activation, etc. The embodiment of the present application migrates the pre-trained model to the downstream recognition task of the local target bird species based on the pre-trained bird sound data set, and can generalize the model's localized features for field recording data.

[0087] In step S103 of some embodiments, training the semi-supervised bird sound detection model according to the local binary classification dataset and the local unlabeled dataset to obtain a target detection model includes the following steps:

[0088] Training the semi-supervised bird sound detection model according to the local binary classification data set to calculate a first loss function;

[0089] Performing data enhancement processing on the local unlabeled data set to obtain an enhanced data set;

[0090] Inputting the local unlabeled data set and the enhanced data set into the semi-supervised bird sound detection model for prediction processing, and calculating a second loss function;

[0091] Performing instance similarity calculation processing on the local unlabeled dataset and the enhanced dataset to obtain a third loss function;

[0092] The parameter update processing of the semi-supervised bird sound detection model is performed according to the first loss function, the second loss function and the third loss function to obtain the target detection model.

[0093] In an embodiment of the present application, a supervised training process is performed on a semi-supervised bird sound detection model based on a local binary classification data set, and the sample detection results are output by the semi-supervised bird sound detection model. The loss function is calculated in combination with the real label of the local binary classification data set to obtain a first loss function. Then, data enhancement processing is performed on the local unlabeled data set to obtain an enhanced data set. The data enhancement method in the embodiment of the present application is to superimpose noise data, and the noise data is selected from the non-bird sound category in the local binary classification data set. In the embodiment of the present application, the local unlabeled data is represented by a one-dimensional array, and a sound file is randomly selected from the non-bird sound category, and its audio signal is represented by a one-dimensional array. The expression of the audio after data enhancement is shown in the following formula:

[0094] data wn =data+noise;

[0095] In the formula, data wnRepresents the audio after data enhancement, data represents the local unlabeled data, and noise represents the noise data. In the embodiment of the present application, the local unlabeled data set and the enhanced data set are input into the semi-supervised bird sound detection model for prediction processing and calculation to obtain the second loss function. Specifically, each original unlabeled sample that has not undergone data enhancement and the corresponding unlabeled sample after data enhancement are simultaneously input into the model for prediction, and the cross entropy of the unsupervised classification loss is calculated to obtain the second loss function. The third loss function is also obtained by performing instance similarity calculation processing on the local unlabeled data set and the enhanced data set. Finally, the overall loss function of the semi-supervised learning framework is obtained according to the first loss function, the second loss function and the third loss function. The expression of the overall loss function is shown in the following formula:

[0096] L=L s +λ1L in +λ2L u ;

[0097] In the formula, L represents the overall loss function, L s represents the first loss function, L in represents the third loss function, L u represents the second loss function, and λ1 and λ2 represent hyperparameters. The semi-supervised bird sound detection model is updated according to the overall loss function to obtain a target detection model. The embodiment of the present application trains the bird sound detection model through semi-supervised learning, and introduces the training of unlabeled data in the training process, which can improve the robustness of the model.

[0098] In some embodiments, the training process of the semi-supervised bird sound detection model according to the local binary classification data set to calculate a first loss function comprises the following steps:

[0099] Performing data preprocessing on the local binary classification data set to obtain a Mel-spectrogram;

[0100] Performing feature extraction processing on the Mel-frequency spectrum graph through a convolutional neural network encoder to obtain feature data;

[0101] Performing semantic mapping processing on the feature data through a fully connected layer prediction head to obtain a sample prediction result;

[0102] A cross entropy loss calculation process is performed based on the true label of the local binary classification data set and the sample prediction result to obtain the first loss function.

[0103] In the embodiment of the present application, the semi-supervised bird sound detection model is trained in a supervised manner according to the local binary classification data set, and the audio samples with labels in the local binary classification data set are preprocessed to obtain a mel spectrum. A convolutional neural network encoder is then used for feature extraction, and then a prediction head of a fully connected layer is used to map the feature data into semantic information. Finally, the cross entropy loss is calculated through the sample prediction results and the true label for back propagation optimization. The true label is the sample label in the local binary classification data set, where the expression of the first loss function is shown as follows:

[0104]

[0105] Where, L s represents the first loss function, n represents the number of samples in the local binary classification data set, H represents the cross entropy calculation function, y represents the true label, and p represents the sample prediction result. The embodiment of the present application obtains the first loss function by performing supervised training on the semi-supervised bird sound detection model, which provides a basis for subsequent model parameter updates and can improve the detection accuracy of the model.

[0106] In some embodiments, the step of inputting the local unlabeled dataset and the enhanced dataset into the semi-supervised bird sound detection model for prediction processing and calculating a second loss function comprises the following steps:

[0107] Inputting the local unlabeled dataset and the enhanced dataset into the semi-supervised bird sound detection model for prediction processing to obtain model prediction results and pseudo labels;

[0108] Performing classification loss confidence calculation processing on the model prediction result to obtain a first confidence threshold;

[0109] A cross entropy loss calculation process is performed on the pseudo-label according to the first confidence threshold to obtain the second loss function.

[0110] In an embodiment of the present application, the local unlabeled data set and the enhanced data set are input into the semi-supervised bird sound detection model for prediction processing. Specifically, each original unlabeled sample that has not undergone data enhancement and the corresponding unlabeled sample that has undergone strong data enhancement are simultaneously input into the model for feature extraction, and the model prediction results and pseudo labels are output through the classification head network. The model prediction results are then processed by the classification loss confidence calculation to obtain the first confidence threshold, where the first confidence threshold is defined as the top-1 average confidence value of the previous batch prediction results of the non-data enhanced sample data multiplied by the initial threshold. The initial threshold can be set to 3 and can be adjusted according to actual conditions, and is not limited here. The expression of the first confidence threshold is as follows:

[0111]

[0112] In the formula, c τ represents the first confidence threshold, τ represents the initial threshold, c represents the number of samples in the batch, r represents the total number of sample categories, p(u b ) represents the model prediction result. Finally, the cross entropy loss calculation is performed on the pseudo-label according to the first confidence threshold, so as to calculate the cross entropy of the unsupervised classification loss according to the semantic information of the pseudo-label and the unlabeled sample to obtain the second loss function. The expression of the second loss function is shown as follows:

[0113]

[0114] Where, L u represents the second loss function, m represents the total number of samples, pw(u b ) represents the semantic information of the pseudo-label. The embodiment of the present application calculates the semantic similarity between the pseudo-label and the unlabeled data by setting a first confidence threshold, and can train the model using a small amount of labeled data and a large amount of unlabeled data, thereby reducing the model's dependence on training a large amount of labeled data and improving the robustness of the model.

[0115] In some embodiments, performing instance similarity calculation processing on the local unlabeled dataset and the enhanced dataset to obtain a third loss function includes the following steps:

[0116] Performing embedding mapping processing on the local unlabeled data set and the enhanced data set to obtain unlabeled data feature embedding and enhanced data feature embedding;

[0117] According to the local binary classification data set, respectively, the unlabeled data feature embedding and the enhanced data feature embedding are subjected to instance similarity calculation processing to obtain a first embedding similarity and a second embedding similarity;

[0118] A cross entropy calculation process is performed on the first embedding similarity and the second embedding similarity to obtain the third loss function.

[0119] In an embodiment of the present application, an instance similarity calculation process is performed on a local unlabeled data set and an enhanced data set. By performing embedding mapping processing on the local unlabeled data set and the enhanced data set, an unlabeled data feature embedding and an enhanced data feature embedding are obtained. Then, according to the local binary classification data set, an instance similarity calculation process is performed on the unlabeled data feature embedding and the enhanced data feature embedding respectively. Specifically, the instance similarity is calculated by using a similarity function to calculate the instance similarity between the unlabeled data feature embedding and the enhanced data feature embedding and the labeled data, wherein the calculation expression of the instance similarity is as follows:

[0120]

[0121] In the formula, q i represents embedding similarity, sim represents similarity function, b represents labeled data, n represents the total number of samples with labeled data, z d represents the anchor point feature vector, z i represents the feature vector of the input sample, and t represents the temperature parameter, which is used to control the sharpness of the similarity distribution. The third loss function is obtained by performing cross entropy calculation on the first embedding similarity and the second embedding similarity. The expression of the third loss function is shown in the following formula:

[0122]

[0123] Where, L in represents the third loss function, m represents the total number of samples in the local binary classification data set, qw represents the first embedding similarity, and qs represents the second embedding similarity. The embodiment of the present application helps to capture the intrinsic feature connection between data and promote the effective use of unlabeled data by calculating the similarity between instances.

[0124] In step S104 of some embodiments, the local unlabeled data set is input into the target detection model for bird sound detection processing to obtain a bird sound detection data set. Specifically, the trained semi-supervised bird sound detection model is used to identify bird sounds and non-bird sounds in the local unlabeled data set, and the segments identified as non-bird sounds are discarded, and the identified bird sound segments are used for the local bird sound recognition model based on pre-training transfer learning to identify the bird sound species.

[0125] In step S105 of some embodiments, performing pre-training learning processing on the pre-training model according to the pre-training bird sound data set to obtain a bird sound recognition model includes the following steps:

[0126] Performing logistic regression training on the pre-trained model according to the pre-trained bird sound data set to obtain a trained deep feature extraction network backbone;

[0127] An initial recognition model is constructed according to the local target bird sound data set, and the parameter weights of the deep feature extraction network backbone are copied to the initial recognition model, and the initial recognition model is fine-tuned and trained to obtain the bird sound recognition model.

[0128] In the embodiments of this application, please refer to Figure 2, according to the pre-trained bird sound dataset, the pre-trained model is trained with logistic regression to obtain the trained deep feature extraction network backbone. The pre-trained model training process can be roughly divided into four parts, including audio feature input, feature extraction backbone network, fully connected layer and sigmoid activation. The Mel spectrum of the dataset audio is used as the input data of our framework. The feature extraction network backbone is essentially a large classifier with the classification head removed. The main structure is as follows Figure 3 As shown in the figure, the convolution layer uses a 3x3 convolution kernel, the pooling layer uses a 2x2 average pooling with a step size of 2, the activation function selects the Swish activation function, and the fully connected layer is a 1x1 convolution layer. Figure 3 In the embodiment of the present application, the spectrogram obtained by the pre-trained bird sound data set is subjected to feature extraction to generate an embedding (Feature embedding), which can be regarded as a compact representation that captures the significant features of the input. This embedding is passed to a fully connected layer classification head, which applies a linear transformation to the embedding, and then applies the sigmoid function to obtain the category probability (confidence), and is trained by standard logistic regression. The embodiment of the present application transfers the parameters of the deep feature extraction network backbone of the pre-trained model, copies the parameter weights of the pre-trained model to the deep feature extraction network backbone of the local target bird species training framework, and designs the fully connected layer classification head according to the number of bird categories in the data set. The minimum batch size of the training process is set to 32, and the Adam optimizer with an initial learning rate of 0.0001 is used for optimization. The model is trained for 100 epochs using a fine-tuning training method and then saved. A new deep feature extraction network backbone can be obtained, thereby obtaining a bird sound recognition model. The embodiment of the present application reduces the model's requirements on the size of the training set data through a few-sample transfer learning method, thereby improving the robustness of the model.

[0129] In step S106 of some embodiments, performing transfer learning fine-tuning training on the bird sound recognition model according to the local target bird sound dataset to obtain a target recognition model includes the following steps:

[0130] Inputting the bird sound detection data set into the bird sound recognition model for recognition prediction processing to obtain recognition prediction results;

[0131] Performing prediction screening threshold calculation processing on the recognition prediction result to obtain a second confidence threshold;

[0132] Performing screening processing on the bird sound detection data set according to the second confidence threshold to obtain a screened data set;

[0133] The screening data set is added to the local target bird sound data set, and the local target bird sound data set is input into the bird sound recognition model for iterative training processing to obtain the target recognition model.

[0134] In an embodiment of the present application, a bird sound detection data set is input into a bird sound recognition model for recognition prediction processing to obtain a recognition prediction result. The recognition model can output a prediction result and a confidence level of the prediction result for the bird sound detection data recorded in the field, thereby designing an adaptive confidence threshold for screening reliable prediction results based on the confidence level of the prediction result of the field recording data in the bird sound detection data set. The embodiment of the present application performs a prediction screening threshold calculation process on the recognition prediction result to obtain a second confidence threshold, and the expression of the second confidence threshold is shown in the following formula:

[0135] τ f =λμ+(1-λ)τ0;

[0136] In the formula, τ f represents the second confidence threshold, λ is the average confidence of the prediction results of the field recording data, μ is the average confidence of the category of the prediction results, and τ0 is the initial confidence. The bird sound detection dataset is screened by the second confidence threshold. Specifically, the local unlabeled dataset is provided to the recognition model for prediction in units of 10,000 items. The prediction results with confidence greater than the threshold τ are selected. f The audio and prediction results are added to the local bird target species training set for re-training. The training is continuously iterated until the iteration condition is reached, that is, the target recognition model is trained. The embodiment of the present application improves the generalization performance of the model for field recording data by selecting bird sound samples with high confidence thresholds in the data to supplement the training set data.

[0137] The embodiment of the present application also provides a recognition method of a bird sound detection and recognition model, which is used to detect and recognize bird sounds using the bird sound detection and recognition model trained by the training method described above. The recognition method includes:

[0138] Get local recording data;

[0139] The local recording data is input into the bird sound detection and recognition model to perform bird sound detection and recognition processing to obtain a bird sound recognition result.

[0140] In the embodiment of the present application, bird sound detection and recognition is performed by a bird sound detection and recognition model trained by the training method described above. The bird sound detection and recognition model realizes the detection and recognition process of bird sound data by combining a semi-supervised learning framework and a pre-training transfer learning method. Semi-supervised learning mainly solves the problem of introducing unlabeled local data into the training process of the entire framework to improve the generalization level of local data. The transfer learning method greatly reduces the reliance on labeled data when transferring learning to process downstream tasks by pre-training on a large amount of audio data. Therefore, by inputting local recording data into the bird sound detection and recognition model for bird sound detection and recognition processing, more accurate bird sound recognition results can be obtained, thereby improving the recognition accuracy of the model.

[0141] The following is a detailed description of the embodiments of the present invention with reference to specific application examples:

[0142] The embodiment of the present application can be applied to the application scenario of bird sound detection and recognition. The bird sound detection and recognition model is trained by the training method of the bird sound detection and recognition model provided in the embodiment of the present application. Figure 4 Specifically, the local bird sound and non-bird sound dataset and the local unlabeled dataset are sliced ​​for 3s, and then the power spectrum is calculated, and the Mel spectrogram is calculated by the Mel filter, and the Mel spectrogram is input into the semi-supervised learning bird sound detection model for training, and the Mel spectrogram is data enhanced, and the corresponding data is selected through the adaptive threshold module to input the semi-supervised learning bird sound detection model for auxiliary training, and finally the detection result is output, and the non-bird sound audio is discarded, and the bird sound audio is input into the bird sound recognition classifier. Among them, the bird sound recognition classifier is trained by inputting the pre-training dataset, specifically by inputting the pre-training dataset into the pre-training model for transfer learning, taking the local target bird species dataset as the target task, and calculating the power spectrum of the local target bird species dataset, and fine-tuning the Mel spectrogram obtained by the Mel filter to obtain the bird sound recognition classifier, and the local unlabeled data is screened according to the confidence of the prediction result, and the data with confidence greater than the threshold is added to the local target bird species dataset to iteratively train the bird sound recognition classifier, so as to obtain the prediction result, and when the iteration reaches the specified condition, the model is saved and the training process ends.

[0143] See also Figure 5 The embodiment of the present application also provides a training device for a bird sound detection and recognition model, which can implement the training method of the bird sound detection and recognition model. The device includes:

[0144] The first module 501 is used to obtain a local binary classification data set, a local unlabeled data set, a pre-trained bird sound data set, and a local target bird sound data set;

[0145] The second module 502 is used to build a semi-supervised bird sound detection model and a pre-training model;

[0146] The third module 503 is used to train the semi-supervised bird sound detection model according to the local binary classification data set and the local unlabeled data set to obtain a target detection model;

[0147] The fourth module 504 is used to input the local unlabeled data set into the target detection model to perform bird sound detection processing to obtain a bird sound detection data set;

[0148] The fifth module 505 is used to perform pre-training learning processing on the pre-training model according to the pre-training bird sound data set to obtain a bird sound recognition model;

[0149] The sixth module 506 is used to perform transfer learning fine-tuning training processing on the bird sound recognition model according to the local target bird sound data set to obtain a target recognition model;

[0150] The seventh module 507 is used to obtain a bird sound detection and recognition model based on the target detection model and the target recognition model.

[0151] It can be understood that the contents of the above-mentioned training method embodiment are all applicable to the embodiment of the present device, the functions specifically implemented by the embodiment of the present device are the same as those of the above-mentioned training method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned training method embodiment.

[0152] Another aspect of the present application provides an identification device, the identification device comprising:

[0153] The eighth module is used to obtain local recording data;

[0154] The ninth module is used to input the local recording data into the bird sound detection and recognition model to perform bird sound recognition processing to obtain a bird sound recognition result.

[0155] It can be understood that the contents of the above-mentioned identification method embodiment are all applicable to the present device embodiment, the functions specifically implemented by the present device embodiment are the same as those of the above-mentioned identification method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned identification method embodiment.

[0156] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the training method of the bird sound detection and recognition model when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0157] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0158] See also Figure 6 , Figure 6 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0159] The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0160] The memory 602 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 calls and executes the training method of the bird sound detection and recognition model in the embodiment of this application;

[0161] Input / output interface 603, used to implement information input and output;

[0162] Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0163] Bus 605 , which transmits information between various components of the device (e.g., processor 601 , memory 602 , input / output interface 603 , and communication interface 604 );

[0164] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .

[0165] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the training method of the above-mentioned bird sound detection and recognition model.

[0166] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0167] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0168] The embodiments of the present application provide a training method, a recognition method and a device for a bird sound detection and recognition model. The scheme trains and processes a semi-supervised bird sound detection model according to a local binary classification data set and a local unlabeled data set to obtain a target detection model. The unsupervised learning model can be used to train local unlabeled data to improve the generalization ability of the model to local data. In addition, the scheme performs transfer learning processing on the pre-trained model according to the pre-trained bird sound data set to obtain a bird sound recognition model. The bird sound recognition model is trained and processed according to the bird sound detection data set and the local target bird sound data set to obtain a target recognition model. The transfer learning method can be used to pre-train on a large amount of audio data, thereby greatly reducing the model's reliance on labeled data when transferring learning to process downstream tasks, and improving the generalization ability of the model. The scheme obtains a bird sound detection and recognition model according to the target detection model and the target recognition model, which can reduce the model's reliance on labeled data and learn the characteristics of field data, thereby improving the recognition accuracy of the bird sound detection and recognition model.

[0169] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0170] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0171] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0172] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0173] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0174] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0175] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0176] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0178] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0179] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A method for training a bird sound detection and recognition model, characterized in that: The training method comprises the following steps: Obtain a local binary classification dataset, a local unlabeled dataset, a pre-trained bird sound dataset, and a local target bird sound dataset; Build a semi-supervised bird sound detection model and pre-training model; The semi-supervised bird sound detection model is trained according to the local binary classification data set and the local unlabeled data set to obtain a target detection model; Inputting the local unlabeled data set into the target detection model for bird sound detection processing to obtain a bird sound detection data set; Performing pre-training learning processing on the pre-training model according to the pre-training bird sound data set to obtain a bird sound recognition model; Performing transfer learning fine-tuning training on the bird sound recognition model according to the local target bird sound data set to obtain a target recognition model; A bird sound detection and recognition model is obtained according to the target detection model and the target recognition model.

2. The training method according to claim 1, characterized in that: The training process of the semi-supervised bird sound detection model according to the local binary classification data set and the local unlabeled data set to obtain a target detection model includes the following steps: Training the semi-supervised bird sound detection model according to the local binary classification data set to calculate a first loss function; Performing data enhancement processing on the local unlabeled data set to obtain an enhanced data set; Inputting the local unlabeled data set and the enhanced data set into the semi-supervised bird sound detection model for prediction processing, and calculating a second loss function; Performing instance similarity calculation processing on the local unlabeled dataset and the enhanced dataset to obtain a third loss function; The parameter update processing of the semi-supervised bird sound detection model is performed according to the first loss function, the second loss function and the third loss function to obtain the target detection model.

3. The training method according to claim 2, characterized in that: The training process of the semi-supervised bird sound detection model according to the local binary classification data set to calculate a first loss function comprises the following steps: Performing data preprocessing on the local binary classification data set to obtain a Mel-spectrogram; Performing feature extraction processing on the Mel-frequency spectrum graph through a convolutional neural network encoder to obtain feature data; Performing semantic mapping processing on the feature data through a fully connected layer prediction head to obtain a sample prediction result; A cross entropy loss calculation process is performed based on the true label of the local binary classification data set and the sample prediction result to obtain the first loss function.

4. The training method according to claim 2, characterized in that: The step of inputting the local unlabeled dataset and the enhanced dataset into the semi-supervised bird sound detection model for prediction processing and calculating a second loss function comprises the following steps: Inputting the local unlabeled dataset and the enhanced dataset into the semi-supervised bird sound detection model for prediction processing to obtain model prediction results and pseudo labels; Performing classification loss confidence calculation processing on the model prediction result to obtain a first confidence threshold; A cross entropy loss calculation process is performed on the pseudo-label according to the first confidence threshold to obtain the second loss function.

5. The training method according to claim 2, characterized in that: The performing instance similarity calculation processing on the local unlabeled dataset and the enhanced dataset to obtain a third loss function comprises the following steps: Performing embedding mapping processing on the local unlabeled data set and the enhanced data set to obtain unlabeled data feature embedding and enhanced data feature embedding; According to the local binary classification data set, respectively, the unlabeled data feature embedding and the enhanced data feature embedding are subjected to instance similarity calculation processing to obtain a first embedding similarity and a second embedding similarity; A cross entropy calculation process is performed on the first embedding similarity and the second embedding similarity to obtain the third loss function.

6. The training method according to claim 1, characterized in that: The pre-training learning process is performed on the pre-training model according to the pre-training bird sound data set to obtain a bird sound recognition model, comprising the following steps: Performing logistic regression training on the pre-trained model according to the pre-trained bird sound data set to obtain a trained deep feature extraction network backbone; An initial recognition model is constructed according to the local target bird sound data set, and the parameter weights of the deep feature extraction network backbone are copied to the initial recognition model, and the initial recognition model is fine-tuned and trained to obtain the bird sound recognition model.

7. The training method according to any one of claims 1 to 6, characterized in that: The step of performing transfer learning fine-tuning training on the bird sound recognition model according to the local target bird sound data set to obtain a target recognition model comprises the following steps: Inputting the bird sound detection data set into the bird sound recognition model for recognition prediction processing to obtain recognition prediction results; Performing prediction screening threshold calculation processing on the recognition prediction result to obtain a second confidence threshold; Performing screening processing on the bird sound detection data set according to the second confidence threshold to obtain a screened data set; The screening data set is added to the local target bird sound data set, and the local target bird sound data set is input into the bird sound recognition model for iterative training processing to obtain the target recognition model.

8. A method for detecting and identifying a bird sound, characterized in that: Used to detect and recognize bird sounds using a bird sound detection and recognition model trained by the training method according to any one of claims 1 to 7, the recognition method comprising: Get local recording data; The local recording data is input into the bird sound detection and recognition model to perform bird sound detection and recognition processing to obtain a bird sound recognition result.

9. A training device for a bird sound detection and recognition model, characterized in that: The training device comprises: The first module is used to obtain a local binary classification dataset, a local unlabeled dataset, a pre-trained bird sound dataset, and a local target bird sound dataset; The second module is used to build a semi-supervised bird sound detection model and a pre-training model; A third module is used to train the semi-supervised bird sound detection model according to the local binary classification data set and the local unlabeled data set to obtain a target detection model; A fourth module is used to input the local unlabeled data set into the target detection model to perform bird sound detection processing to obtain a bird sound detection data set; A fifth module is used to perform pre-training learning processing on the pre-training model according to the pre-training bird sound data set to obtain a bird sound recognition model; A sixth module is used to perform transfer learning fine-tuning training processing on the bird sound recognition model according to the local target bird sound data set to obtain a target recognition model; The seventh module is used to obtain a bird sound detection and recognition model based on the target detection model and the target recognition model.

10. A recognition device for a bird sound detection and recognition model, characterized in that: The identification device comprises: The eighth module is used to obtain local recording data; The ninth module is used to input the local recording data into the bird sound detection and recognition model to perform bird sound recognition processing to obtain a bird sound recognition result.