A cross-domain recognition method for wildlife images based on deep transfer learning

Through deep transfer learning and domain adversarial methods, domain-invariant features are extracted, and the loss function is constructed using Transformer, which solves the problem of poor generalization performance in cross-domain recognition of wild animal images and achieves a more efficient recognition and annotation process.

CN117315487BActive Publication Date: 2024-08-23BEIJING FORESTRY UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311450877.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2024-08-23
Estimated Expiration
2043-11-02

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively perform cross-domain recognition of wildlife images in complex scenes, resulting in poor generalization performance of the model on new data sets, and large-scale annotation tasks are labor-intensive and difficult to achieve information migration.

Method used

Using a method based on deep transfer learning, by constructing a cross-domain wildlife image data set, using the domain adversarial method to extract domain invariant features, introducing the maximum mean difference constraint and Transformer to construct a constrained loss function, and designing a fusion perceptual adversarial network to realize wildlife images cross-domain recognition.

Benefits of technology

It improves the accuracy of wildlife image recognition tasks and the generalization performance of the model, reduces domain shift, simplifies the data annotation and model training process, and improves recognition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117315487B
    Figure CN117315487B
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and in particular to a method for cross-domain identification of wildlife images based on deep transfer learning, including pre-constructing a cross-domain wildlife image dataset to form a domain adaptation dataset; using a domain adversarial method to extract domain-invariant features of wildlife to reduce domain offset; introducing a maximum mean difference constraint in a domain adversarial neural network; and introducing a Transformer after a backbone network to construct a constraint loss function. The present invention can better solve the problem of the impact of negative transfer on the accuracy of wildlife classification through a cross-domain identification method of wildlife images based on deep transfer learning, thereby achieving effective identification of wildlife images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a cross-domain recognition method for wildlife images based on deep transfer learning. Background Art

[0002] Wildlife monitoring and rapid evaluation are necessary means for the protection of wildlife populations, and are crucial for understanding the dynamics of wildlife populations, behavioral activity patterns, and human interference (such as poaching). At present, infrared cameras have become the main monitoring technology for large and medium-sized terrestrial mammals and ground-dwelling birds. Ecologists use image data captured by infrared cameras to monitor the distribution of wildlife populations. As time goes by, more and more infrared cameras are deployed in the wild, which also allows research institutions and animal protection organizations to obtain a large amount of image data, which helps support the ecological research and protection management of wildlife. In order to efficiently process the rich wildlife data, deep learning models are usually used to batch identify species to shorten the data processing cycle and improve classification efficiency.

[0003] However, there are distribution differences between wildlife image datasets. This difference is mainly caused by differences in camera locations, data collection time, and collection equipment. As a result, the model cannot adapt well to new out-of-distribution datasets and needs to be re-annotated and trained for each dataset. However, large-scale annotation of new data is a labor-intensive task, making model retraining difficult. Therefore, studying how to transfer the information learned from the annotated dataset to the unannotated dataset for cross-domain recognition tasks and further improve the generalization performance of the model is the main challenge currently faced. For the cross-domain recognition problem of images, the initial study used a fine-tuning method to adjust and optimize the model parameters based on the pre-trained model to enhance the robustness of the model to alleviate the domain shift problem between datasets. However, due to the large distribution differences between wildlife image datasets, the fine-tuning method has improved but still performs poorly. Therefore, domain adaptation algorithms have been proposed to compensate for the performance degradation caused by domain shift. In order to solve the above problems, the present invention proposes a cross-domain recognition method for wildlife images based on deep transfer learning. Summary of the invention

[0004] The purpose of the present invention is to provide a cross-domain wildlife image recognition method based on deep transfer learning to overcome the problem of negative transfer in wildlife recognition in complex scenes in the prior art.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] The cross-domain recognition method of wildlife images based on deep transfer learning specifically includes the following contents:

[0007] S1. Build a cross-domain wildlife image dataset based on the existing transfer learning dataset to form a domain adaptation dataset;

[0008] S2, using domain adversarial methods to extract wildlife domain-invariant features to reduce domain shift;

[0009] S3, introduce the maximum mean difference constraint in the domain adversarial neural network and construct a fusion perception adversarial network;

[0010] S4. Introduce Transformer after the backbone network to construct a constrained loss function and design a cross-domain local and global representative learning method;

[0011] S5. Based on the operations described in S1-S4, a cross-domain recognition model for wildlife images is constructed to complete the recognition work.

[0012] Furthermore, in S1, the transfer learning dataset is the North American wildlife dataset ENA24 and NACTI, and the main steps include: using two public North American wildlife datasets ENA24 and NACTI to construct a distribution containing disjoint domains, denoted as S1 and S2. The dataset includes 11 animal categories and a total of 25,591 images.

