Wild animal monitoring image cross-domain identification method based on improved open set domain adaptation
Through the improved open-set domain adaptation method, the problem of insufficient monitoring of unknown categories and feature discernibility in wildlife image recognition is solved, and the high accuracy and robustness of wildlife images are achieved across domains Identification has important application value.
Patent Information
- Application Number
- CN202411256150.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing domain adaptation models cannot correctly monitor unknown categories in wildlife image recognition, and open-set domain adaptation methods ignore the discernibility of features, resulting in insufficient recognition accuracy and robustness.
Using an improved open-set domain adaptation method, train weak classifiers to establish pseudo-decision boundaries through adversarial learning and center loss, enhance feature discernibility, and improve the model for unknowns through adversarial learning strategies. Category recognition ability.
It significantly improves the accuracy and robustness of cross-domain identification of wildlife images, can effectively monitor wild animals in different environments, has important application value and good generalization performance.
Smart Images

Figure CN119107505A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a cross-domain recognition method for wildlife monitoring images based on improved open set domain adaptation. Background Art
[0002] In the datasets studied by the existing domain adaptation models, the data labels of the source domain and the target domain are consistent. Therefore, when there are wildlife images of unknown categories in the target domain, the existing models will classify and identify the unknown class samples in the target domain as known classes and align them with the source domain samples. This causes the model to be unable to correctly monitor all animals, affecting the reliability of the model. In addition, the existing open set domain adaptation recognition methods often focus on the classification of unknown categories, ignoring the importance of the discriminability of generated features. Therefore, an open set domain adaptation method is proposed that can enhance the discriminability of features, help the model correctly classify known categories, and improve the model's ability to recognize unknown classes. This is of great significance for realizing open set cross-domain recognition of wildlife images. In view of this, the present invention proposes a cross-domain recognition method for wildlife monitoring images based on improved open set domain adaptation. Summary of the invention
[0003] The purpose of the present invention is to propose a cross-domain recognition method for wildlife monitoring images based on improved open set domain adaptation to solve the problem that wildlife monitoring is in an open environment, the categories of the source domain and the target domain are not completely consistent, and there are wildlife images of unknown categories in the target domain.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] The cross-domain recognition method of wildlife monitoring images based on improved open set domain adaptation includes the following steps:
[0006] S1. Construct a wildlife image recognition model, the model including a classifier and a feature generator; introduce an open set domain adaptation method based on adversarial learning, train a weak classifier to identify unknown class samples in the target domain, and establish a pseudo decision boundary for the unknown class;
[0007] S2. Adopt adversarial learning strategy to align the feature distribution of known categories in source domain and target domain to achieve classification of known categories:
[0008] S3. Introduce the center loss to establish connections between the intra-class changes of known categories in the source domain, improve the discriminative ability of the decision boundary, help the model correctly classify known categories, and improve the model's recognition ability for unknown categories.
[0009] Preferably, the output of the classifier trained in S1 is:
[0010] p(y=K+1|x t ) = t
[0011] Among them, t represents the unknown class probability threshold, 0<t<1; p represents the input x t K+1 dimensional probability output; K represents the number of known categories; x t represents the unlabeled target image.
[0012] The feature generator increases the probability value of the unknown class to increase the error, thereby maximizing the error of the classifier and thereby achieving the purpose of deceiving the classifier.
[0013] Preferably, the model uses a standard cross entropy loss, and the specific function is expressed as:
[0014] L s (x s ,y s )=-log(p(y=y s |x s ))
[0015]
[0016] Among them, L s represents the cross entropy loss; x s represents a sample in the source domain; y s Represents sample x s The true label; p represents the input x s The probability output of .
[0017] Binary cross entropy loss is further used to train the classifier to establish boundaries for unknown samples. The specific function is expressed as:
[0018] L adv (x t )=-tlog(p(y=K+1|x t ))-(1-t)log(1-p(y=K+1|x t ))
[0019] Among them, L adv represents the adversarial loss function; x t represents the unlabeled target image; t represents the unknown class probability threshold; p represents the input x t K+1 dimensional probability output.
[0020] Use the model to train the classifier so that the output p(y=K+1|x t ) approaches t, and at the same time, the feature generator is trained to maximize L adv (x t ).
[0021] Preferably, S2 specifically includes the following contents:
[0022] An adversarial learning strategy is adopted to align the feature distribution of known categories in the source domain and the target domain to achieve classification of known categories. The adversarial learning strategy constructs an adversarial learning framework so that the model gradually reduces the difference between the source domain and the target domain during the learning process, thereby achieving cross-domain classification tasks.
[0023] Preferably, the introduction of center loss in S3 specifically includes the following contents: the wildlife image recognition model considers the entire training stage, updates the features of each class with each iteration, and for the center loss, updates are performed based on small batches without updating the center of the entire training set; in each training iteration, the center is calculated by taking the average of the features of the corresponding category.
[0024] Compared with the prior art, the present invention provides a cross-domain recognition method for wildlife monitoring images based on improved open set domain adaptation, which has the following beneficial effects:
[0025] The present invention proposes a cross-domain recognition method for wildlife monitoring images based on improved open set domain adaptation, realizes cross-domain recognition of wildlife images, effectively solves the distribution difference problem of wildlife images in different domains (such as different shooting environments, seasons, weather, etc.), and significantly improves the accuracy and robustness of cross-domain recognition. The present invention can efficiently use wildlife images to achieve wildlife monitoring tasks, and has important application value in wildlife protection; at the same time, the model constructed based on the method proposed by the present invention has good generalization performance, which provides a useful reference for wildlife identification and monitoring research in different regions. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a flow chart of the cross-domain recognition method for wildlife monitoring images based on improved open set domain adaptation mentioned in Example 1 of the present invention;
[0027] Figure 2 This is a structural diagram of the open set domain adaptation recognition model of the joint center loss and adversarial learning mentioned in Example 1 of the present invention; DETAILED DESCRIPTION
[0028] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0029] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0030] Embodiment 1:
[0031] See also Figure 1 The present invention proposes a cross-domain recognition method for wildlife monitoring images based on improved open set domain adaptation, comprising the following steps:
[0032] S1. Build a wildlife image recognition model, which includes a classifier and a feature generator; introduce an open set domain adaptation method based on adversarial learning, train a weak classifier to identify unknown class samples in the target domain, and establish a pseudo decision boundary for the unknown class;
[0033] The output of the above classifier is:
[0034] p(y=K+1|x t ) = t
[0035] Among them, t represents the unknown class probability threshold, 0<t<1; p represents the input x t K+1 dimensional probability output; K represents the number of known categories; x t represents the unlabeled target image.
[0036] The feature generator increases the probability value of the unknown class to increase the error and maximize the error of the classifier, thereby achieving the purpose of deceiving the classifier, which means that the sample is rejected as unknown;
[0037] The model uses the standard cross entropy loss, and the specific function is expressed as:
[0038] L s (x s ,y s )=-log(p(y=y s |x s ))
[0039]
[0040] Among them, L s represents the cross entropy loss; x s represents a sample in the source domain; y s Represents sample x s The true label; p represents the input x s The probability output of .
[0041] Binary cross entropy loss is further used to train the classifier to establish boundaries for unknown samples. The specific function is expressed as:
[0042] L adv (x t )=-tlog(p(y=K+1|x t ))-(1-t)log(1-p(y=K+1|x t ))
[0043] Among them, Ladv represents the adversarial loss function; x t represents the unlabeled target image; t represents the unknown class probability threshold; p represents the input x t K+1 dimensional probability output.
[0044] Use the model to train the classifier so that the output p(y=K+1|x t ) approaches t, and at the same time, the feature generator is trained to maximize L adv (x t );
[0045] S2. Adopt adversarial learning strategy to align the feature distribution of known categories in source domain and target domain to achieve classification of known categories, which includes the following contents:
[0046] Adopting an adversarial learning strategy, aligning the feature distribution of known categories in the source domain and the target domain, and realizing the classification of known categories. This strategy builds an adversarial learning framework so that the model can gradually reduce the differences between the source domain and the target domain during the learning process, thereby realizing cross-domain classification tasks. Specifically, it uses a feature extractor to extract features from two domains, and uses a discriminator to distinguish which domain these features come from. By continuously optimizing the feature extractor and the discriminator, the features extracted by the feature extractor can gradually become indistinguishable by the discriminator, thereby achieving the purpose of domain alignment and improving the classification performance on the target domain.
[0047] S3. Introduce the center loss to establish a connection between the intra-class changes of known categories in the source domain, improve the discrimination ability of the decision boundary, help the model correctly classify known categories, and improve the model's recognition ability for unknown categories. Specifically, it includes the following contents:
[0048] Under normal circumstances, the feature center of a category should be updated as the features change. Specifically, the model needs to consider the entire training phase and update the features of each class with each iteration. Therefore, the center loss cannot be used.
[0049] To address the above issues, the center loss is updated based on a small batch instead of updating the center of the entire training set. In each training iteration, the center is calculated by averaging the features of the corresponding category.
[0050] Based on the above content, an open set domain adaptation recognition model based on joint center loss and adversarial learning is constructed. The model structure diagram is as follows Figure 2 As shown, combined Figure 2 It can be seen that the long-tail data image enhancement step includes the following steps:
[0051] Step 1: introduce an open set domain adaptation method based on adversarial learning, train a weak classifier to identify unknown class samples in the target domain, and establish a pseudo decision boundary for the unknown class;
[0052] Step 2: Align the feature distributions of known categories in the source domain and the target domain through adversarial learning to achieve classification of known categories.
[0053] Step 3: Introduce the center loss to establish connections between the intra-class changes of known categories in the source domain, improve the discriminative ability of the decision boundary, help the model correctly classify known categories, and improve the model's recognition ability for unknown categories.
[0054] Embodiment 2:
[0055] The method is based on Example 1 but differs in that the metrics usually used to evaluate open set domain adaptation are the average precision OS* on known classes, the precision UNK on unknown classes, the classification precision OS and HOS of all classes, and the specific results are shown in the following table.
[0056]
[0057] The present invention proposes a cross-domain recognition method for wildlife monitoring images based on improved open set domain adaptation, which achieves the best results on the HOS parameter, which means that the method of the present invention can better balance the classification performance of known and unknown categories. In the S1→S2 task, the method of the present invention achieves the best OS and OS* in the comparison of open set domain adaptation methods, which are 40.1% and 36.3% classification accuracy. The classification accuracy of unknown categories is second only to ROS, and the classification accuracy is 70.2%. Compared with ROS, which sacrifices the classification performance of known categories to improve the classification performance of unknown categories, the method of the present invention achieves a better balance; in the S2→S1 task, the method of the present invention achieves the highest scores on the three indicators of OS, OS* and HOS, which are 47.7%, 45.1% and 54.5% respectively. The classification accuracy of unknown categories is second only to the ROS method, and the classification accuracy is 68.7%. In summary, the method of the present invention can better balance the classification performance of known and unknown categories, and can better align the known class features of the source domain and the target domain.
[0058] The above are only preferred specific implementation modes 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 solutions and inventive concepts 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 monitoring images based on improved open set domain adaptation, characterized in that: The following steps are involved: S1. Constructing a wildlife image recognition model, wherein the model includes a classifier and a feature generator; An open set domain adaptation method based on adversarial learning is introduced to train a weak classifier to identify unknown class samples in the target domain and establish a pseudo decision boundary for the unknown class. S2. Adopt adversarial learning strategy to align the feature distribution of known categories in source domain and target domain to achieve classification of known categories: S3. Introduce the center loss to establish connections between the intra-class changes of known categories in the source domain, improve the discriminative ability of the decision boundary, help the model correctly classify known categories, and improve the model's recognition ability for unknown categories.
2. The cross-domain identification method for wildlife monitoring images based on improved open set domain adaptation according to claim 1 is characterized in that: The output of the classifier trained in S1 is: p(y=K+1|x t )=t Among them, t represents the unknown class probability threshold, 0<t<1; p represents the input x t K+1 dimensional probability output; K represents the number of known categories; x t represents an unlabeled target image; The feature generator increases the probability value of the unknown class to increase the error, thereby maximizing the error of the classifier and thereby achieving the purpose of deceiving the classifier.
3. The cross-domain identification method for wildlife monitoring images based on improved open set domain adaptation according to claim 2 is characterized in that: The model uses the standard cross entropy loss, and the specific function is expressed as: L s (x s ,and s )=-log(p(y=y s |x s )) Among them, L s represents the cross entropy loss; x s represents a sample in the source domain; y s Represents sample x s The true label; p represents the input x s The probability output of Binary cross entropy loss is further used to train the classifier to establish boundaries for unknown samples. The specific function is expressed as: L adv (x t )=-tlog(p(y=K+1|x t ))-(1-t)log(1-p(y=K+1|x t )) Among them, L adv represents the adversarial loss function; x t represents the unlabeled target image; t represents the unknown class probability threshold; p represents the input x t K+1 dimensional probability output; Use the model to train the classifier so that the output p(y=K+1|x t ) approaches t, and at the same time, the feature generator is trained to maximize L adv (x t ).
4. The cross-domain identification method for wildlife monitoring images based on improved open set domain adaptation according to claim 1 is characterized in that: The S2 specifically includes the following contents: An adversarial learning strategy is adopted to align the feature distribution of known categories in the source domain and the target domain to achieve classification of known categories. The adversarial learning strategy constructs an adversarial learning framework so that the model gradually reduces the difference between the source domain and the target domain during the learning process, thereby achieving cross-domain classification tasks.
5. The cross-domain identification method for wildlife monitoring images based on improved open set domain adaptation according to claim 1 is characterized in that: The introduction of the center loss described in S3 specifically includes the following contents: the wildlife image recognition model considers the entire training stage, updates the features of each class with each iteration, and for the center loss, updates are performed based on small batches, without updating the center of the entire training set; in each training iteration, the center is calculated by taking the average of the features of the corresponding category.
Citation Information
Patent Citations
Unsupervised field adaptation method and system based on adversarial learning and medium
CN110135579A
Discriminating unsupervised cross-domain pedestrian re-identification method based on class center domain alignment
CN113553906A
Wild animal image cross-domain identification method based on deep transfer learning
CN117315487A
System for fast and accurate visual domain adaptation
US10839269B1
