Semi-supervised domain adaptive image classification method based on distribution perception feature alignment
By introducing distribution-aware feature alignment methods in semi-supervised domain adaptation, including distribution calibration and feature hierarchy alignment, the problem of limited model generalization ability caused by distribution differences in cross-domain scenarios is solved, and the pseudo-label quality and feature consistency are significantly improved, thereby improving the classification performance of the model.
Patent Information
- Application Number
- CN202510024904.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-05-13
AI Technical Summary
In cross-domain scenarios, the distribution differences between the source domain and the target domain lead to limited model generalization capabilities, and existing semi-supervised domain adaptation techniques have problems with high error rates and limited effects in pseudo-label generation and feature alignment.
A distribution-aware feature alignment method is adopted to reduce bias in the pseudo-label generation process through distribution calibration strategies, and combine feature hierarchical alignment and hybrid alignment techniques to improve feature consistency between the source domain and the target domain.
The quality and feature alignment of pseudo-labels are significantly improved, and the generalization and classification performance of the model on the target domain is enhanced.
Smart Images

Figure CN119992166A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and cross-domain image recognition, and in particular to a semi-supervised domain adaptation image classification method based on distribution-aware feature alignment. Background Art
[0002] With the rapid development of deep learning technology, the performance of image classification tasks has achieved remarkable progress in many fields. However, in cross-domain scenarios, there are usually significant distribution differences between the source domain and the target domain. This distribution shift poses a great challenge to the generalization ability of the model. Semi-Supervised Domain Adaptation (SSDA), as an important branch of domain adaptation research, aims to improve the performance of the model in the target domain by using the labeled data of the source domain, a small amount of labeled data of the target domain, and a large amount of unlabeled target domain data. The core problem of SSDA is how to effectively align the feature distributions of the source domain and the target domain, while using the unlabeled data of the target domain to mine more potential information. Existing SSDA techniques mainly rely on pseudo-label generation and feature alignment techniques. Among them, pseudo-label-based methods usually generate pseudo-labels from unlabeled data in the target domain to supervise training, but the quality of pseudo-labels is often limited by the distribution shift problem. To this end, some studies have alleviated this problem by calibrating the pseudo-label distribution or enhancing the robustness of pseudo-label generation. However, such methods may introduce a high error rate in the pseudo-label generation process, which in turn affects the learning effect of the model. On the other hand, feature alignment techniques usually achieve inter-domain consistency by explicitly aligning the features of the source and target domains, such as through adversarial learning or minimizing the distribution distance. These methods have made some progress in reducing distribution differences, but in complex scenarios, the effect of feature alignment is often limited due to the large differences between domains.
[0003] In view of the above problems, the present invention proposes a semi-supervised domain adaptation image classification method based on distribution-aware feature alignment. This method significantly improves the quality of pseudo labels and enhances the feature consistency between the source domain and the target domain by introducing a distribution calibration strategy and a multi-level feature alignment module. Specifically, the distribution calibration strategy reduces the deviation in the pseudo label generation process by normalizing the relationship between the current probability distribution and the overall probability distribution, thereby improving the reliability of the pseudo labels. At the same time, the feature level alignment module combines label consistency selection and paired feature alignment technology to achieve inter-domain alignment from a fine-grained feature level. In addition, the distribution fusion capability of the source domain and the target domain is further enhanced through a hybrid alignment mechanism, thereby improving the generalization performance of the model in the target domain. Compared with existing methods, this method has the following advantages: 1) Through the distribution calibration strategy, the error rate in the pseudo label generation process is significantly reduced; 2) Combined with feature level alignment and hybrid alignment technology, the feature consistency and classification performance in cross-domain scenarios are effectively improved. Summary of the invention
[0004] Based on the above practical needs and key issues, the purpose of the present invention is to propose a semi-supervised domain adaptation image classification method based on distribution-aware feature alignment, which improves the quality of pseudo labels and achieves cross-domain feature consistency through distribution calibration and feature alignment strategies, thereby improving the classification performance of the target domain.
[0005] The present invention comprises the following 4 steps:
[0006] 1) For the image data in the source domain and the target domain, strong data enhancement and weak data enhancement are performed respectively to generate multi-view input features;
[0007] 2) Extract input features through a shared convolutional neural network, and combine with a pseudo-label supervision strategy based on distribution calibration to normalize the current probability distribution with the overall probability distribution to reduce pseudo-label bias and improve pseudo-label quality; 3) In the feature alignment stage, use feature level alignment to perform label consistency selection and feature alignment to ensure feature distribution consistency between the source domain and the target domain. At the same time, through mixed feature alignment, the source domain and target domain data are mixed to further reduce the distribution difference between domains;
[0008] 4) By constructing a joint optimization objective, the pseudo-label supervision loss, feature alignment loss and hybrid alignment loss are integrated to achieve accurate alignment of the feature distribution of the source domain and the target domain and comprehensively improve the classification performance. After the model training is completed, the cross-domain adaptability and classification effect of the model are verified through evaluation on the target domain test set.
[0009] Furthermore, for the input source domain and target domain images, in step S100, the source domain image and labeled target domain images Perform weak data enhancement DA1 to obtain and For unlabeled target domain images Weak data enhancement DA1 and strong data enhancement DA2 are performed respectively to obtain and And for the mixed source domain and unlabeled target domain image X mix =λ·X s +(1-λ)·X u Perform weak data enhancement DA1 to obtain Where M, W, and H represent the channel, weight, and height of the image, respectively.
[0010] Furthermore, for the distribution calibration strategy in step S200, a general neural network model is used. The image features after encoding enhancement are obtained Among them, Θ1 represents the parameters of model training. On this basis, we further use the classifier And Softmax function to obtain the probability distribution corresponding to the image features and Where Θ2 represents the parameters of the classifier. In order to address the problem of easily generating erroneous pseudo labels in early iterations, the present invention effectively reduces the number of erroneous pseudo labels through a distribution calibration strategy. The mathematical formula for distribution calibration is as follows:
[0011]
[0012] Among them, E represents the total number of small batches of data in a training cycle, N u represents the number of categories, Represents the overall probability distribution. Through this normalized probability distribution, the model can generate more reliable pseudo labels during training, which not only effectively reduces the number of incorrect pseudo labels, but also significantly increases the proportion of correct pseudo labels. Therefore, the pseudo label supervision loss can be constructed as:
[0013]
[0014] Among them, Index(·) represents the exponential function, and max(·) represents the probability , τ represents the conditional judgment threshold, which is used to control the confidence threshold of the target domain samples.
[0015] Furthermore, in the feature alignment stage in step S300, feature level alignment is used to perform label consistency selection and feature alignment to ensure the consistency of feature distribution between the source domain and the target domain. Label consistency selection is achieved by the following formula:
[0016]
[0017] Where S and S represent the number and feature set of the source domain and the unlabeled target domain in the mini-batch dataset under the label consistency condition. And constrain their distance, shorten the distance between different domain distributions, and thus reduce domain shift. Based on the above principle, the following pairwise feature loss can be constructed:
[0018]
[0019] Among them, cos(·,·) represents cosine similarity, which is used to measure the angle between feature spaces. Other distance functions (such as Euclidean distance) can also be used as metric calculations. featThe constraint of can further alleviate the domain shift problem, thereby promoting feature alignment between domains. At the same time, the present invention designs a hybrid representation strategy, which aims to align the distribution of the source domain and the target domain by linearly interpolating the predicted probability distribution of the source domain image and the unlabeled target domain image, so as to achieve domain adaptation and guide the model to learn a representation that is invariant to domain shift. The mathematical formula is as follows:
[0020]
[0021] Among them, λ represents the mixing parameter, which is used to control the degree of mixing between the source domain image and the target domain image.
[0022] Further, in step S400, by integrating the source domain and the labeled target domain L ce , pseudo-label supervision loss Feature alignment loss L feat and the hybrid alignment loss L mix , construct a joint optimization goal to achieve accurate alignment of cross-domain features and improve classification performance. After the model training is completed, the prediction results of the target domain test set and the true labels are used to evaluate performance indicators such as accuracy to verify the model's cross-domain adaptability and classification effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flow chart of Embodiment 1 of the semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention;
[0024] Figure 2 It is a flow chart of Embodiment 2 of the semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention;
[0025] Figure 3 It is a flowchart of Example 3 of the semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention.
[0026] Figure 4 It is a flowchart of Embodiment 4 of the semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention.
[0027] Figure 5 This is the process of the fifth embodiment of the semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention. DETAILED DESCRIPTION
[0028] The present invention will be described in detail below in conjunction with the accompanying drawings.
[0029] See also Figure 1 Flow chart of Embodiment 1 of the semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention. The distribution-aware feature alignment method proposed in the present invention comprises the following steps:
[0030] Step S100, performing strong data enhancement and weak data enhancement on the image data of the source domain and the target domain respectively to generate multi-view input features;
[0031] Specifically, the present invention first applies different enhancement strategies to the original image data of the source domain and the target domain. Strong data enhancement uses random cropping, rotation, flipping, and color perturbation to generate more diverse image data, thereby increasing the robustness of the model; weak data enhancement uses lightweight enhancement strategies, such as slight flipping and scaling, to preserve the original structural information of the image as much as possible. This multi-view enhancement method can provide diverse input features while retaining important information of the original features, laying the foundation for subsequent feature extraction and distribution alignment.
[0032] Step S200, extracting input features through a shared convolutional neural network, and combining the pseudo-label supervision strategy based on distribution calibration to normalize the current probability distribution with the overall probability distribution, so as to reduce the pseudo-label bias and improve the pseudo-label quality;
[0033] Specifically, the present invention uses a shared convolutional neural network to extract features from multi-view image inputs of the source domain and the target domain, thereby ensuring that the data features of the two domains are expressed in the same feature space. On this basis, a distribution calibration strategy is used to correct the pseudo-labels generated by the unlabeled data in the target domain. This strategy reduces the problem of incorrect labels caused by pseudo-label bias by normalizing the current probability distribution and the overall probability distribution, thereby improving the quality of pseudo-labels. This step not only improves the reliability of pseudo-labels, but also provides higher quality supervisory signals for subsequent feature alignment.
[0034] Step S300: In the feature alignment stage, feature level alignment is used to perform label consistency selection and feature alignment to ensure feature distribution consistency between the source domain and the target domain. At the same time, through mixed feature alignment, the source domain and target domain data are mixed to further reduce the distribution difference between the domains;
[0035] Specifically, in the feature alignment stage, the present invention first selects features with the same semantic category in the source domain and the target domain through label consistency selection as the basis of the alignment process. Then, a feature level alignment strategy is adopted to adjust the distribution of the source domain and the target domain in the feature space so that the feature distribution of the two domains is more consistent. In order to further reduce the distribution difference between domains, the present invention introduces a hybrid feature alignment strategy to generate new hybrid features by linearly interpolating the data features of the source domain and the target domain at the feature level. The generation of such hybrid features can effectively alleviate the inconsistency in the distribution of the source domain and the target domain, and significantly improve the adaptation performance of cross-domain tasks.
[0036] Step S400, by constructing a joint optimization objective, integrating pseudo-label supervision loss, feature alignment loss and hybrid alignment loss, so as to achieve accurate alignment of feature distributions of source domain and target domain and comprehensively improve classification performance, and after the model training is completed, verify the cross-domain adaptability and classification effect of the model through evaluation of the target domain test set;
[0037] Specifically, the present invention integrates pseudo-label supervision loss, feature alignment loss and hybrid alignment loss into a unified objective function by jointly optimizing the objectives. In the pseudo-label supervision loss, the pseudo-label after distribution calibration is used to provide an effective supervision signal for the unlabeled data in the target domain; in the feature alignment loss, the cross-domain feature alignment is achieved by optimizing the feature distribution difference between the source domain and the target domain; in the hybrid alignment loss, the inter-domain distribution deviation is further reduced by constraining the mixed features of the source domain and the target domain. By integrating the training of these three parts of the loss, the present invention can achieve accurate alignment of cross-domain features and significantly improve the classification performance of the model in the target domain. After the model training is completed, it is evaluated through the target domain test set, the predicted results are compared with the true labels, and the performance indicators are calculated to verify the cross-domain adaptability and classification effect of the model in the target domain.
[0038] See also Figure 2 This is a flow chart of the second embodiment of the semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention. The second embodiment of the present invention is a further elaboration of the above step S100 based on the technical solution of the first embodiment. The specific implementation method of step S100 includes:
[0039] Step S110, set and Respectively represent the source domain S and the labeled target domain T l and the unlabeled target domain T u A small batch dataset sampled from . Among them, N s / l / u Indicates the number of samples in different mini-batch datasets. In order to avoid overfitting of the model to the input data, a data augmentation strategy is adopted to enrich the diversity of the input data by changing the appearance of the image. The present invention uses strong data enhancement DA1 to generate an enhanced version Right now
[0040] Step S120: annotating the target domain labeled image data The present invention utilizes strong data enhancement DA1 to generate an enhanced version. Right now
[0041] Step S130: for the unlabeled image data in the target domain The present invention performs strong data enhancement DA1 and weak data enhancement DA2 respectively.
[0042] Step S140, by using the weakly enhanced version of the unlabeled target domain data Pseudo-label prediction to supervise the strong enhancement version Weak enhancement preserves the original structure of the data and generates reliable pseudo labels; strong enhancement introduces data variability to help the model learn invariant features. The combination of the two enables cross-view Figure 1 Consistency, balancing the robustness and stability of feature learning.
[0043] Step S150, by using the Mixup operation to mix the source domain and the unlabeled target domain data in a strong data enhancement manner to expand the data set, that is, Where λ is a parameter randomly sampled from Beta distribution. By initializing the input data of the source domain and the target domain, the present invention can design the algorithm more flexibly.
[0044] See also Figure 3 The flowchart of the third embodiment of the semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention. The third embodiment of the present invention is a further elaboration of the above step S200 based on the technical solution of the second embodiment. The pseudo-label supervision strategy method of distribution calibration used in the third embodiment of the present invention includes the following steps:
[0045] Step S210: Source domain samples The feature representation is defined as Among them, Θ1 represents the parameters of the feature extraction network. This formula represents the extraction of high-dimensional features of source domain data through convolutional neural network. The extracted features are used as classifier input to capture the important characteristics of the data. Labeling target domain samples The characteristic is expressed as This process is consistent with the source domain samples, ensuring that the feature representations are aligned in the shared feature space, laying the foundation for subsequent distribution alignment. The feature representation of the unlabeled target domain samples (including strong and weak enhancement versions) is in and They correspond to the strongly enhanced and weakly enhanced versions of the feature representations of the unlabeled target domain samples, respectively, and are used for pseudo-label supervision under different views. For Mixup data (mixed samples of the source domain and the unlabeled target domain), the feature representation is defined as By extracting features from mixed samples, the consistency of cross-domain feature distribution can be further enhanced and the inter-domain deviation can be reduced.
[0046] Step S220, the category probability distribution of source domain samples is Mapping high-dimensional features to category probability distributions indicates the confidence of each category, thereby providing a supervisory signal for the classification of the source domain. The category probability distribution of the labeled target domain samples is This step ensures that the sample category distribution of the labeled target domain can participate in the calculation of the cross entropy loss, providing a direct supervision signal. The category probability distribution of the strong and weak enhanced versions of the unlabeled target domain samples are:
[0047]
[0048] in As the basis for pseudo-label generation, is used for pseudo-label supervision. For mixed data, its category probability distribution is defined as The mixed data probability distribution is used to further reduce the inconsistency between category distributions and improve the model's generalization ability for mixed samples.
[0049] Step S230, calculate the global probability distribution average of all unlabeled target domain samples in all mini-batches:
[0050]
[0051] Where E represents the total number of mini-batches, N u represents the number of unlabeled samples in each mini-batch. This formula calculates the overall distribution of the unlabeled target domain and provides a reference standard for calibration. Next, the current probability distribution With global distribution Divide to get the calibrated probability distribution Eliminating local bias makes pseudo-label generation more accurate. In order to ensure that the probability distribution after calibration satisfies the probability sum of 1, further normalization is performed:
[0052]
[0053] Where C represents the number of categories. The normalization operation ensures that the calibrated probability distribution can be used as the input for pseudo label generation.
[0054] Step S240, the generation of pseudo labels is based on conditional screening of a high confidence threshold τ:
[0055]
[0056] Where Index(·) is an indicator function, and a pseudo label is generated when the maximum value of the class probability exceeds the threshold τ. In this way, pseudo labels with low confidence can be filtered out and error propagation can be reduced. Based on the generated pseudo labels, the pseudo label supervision loss is calculated as:
[0057]
[0058] The pseudo-label loss function supervises the strongly enhanced version of the unlabeled target domain samples by calibrating the pseudo-labels, which helps improve the model's adaptability to the target domain data. The combination of pseudo-label generation and distribution calibration significantly improves the quality of pseudo-labels, reduces the generation of erroneous pseudo-labels, and enhances the robustness and generalization performance of the model on the unlabeled target domain.
[0059] See also Figure 4 This is a flow chart of a fourth embodiment of a semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention. The fourth embodiment of the present invention is a further elaboration of the above step S300 based on the technical solution of the second embodiment. The feature alignment method provided by the fourth embodiment of the present invention includes the following steps:
[0060] Step S310: In order to achieve cross-domain feature alignment, the present invention uses source domain features and unlabeled target domain features In , the paired sample set S is constructed through the label consistency selection mechanism. The definition of label consistency selection is:
[0061]
[0062] in represents the true label of the source domain sample, Pseudo labels represent samples in the target domain. By matching the real labels and pseudo labels, high-confidence paired features are screened out to ensure the accuracy of the aligned samples. This step can effectively filter out target domain samples with low confidence or wrong pseudo labels, ensuring the quality of data used for feature alignment.
[0063] Step S320: Based on the label consistency selection, the source domain features and the target domain features are further aligned at the feature level. Cosine similarity is used as the alignment metric, and its feature alignment loss function is defined as:
[0064]
[0065] in By minimizing the cosine similarity loss, the angular distance between the source domain and the target domain features is shortened, thereby achieving cross-domain feature alignment. By aligning the geometric distribution in the feature space, the deviation of the feature distribution between domains is reduced, providing a basis for cross-domain learning of the model.
[0066] Step S330: To further reduce the distribution difference between the source domain and the target domain, the present invention introduces a hybrid alignment loss, the formula of which is:
[0067]
[0068] Where λ is a parameter sampled from the Beta distribution, which controls the mixing ratio of source domain and target domain features. and Represent the predicted probability distribution of source domain and target domain samples respectively. τ is the confidence threshold, which is used to filter high-confidence samples of target domain pseudo labels. By introducing the hybrid alignment loss, the present invention effectively enhances the consistency of feature distribution between source domain and target domain, and improves the robustness of the model to inter-domain distribution shift.
[0069] See also Figure 5 This is a flow chart of the fifth embodiment of the semi-supervised domain adaptation image classification method based on distribution-aware feature alignment of the present invention. The fifth embodiment of the present invention is a further elaboration of the above step S400 based on the technical solutions of the first to fourth embodiments. The joint optimization target provided by the fourth embodiment of the present invention includes the following steps:
[0070] Step S410, by integrating multiple loss terms, define the joint optimization objective function L total , the formula is as follows:
[0071]
[0072] Where L ce Represents the cross entropy loss between the source domain and the labeled target domain, which is used to provide basic supervision. It is a pseudo-label supervision loss based on distribution calibration, which is used to improve the supervision quality of unlabeled target domain samples. mix represents the hybrid alignment loss, which further enhances the consistency of feature distribution between the source domain and the target domain. feat Represents feature alignment loss, which is used to reduce the deviation of cross-domain feature distribution. α, β, and γ are hyperparameters used to balance the contribution of different loss terms. This step ensures the synergy of various loss terms by defining a joint loss function, providing a clear goal for the optimization of the model in the source domain and the target domain.
[0073] Step S420: After the model training is completed, the cross-domain classification performance of the model is verified by evaluating the accuracy of the target domain test set. The specific process is as follows: Select test samples that have not participated in the training from the target domain Contains multiple unlabeled samples Use the trained model to predict the test samples and get the predicted category of each sample in is the predicted probability that the sample belongs to category c. The precision is calculated by comparing the matching of the predicted result with the true label:
[0074]
[0075] Where N test represents the number of test set samples, Yi u is the true label. By evaluating the precision of the target domain test set, we can quantify the cross-domain adaptation performance of the model and verify the improvement of the target domain classification effect by the joint optimization objective.
[0076] The above descriptions are only some basic descriptions of the present invention. Any equivalent changes made according to the technical solution of the present invention shall fall within the protection scope of the present invention.
Claims
1. A semi-supervised domain adaptation image classification method based on distribution-aware feature alignment, characterized in that The following steps are involved: Step S100, performing strong data enhancement and weak data enhancement on the image data of the source domain and the target domain respectively to generate multi-view input features; Step S200, extracting input features through a shared convolutional neural network, and combining the pseudo-label supervision strategy based on distribution calibration to normalize the current probability distribution with the overall probability distribution, so as to reduce the pseudo-label bias and improve the pseudo-label quality; Step S300, in the feature alignment stage, feature level alignment is used to perform label consistency selection and feature alignment to ensure the consistency of feature distribution between the source domain and the target domain; at the same time, through hybrid feature alignment, the source domain and target domain data are mixed to further reduce the distribution difference between the domains; Step S400, by constructing a joint optimization objective, integrating pseudo-label supervision loss, feature alignment loss and hybrid alignment loss, so as to achieve accurate alignment of feature distributions of source domain and target domain and comprehensively improve classification performance. After the model training is completed, the cross-domain adaptability and classification effect of the model are verified through evaluation of the target domain test set.
2. The semi-supervised domain adaptation image classification method based on distribution-aware feature alignment according to claim 1, characterized in that: For the input source domain and target domain images, in step S100, the source domain image and labeled target domain images Perform weak data enhancement DA1 to obtain and For unlabeled target domain images Weak data enhancement DA1 and strong data enhancement DA2 are performed respectively to obtain and And for the mixed source domain and unlabeled target domain image X mix =λ·X s +(1-λ)·X u Perform weak data enhancement DA1 to obtain Where M, W, and H represent the channel, weight, and height of the image, respectively.
3. The semi-supervised domain adaptation image classification method based on distribution-aware feature alignment according to claim 2, characterized in that: For the distribution calibration strategy in step S200, a general neural network model is used. The image features after encoding enhancement are obtained Among them, Θ1 represents the parameters of model training. On this basis, we further use the classifier And Softmax function to obtain the probability distribution corresponding to the image features and Where Θ2 represents the parameters of the classifier. In order to address the problem of easily generating erroneous pseudo labels in early iterations, the present invention effectively reduces the number of erroneous pseudo labels through a distribution calibration strategy. The mathematical formula for distribution calibration is as follows: Among them, E represents the total number of small batches of data in a training cycle, N u represents the number of categories, Represents the overall probability distribution. Through this normalized probability distribution, the model can generate more reliable pseudo labels during training, which not only effectively reduces the number of incorrect pseudo labels, but also significantly increases the proportion of correct pseudo labels. Therefore, the pseudo label supervision loss can be constructed as: Among them, Index(·) represents the exponential function, and max(·) represents the probability , τ represents the conditional judgment threshold, which is used to control the confidence threshold of the target domain samples.
4. The semi-supervised domain adaptation image classification method based on distribution-aware feature alignment according to claim 3, characterized in that: In the feature alignment stage in step S300, feature level alignment is used to perform label consistency selection and feature alignment to ensure the consistency of feature distribution between the source domain and the target domain. Label consistency selection is achieved by the following formula: Where S and S represent the number and feature set of the source domain and the unlabeled target domain in the mini-batch dataset under the label consistency condition. And constrain their distance, shorten the distance between different domain distributions, and thus reduce domain shift. Based on the above principle, the following pairwise feature loss can be constructed: Among them, cos(·,·) represents cosine similarity, which is used to measure the angle between feature spaces. Other distance functions (such as Euclidean distance) can also be used as metric calculations. feat The constraint of can further alleviate the domain shift problem, thereby promoting feature alignment between domains. At the same time, the present invention designs a hybrid representation strategy, which aims to align the distribution of the source domain and the target domain by linearly interpolating the predicted probability distribution of the source domain image and the unlabeled target domain image, so as to achieve domain adaptation and guide the model to learn a representation that is invariant to domain shift. The mathematical formula is as follows: Among them, λ represents the mixing parameter, which is used to control the degree of mixing between the source domain image and the target domain image.
5. The semi-supervised domain adaptation image classification method based on distribution-aware feature alignment according to claim 4, characterized in that: In step S400, by integrating the source domain and the labeled target domain L ce , pseudo-label supervision loss Feature alignment loss L feat and the hybrid alignment loss L mix , construct a joint optimization goal to achieve accurate alignment of cross-domain features and improve classification performance. After the model training is completed, the prediction results of the target domain test set and the true labels are used to evaluate performance indicators such as accuracy to verify the model's cross-domain adaptability and classification effect.