[0013] Furthermore, the domain adversarial method used in S2 is used to extract domain-invariant features of wild animals, specifically including the following contents: adjusting the classifier prediction by the domain discriminator D, further using entropy regularization to improve the performance of the classifier, and matching the features of the target domain on unlabeled target samples to facilitate low-density separation of features between classes, and then entropy regularizing the domain discriminator D to control the uncertainty of the classifier prediction output c and ensure the portability of the model.

[0014] Furthermore, S3 specifically includes the following contents: Based on the unsupervised domain adaptation method of adversarial learning, the distribution alignment loss measured on the fully connected layer can guide the transfer learning in the convolutional layer to extract more transferable sample feature representations and reduce the influence of irrelevant background information. The maximum mean difference (MMD) is used in the distribution alignment module, and its formula is expressed as follows:

[0015]

[0016] Where φ(·) represents a mapping from feature space to Hilbert space; D s and D t represent the source domain and the target domain respectively; P s and P t Represent the marginal distribution of source domain and target domain samples respectively; x represents the input sample; For the distribution P sexpectations, For the distribution P t expectations.

[0017] Furthermore, S4 specifically includes the following contents: designing a Transformer-based loss function after the backbone network, constructing the relationship between local and global representations through the Transformer unit, establishing the objective function through the feature extractor and the label identifier, and setting the corresponding hyperparameters to optimize the objective function. The Transformer-based loss function is expressed as follows:

[0018]

[0019] Where C represents the category size in the wildlife dataset, y i is the ground truth label reclassified to the i-th class.

[0020] Compared with the prior art, the present invention provides a Raw domain image and video de-moiré method based on channel modulation and spatial modulation, which has the following beneficial effects:

[0021] The present invention introduces a domain adversarial neural network model into a maximum mean difference constraint module, uses a transfer learning dataset of wildlife images as the migration basis of the domain adversarial neural network model, and introduces Transformer into the introduction module to construct a constraint loss function, thereby improving the accuracy of wildlife image recognition tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flowchart of the cross-domain identification method of wildlife images based on joint adversarial network and transfer attention learning mentioned in Example 1 of the present invention;

[0023] Figure 2 It is a schematic diagram of the North American wildlife dataset (ENA24, NACTI) mentioned in Example 1 of the present invention. DETAILED DESCRIPTION

[0024] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0025] The present invention realizes effective deep unsupervised domain adaptation through a cross-domain recognition method for wildlife images based on deep transfer learning. The network extracts domain-invariant features and minimizes domain classifier loss by integrating deep feature extraction, conditional adversarial learning and distribution alignment learning in an end-to-end framework. The cross-domain recognition method for wildlife images based on deep transfer learning proposed by the present invention is described below in conjunction with specific examples. The specific contents are as follows.

[0026] Embodiment 1:

[0027] See also Figure 1 As shown, the present invention proposes a cross-domain recognition method for wildlife images based on a joint adversarial network and transfer attention learning, which specifically includes the following contents:

[0028] S1. Build a cross-domain wildlife image dataset based on the existing transfer learning dataset to form a domain adaptation dataset;

[0029] The transfer learning dataset is a transfer learning dataset of wild animals. The transfer learning dataset is a North American wildlife dataset (ENA24 and NACTI). This paper uses the North American wildlife dataset to construct a distribution containing disjoint domains, namely S1 and S2. The dataset includes 11 animal categories and a total of 25,591 images.

[0030] S2. Use domain adversarial methods to extract domain-invariant features of wild animals to reduce domain shift; specifically, the following contents are included:

[0031] The domain discriminator D is adjusted for the classifier prediction. In this invention, f represents the feature extracted by the feature extractor, and c represents the classifier prediction result. The training function of the domain discriminator is expressed as:

[0032]

[0033] However, the feature f and the classifier c do not interact in this cascade. Therefore, the model cannot fully capture the multiplicative interaction information from the features and the classification. This paper further uses entropy regularization to improve the performance of the classifier by matching the features of the target domain on the unlabeled target samples, which is conducive to the low-density separation of features between classes:

[0034]

[0035] Where H is the entropy loss, Represents the model given an unlabeled sample The probability distribution of all class predictions. In information theory, the entropy function is a measure of uncertainty. Therefore, entropy regularization is performed on the domain discriminator D to control the uncertainty of the classifier's predicted output c and ensure the portability of the model. The final loss function of the domain discriminator D is:

[0036]

[0037] S3. Introduce the maximum mean difference constraint in the domain adversarial neural network and construct a fusion perception adversarial network; specifically include the following contents:

[0038] The distribution alignment loss measured on the fully connected layer can guide the transfer learning in the convolutional layer to extract more transferable sample feature representations and mitigate the impact of irrelevant background information. The maximum mean discrepancy (MMD) is used in the distribution alignment module:

[0039]

[0040] Among them, φ(·) represents a mapping from feature space to Hilbert space;

[0041] S4. Introduce Transformer after the backbone network to construct a constrained loss function and design a cross-domain local and global representative learning method to enhance the transferability of features and establish the relationship between long-distance sequences. Specifically, it includes the following contents:

[0042] For the local features XL and global features XG generated by the feature extractor G, we use the Transformer unit to construct a constrained loss function to enhance the transferability of the features and help better understand the overall structure and relationship of the image. The global features XG and local features XL in each wildlife image can be identified and called marker embeddings. All these specific operations performed by the marker embedding features in the Transformer unit. Then, the feature Z generated based on the local features XL and the global features XG can be obtained. Finally, the loss function built based on the Transformer is defined as follows:

[0043]

[0044] Where C represents the category size in the wildlife dataset, y i is the ground truth label reclassified to the i-th class

[0045] S5. Based on the operations described in S1-S4, a cross-domain recognition model for wildlife images is constructed to complete the recognition work.

[0046] In summary, the present invention achieves effective deep unsupervised domain adaptation through a cross-domain wildlife image recognition method based on deep transfer learning. The network extracts domain-invariant features and minimizes domain classifier loss by integrating deep feature extraction, conditional adversarial learning, and distribution alignment learning in an end-to-end framework. The overall goals of the model of the present invention are:

[0047]

[0048] Among them, α and β are the balance parameters between adversarial learning and distribution alignment learning, which need to be fine-tuned during the training process. c is the classification loss. Like most domain adaptation methods, L T The constraint loss function constructed for Transformer. This paper introduces cross entropy classification loss:

[0049]

[0050] Where K is the number of categories, y i is the true distribution of source domain labels, p i is the distribution of source domain labels after the classifier.

[0051] Specifically, in this embodiment, a joint optimization method is adopted to optimize the parameters of the feature extractor and the label identifier to achieve the wildlife image recognition task and enhance the network's ability to recognize wildlife images.

[0052] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A cross-domain recognition method for wildlife images based on deep transfer learning, characterized in that: It includes the following: S1. Build a cross-domain wildlife image dataset based on the existing transfer learning dataset to form a domain adaptation dataset; S2, using domain adversarial methods to extract wildlife domain-invariant features to reduce domain shift; S3, introduce the maximum mean difference constraint in the domain adversarial neural network and construct a fusion perception adversarial network; S4. Introduce Transformer after the backbone network to construct a constrained loss function and design a cross-domain local and global representative learning method; specifically include the following contents: A Transformer-based loss function is designed after the backbone network. The relationship between local and global representations is constructed through the Transformer unit, and the objective function is established through the feature extractor and label identifier. The corresponding hyperparameters are set to optimize the objective function. The Transformer-based loss function is expressed as follows: in, C represents the class size in the wildlife dataset, y i Represents the ground truth labels reclassified to i kind; S5. Based on the operations described in S1-S4, a cross-domain recognition model for wildlife images is constructed to complete the recognition work; the overall goal of the constructed model is: in, α、β represents the balance parameter between adversarial learning and distribution alignment learning, which is fine-tuned during training; D represents the domain discriminator, f Represents the features extracted by the feature extractor, c Represents the prediction result of the classifier; MMD represents the maximum mean difference constraint; L c is the classification loss, L T Constrained loss function built for Transformer.

2. The method for cross-domain identification of wildlife images based on deep transfer learning according to claim 1 is characterized in that: The S1 specifically includes the following contents: constructing a distribution containing non-overlapping domains using two public wildlife datasets, denoted as S1 and S2.

3. The method for cross-domain identification of wildlife images based on deep transfer learning according to claim 1 is characterized in that: The domain adversarial method used in S2 is to extract the invariant features of wildlife domains, which specifically includes the following: performing domain discriminator on the classifier prediction D The entropy regularization method is used to improve the performance of the classifier. The low-density separation of features between classes is achieved by matching the features of the target domain on the unlabeled target samples, and then the domain discriminator is D Perform entropy regularization to control the classifier prediction output c uncertainty to ensure the portability of the model.

4. The method for cross-domain identification of wildlife images based on deep transfer learning according to claim 1 is characterized in that: S3 specifically includes the following contents: Based on the unsupervised domain adaptation method of adversarial learning, the distribution alignment loss measured on the fully connected layer can guide the transfer learning in the convolutional layer to extract more transferable sample feature representations and reduce the influence of irrelevant background information. The maximum mean difference is used in the distribution alignment module, and its formula is expressed as: in, Represents a mapping from feature space to Hilbert space; D s and D t denote the source domain and the target domain respectively; P s and P t Represent the marginal distribution of source domain and target domain samples respectively; and Represent the input source domain samples and target domain samples respectively; E x~Ps For distribution P s expectations, E x~Pt For distribution P t expectations.