Model training method and device for image classification
By constructing multi-source training data and a bidirectional reversible mapping module, the problem of poor performance caused by a small number of labeled samples in hyperspectral image classification is solved, and efficient image classification results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA JILIANG UNIV
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-26
AI Technical Summary
Existing models perform poorly in classifying hyperspectral images with only a small number of labeled samples.
By constructing multi-source training data including labeled and unlabeled samples in the source and target domains, and combining convolutional neural networks and bidirectional invertible mapping modules, feature deentanglement is performed using mask vectors to separate domain-invariant features and domain-specific features, and a total loss function is constructed to optimize model parameters.
By effectively utilizing limited labeled data and abundant unlabeled data, interference from land cover category-irrelevant information can be reduced, negative migration can be minimized, the original topological structure and discrimination boundaries of the data can be preserved, and the classification effect of hyperspectral images can be improved.
Smart Images

Figure CN122289901A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a model training method and apparatus for image classification. Background Technology
[0002] The main task of hyperspectral image classification is to identify each pixel in an image and determine its corresponding land cover category. Because hyperspectral images are often affected by weather conditions such as lighting and occlusion during capture, the collected data is often highly redundant. At the same time, the high dimensionality of the data increases the processing difficulty. Deep learning can effectively extract important information from high-dimensional data and has become one of the mainstream methods for processing hyperspectral data in recent years. With sufficient training samples, using deep learning models such as Convolutional Neural Networks (CNNs) and Transformers can effectively improve classification accuracy. However, hyperspectral image annotation is a time-consuming and labor-intensive task, resulting in only a small amount of labeled data available for model training in practical applications. This leads to poor image classification performance of the trained models. Summary of the Invention
[0003] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a model training method and apparatus for image classification, which solves the technical problem that the existing models have poor performance in classifying hyperspectral images when there are only a few labeled samples.
[0004] To achieve the above objectives, the main technical solutions adopted by the present invention include:
[0005] The first aspect of this invention provides a model training method for image classification.
[0006] The model training method for image classification proposed in this embodiment of the invention includes:
[0007] Acquire labeled and unlabeled training samples constructed from a source domain dataset and a target domain dataset; wherein, the source domain dataset is obtained by labeling the target area with a first number of land cover categories based on the hyperspectral images of the target area acquired by a first image acquisition device; the target domain dataset is obtained by labeling the target area with a second number of land cover categories based on the hyperspectral images of the target area acquired by a second image acquisition device.
[0008] Based on the feature extraction module of the convolutional neural network model and combined with the adaptive mask vector, features are extracted from the labeled training samples and the unlabeled training samples to obtain the domain-invariant features and domain-specific features of the source domain dataset, the domain-invariant features and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples.
[0009] The domain-invariant features of the source domain dataset, the domain-invariant features of the target domain dataset, and the domain-invariant features of the unlabeled training samples are input into the bidirectional invertible mapping module of the convolutional neural network model to perform spatial feature mapping, thereby obtaining the domain-invariant features of the source domain, the domain-invariant features of the target domain, and the domain-invariant features of the unlabeled training samples after mapping.
[0010] Based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples, the total loss function of the convolutional neural network model is constructed.
[0011] Using land cover classification as the model training task and minimizing the total loss function as the training objective, the model parameters are optimized to obtain a trained convolutional neural network model for image classification.
[0012] In some instances, the step of inputting the domain-invariant features of the source domain dataset, the target domain dataset, and the unlabeled training samples into the bidirectional invertible mapping module of the convolutional neural network model for spatial feature mapping, to obtain the mapped domain-invariant features of the source domain, the mapped domain-invariant features of the target domain, and the mapped domain-invariant features of the unlabeled training samples, includes:
[0013] The domain-invariant features of the source domain dataset are input forward into the bidirectional invertible mapping module to obtain the domain-invariant features of the source domain after mapping.
[0014] The domain-invariant features of the target domain dataset are input in reverse to the bidirectional invertible mapping module to obtain the domain-invariant features of the target domain after mapping.
[0015] The domain-invariant features of the unlabeled training samples are input in reverse to the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped unlabeled training samples.
[0016] In some instances, the step of forward inputting the domain-invariant features of the source domain dataset into the bidirectional invertible mapping module to obtain the mapped domain-invariant features of the source domain includes:
[0017] Based on the bidirectional invertible mapping module, the domain-invariant features of the source domain dataset are divided into a first part of features and a second part of features with the same dimension.
[0018] Based on the first linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the source domain to the target domain feature space to obtain the first part of the source domain domain-invariant features after mapping.
[0019] Based on the second linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the source domain to the target domain feature space to obtain the second part of the source domain domain-invariant features after mapping.
[0020] By concatenating the first part of the domain-invariant features of the mapped source domain and the second part of the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped source domain are obtained.
[0021] In some instances, the step of inputting the domain-invariant features of the target domain dataset in reverse to the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped target domain includes:
[0022] Based on the bidirectional invertible mapping module, the domain-invariant features of the target domain dataset are divided into a first part of features and a second part of features with the same dimension.
[0023] Based on the first linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the first part of the target domain domain invariant features after mapping.
[0024] Based on the second linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the second part of the target domain domain-invariant features after mapping.
[0025] By concatenating the first part of the domain-invariant features of the mapped target domain and the second part of the domain-invariant features of the mapped target domain, the domain-invariant features of the mapped target domain are obtained.
[0026] In some instances, the step of inverting the domain-invariant features of the unlabeled training samples into the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped unlabeled training samples includes:
[0027] Based on the bidirectional invertible mapping module, the domain-invariant features of the unlabeled training samples are divided into a first part of features and a second part of features with the same dimension.
[0028] Based on the first linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the first part of the domain-invariant features of the unlabeled training samples after mapping.
[0029] Based on the second linear layer mapping function of the bidirectional invertible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the second part of the domain-invariant features of the unlabeled training sample after mapping.
[0030] By concatenating the first part of the domain-invariant features of the mapped unlabeled training sample and the second part of the domain-invariant features of the mapped unlabeled training sample, the domain-invariant features of the mapped unlabeled training sample are obtained.
[0031] In some instances, the feature extraction module based on the convolutional neural network model, combined with an adaptive mask vector, performs feature extraction on the labeled training samples and the unlabeled training samples to obtain domain-invariant and domain-specific features of the source domain dataset, domain-invariant and domain-specific features of the target domain dataset, and domain-invariant features of the unlabeled training samples, including:
[0032] The feature extraction module based on the convolutional neural network model extracts the original features of the labeled training samples and the unlabeled samples to obtain the original features of the source domain dataset, the original features of the target domain dataset, and the original features of the unlabeled samples.
[0033] Based on the mask vector trained by the convolutional neural network model and the complementary term corresponding to the mask vector, the original features of the source domain dataset, the original features of the target domain dataset, and the original features of the unlabeled training samples are multiplied element-wise to obtain the domain-invariant features and domain-specific features of the source domain dataset, the domain-invariant features and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples.
[0034] In some instances, the mask vector trained based on the convolutional neural network model and its corresponding complementary term are used to perform element-wise product of the original features of the source domain dataset, the original features of the target domain dataset, and the original features of the unlabeled training samples to obtain the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples, including:
[0035] Based on the first adaptive mask vector, the original features of the source domain dataset are multiplied element-wise to obtain the domain-invariant features of the source domain dataset.
[0036] Based on the complementary term corresponding to the first adaptive mask vector, the original features of the source domain dataset are multiplied element-wise to obtain the domain-specific features of the source domain dataset.
[0037] Based on the second adaptive mask vector, the original features of the target domain dataset are multiplied element-wise to obtain the domain-invariant features of the target domain dataset;
[0038] Based on the complementary term corresponding to the second adaptive mask vector, the original features of the target domain dataset are multiplied element-wise to obtain the domain-specific features of the target domain dataset;
[0039] The domain-invariant features of the unlabeled training samples are obtained by performing element-wise multiplication on the original features of the unlabeled training samples based on the second adaptive mask vector.
[0040] In some instances, the construction of the total loss function for the convolutional neural network model based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples includes:
[0041] Based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples, a feature combination is formed by at least two of these features to construct the classification loss, domain discrimination loss, sparsity consistency loss, cross-domain mapping loss from the source domain to the target domain feature space, cross-domain mapping loss from the target domain to the source domain feature space, and prediction consistency loss for unlabeled data of the convolutional neural network model.
[0042] Based on the classification loss, the domain discrimination loss, the sparsity consistency loss, the cross-domain mapping loss from the source domain to the target domain feature space, the cross-domain mapping loss from the target domain to the source domain feature space, and the prediction consistency loss of the unlabeled data, a total loss function for the convolutional neural network model is constructed.
[0043] In some instances, the method includes:
[0044] Construct an overall classification accuracy evaluation index, an average classification accuracy evaluation index, and a Kappa coefficient evaluation index;
[0045] The performance of the trained convolutional neural network model is evaluated based on the overall classification accuracy evaluation index, the average classification accuracy evaluation index, and the Kappa coefficient evaluation index.
[0046] A second aspect of this invention provides a model training apparatus for image classification, comprising:
[0047] The data acquisition unit is used to acquire labeled training samples and unlabeled training samples constructed from the source domain dataset and the target domain dataset;
[0048] The feature extraction unit is used to extract features from the labeled training samples and the unlabeled training samples based on the feature extraction module of the convolutional neural network model and combined with the adaptive mask vector, so as to obtain the domain-invariant features and domain-specific features of the source domain dataset, the domain-invariant features and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples.
[0049] The feature mapping unit is used to input the domain-invariant features of the source domain dataset, the domain-invariant features of the target domain dataset, and the domain-invariant features of the unlabeled training samples into the bidirectional invertible mapping module of the convolutional neural network model to perform spatial feature mapping, so as to obtain the domain-invariant features of the source domain, the domain-invariant features of the target domain, and the domain-invariant features of the unlabeled training samples after mapping.
[0050] The total loss function construction unit is used to construct the total loss function of the convolutional neural network model based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples.
[0051] The model training unit is used to train the model by classifying land cover categories and optimize the model parameters with the goal of minimizing the total loss function, so as to obtain a trained convolutional neural network model for image classification.
[0052] This invention provides a model training method for image classification, comprising: acquiring labeled training samples constructed from a source domain dataset and a target domain dataset, and unlabeled training samples constructed from hyperspectral images of a target region acquired by a second image acquisition device without land cover category labeling; wherein the source domain dataset is obtained by performing a first number of land cover category labels on the hyperspectral images of the target region acquired by the first image acquisition device; the target domain dataset is obtained by performing a second number of land cover category labels on the hyperspectral images of the target region acquired by the second image acquisition device; based on a feature extraction module of a convolutional neural network model and combined with an adaptive mask vector, feature extraction is performed on the labeled training samples and the unlabeled training samples to obtain domain-invariant and domain-specific features of the source domain dataset, domain-invariant and domain-specific features of the target domain dataset, and domain-invariant features of the unlabeled training samples; and the domain-invariant features of the source domain dataset and the domain-invariant features of the target domain dataset are then processed. The domain-invariant features of the unlabeled training samples are input into the bidirectional invertible mapping module of the convolutional neural network model for spatial feature mapping, resulting in the mapped domain-invariant features of the source domain, the target domain, and the unlabeled training samples. Based on the domain-invariant and domain-specific features of the source and target domain datasets, the unlabeled training samples, the mask vector, the mapped domain-invariant features of the source and target domains, and the mapped unlabeled training samples, the total loss function of the convolutional neural network model is constructed. Using land cover classification as the model training task and minimizing the total loss function as the training objective, the model parameters are optimized to obtain the trained convolutional neural network model for image classification. Based on the trained convolutional neural network model, land cover classification is performed on the images to be classified to obtain the land cover classification information. This application constructs multi-source training data, including labeled and unlabeled samples in the source and target domains, which helps increase the number of labeled samples in hyperspectral images. This allows the model to fully utilize both limited labeled data and abundant unlabeled data. Simultaneously, it employs mask vectors for feature deentanglement, effectively separating domain-invariant and domain-specific features. This helps reduce interference from land cover category-independent information on feature alignment and minimizes negative transfer. A bidirectional reversible mapping module is introduced to construct mutual transformations between the source and target domain feature spaces. By preserving the original feature spaces of both the source and target domains and establishing a reversible transformation relationship between the two spaces rather than forcibly merging them, the original topological structure and discrimination boundaries of the data are fully preserved. Furthermore, reversibility ensures that information is not lost during the mapping process. This fundamentally solves the problem of loss of discrimination information caused by forcibly mapping source and target domain features to a single shared feature space, thereby improving the training effect of the model for hyperspectral image classification. Attached Figure Description
[0053] Figure 1A flowchart of a model training method for image classification provided in an embodiment of the present invention;
[0054] Figure 2 This is a schematic diagram of the model architecture provided in an embodiment of the present invention;
[0055] Figure 3 This is a schematic diagram of the feature deentanglement process based on the cross-domain masking mechanism provided in an embodiment of the present invention;
[0056] Figure 4 This is a network architecture diagram of a reversible mapping block provided in an embodiment of the present invention;
[0057] Figure 5 This is a network architecture diagram of the feature extraction module provided in an embodiment of the present invention;
[0058] Figure 6 This is a schematic diagram of the structure of a model training device for image classification provided in an embodiment of the present invention. Detailed Implementation
[0059] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] The proposed model training method for image classification addresses the problem of poor performance of existing models in classifying hyperspectral images with only a small number of labeled samples. By constructing multi-source training data, including labeled and unlabeled samples in the source and target domains, the method increases the number of labeled hyperspectral images, enabling the model to fully utilize both limited labeled and abundant unlabeled data. Simultaneously, the method employs mask vectors for feature deentanglement, effectively separating domain-invariant and domain-specific features. This reduces interference from information unrelated to land cover categories on feature alignment and minimizes negative transfer. A bidirectional reversible mapping module is introduced to construct mutual transformations between the source and target domain feature spaces. By preserving the original feature spaces of both domains and establishing a reversible transformation relationship between the two spaces rather than forcibly merging them, the original topological structure and discrimination boundaries of the data are fully preserved. Furthermore, reversibility ensures that information is not lost during the mapping process, thus fundamentally solving the problem of forcibly mapping source and target domain features to a single shared feature space.
[0061] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.
[0062] Figure 1 This is a flowchart illustrating a model training method for image classification provided in an embodiment of the present invention. Figure 1 As shown, the model training method for image classification proposed in this embodiment of the invention includes:
[0063] Step 100: Obtain labeled training samples constructed from the source domain dataset and the target domain dataset, and unlabeled training samples constructed from hyperspectral images of the target area acquired by a second image acquisition device without land cover category labeling; wherein, the source domain dataset is obtained by performing a first number of land cover category labels on the hyperspectral images of the target area acquired by the first image acquisition device; the target domain dataset is obtained by performing a second number of land cover category labels on the hyperspectral images of the target area acquired by the second image acquisition device.
[0064] Step 110: Based on the feature extraction module of the convolutional neural network model and combined with the adaptive mask vector, perform feature extraction on the labeled training samples and the unlabeled training samples to obtain the domain-invariant features and domain-specific features of the source domain dataset, the domain-invariant features and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples.
[0065] Step 120: Input the domain-invariant features of the source domain dataset, the domain-invariant features of the target domain dataset, and the domain-invariant features of the unlabeled training samples into the bidirectional invertible mapping module of the convolutional neural network model to perform spatial feature mapping, and obtain the domain-invariant features of the source domain, the domain-invariant features of the target domain, and the domain-invariant features of the unlabeled training samples after mapping.
[0066] Step 130: Based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples, construct the total loss function of the convolutional neural network model.
[0067] Step 140: Using land cover classification as the model training task, and minimizing the total loss function as the training objective, optimize the model parameters to obtain a trained convolutional neural network model for image classification.
[0068] In this exemplary embodiment, based on the trained convolutional neural network model, the ground feature category classification of the image to be classified is performed to obtain the ground feature category classification information of the image to be classified.
[0069] In this exemplary embodiment, a cross-scene hyperspectral image classification problem is solved in a remote sensing image classification application scenario. First, two datasets are constructed: a source domain dataset and a target domain dataset. The source domain dataset consists of hyperspectral images of the target area acquired by a first image acquisition device (such as a ROSIS sensor), with a sufficient number of land cover category labels for each pixel (e.g., 50 samples per category). The target domain dataset consists of hyperspectral images of the target area acquired by a second image acquisition device (such as a DAIS sensor), with only a small number of land cover category labels for each pixel (e.g., 5 samples per category). Simultaneously, a large number of unlabeled hyperspectral images of the target area acquired by the second image acquisition device are used as unlabeled training samples.
[0070] In this exemplary embodiment, a convolutional neural network model is constructed, which includes components such as a feature extraction module, a mask vector, and a bidirectional invertible mapping module. During model training, labeled source and target domain training samples, as well as unlabeled training samples, are first input into the feature extraction module. Features are extracted using the mask vector from the model training, yielding domain-invariant and domain-specific features of the source domain dataset, the target domain dataset, and the domain-invariant features of the unlabeled training samples. Among these, the domain-invariant features are sensitive to land cover category information, while the domain-specific features are sensitive to domain information.
[0071] Next, the extracted source domain invariant features, target domain invariant features, and unlabeled training sample domain invariant features are input into the bidirectional invertible mapping module for spatial feature mapping, resulting in mapped source domain invariant features, target domain invariant features, and unlabeled training sample domain invariant features. This mapping process enables the mutual conversion between the source and target domain feature spaces.
[0072] Based on all the aforementioned features, mask vectors, and mapped features, a total loss function for model training is constructed. The model is trained to classify land cover categories using source domain invariant features, mapped source domain invariant features, target domain invariant features, mapped target domain invariant features, unlabeled training sample domain invariant features, and mapped unlabeled training sample domain invariant features. The model parameters are optimized with the goal of minimizing the total loss function, ultimately resulting in the trained convolutional neural network model.
[0073] In practical applications, when it is necessary to identify land cover categories in new hyperspectral images to be classified, the image can be input into a trained model to quickly and accurately obtain the land cover category classification information corresponding to each pixel, such as trees, grassland, asphalt, soil, etc.
[0074] In this exemplary embodiment, constructing multi-source training data of labeled and unlabeled samples in the source and target domains helps increase the number of labeled hyperspectral image samples, enabling the model to fully utilize both limited labeled data and abundant unlabeled data. Simultaneously, using mask vectors for feature deentanglement effectively separates domain-invariant and domain-specific features, reducing interference from land cover category-independent information on feature alignment and mitigating negative transfer. A bidirectional reversible mapping module is introduced to construct mutual transformations between the source and target domain feature spaces. By preserving the original feature spaces of both the source and target domains and establishing a reversible transformation relationship between the two spaces rather than forced merging, the original topological structure and discrimination boundaries of the data are fully preserved. Furthermore, reversibility ensures that information is not lost during the mapping process, fundamentally solving the problem of loss of discrimination information caused by forcibly mapping source and target domain features to a single shared feature space. This, in turn, improves the training effect of the model for hyperspectral image classification.
[0075] In some instances, the feature extraction module based on the convolutional neural network model, combined with an adaptive mask vector, performs feature extraction on the labeled training samples and the unlabeled training samples to obtain domain-invariant and domain-specific features of the source domain dataset, domain-invariant and domain-specific features of the target domain dataset, and domain-invariant features of the unlabeled training samples, including:
[0076] The feature extraction module based on the convolutional neural network model extracts the original features of the labeled training samples and the unlabeled samples to obtain the original features of the source domain dataset, the original features of the target domain dataset, and the original features of the unlabeled samples.
[0077] Based on the mask vector trained by the convolutional neural network model and the complementary term corresponding to the mask vector, the original features of the source domain dataset, the original features of the target domain dataset, and the original features of the unlabeled training samples are multiplied element-wise to obtain the domain-invariant features and domain-specific features of the source domain dataset, the domain-invariant features and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples.
[0078] In this exemplary embodiment, a mask vector de-entanglement mechanism is employed in the feature extraction stage. First, the feature extraction module of the convolutional neural network model extracts raw features from the input labeled training samples (including source and target domain samples) to obtain the raw features of the source domain dataset and the raw features of the target domain dataset. These raw features contain various semantic information, including information related to land cover categories and information related to the domain.
[0079] To separate this entangled information, the model introduces learnable mask vectors. Each element in the mask vector ranges from 0 to 1, representing the importance weight of the corresponding feature dimension. Simultaneously, each mask vector has a corresponding complementary term (1 minus the mask vector) used to extract complementary feature components.
[0080] The model utilizes a mask vector and its complement to perform element-wise Hadamard product operations on the original features of the source and target domains, as well as unlabeled training samples. Specifically, the mask vector is multiplied by the original features to obtain the first feature, which is then input into the classifier to obtain a domain-invariant feature sensitive to land cover categories. The complement is multiplied by the original features to obtain the second feature, which is then input into the domain discriminator to obtain a domain-specific feature sensitive to domain information.
[0081] In this way, the model can automatically learn how to separate the entangled semantic information in the original features, extract pure discriminative information for classification tasks, and separate domain-related information for domain discrimination tasks.
[0082] In this exemplary embodiment, using learnable mask vectors for feature deentanglement helps avoid the problem of excessive parameter count in traditional decoder-encoder architectures, reducing model complexity. The combined use of mask vectors and complementary terms facilitates the parallel extraction of domain-invariant and domain-specific features, enabling synergistic optimization of both types of features. Element-wise multiplication allows for fine-grained weight adjustment of each dimension of the original features using the mask vectors, facilitating fine-grained feature selection. The learnability of the mask vectors allows the model to automatically learn the optimal deentanglement method based on the data, eliminating the need for manual feature separation rules. This deentanglement mechanism effectively reduces the interference of land cover category-irrelevant information on feature alignment and minimizes negative transfer.
[0083] In some instances, the mask vector trained based on the convolutional neural network model and its corresponding complementary term are used to perform element-wise product of the original features of the source domain dataset, the original features of the target domain dataset, and the original features of the unlabeled training samples to obtain the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples, including:
[0084] The first mask vector trained based on the convolutional neural network model The original features of the source domain dataset Perform element-wise multiplication to obtain the domain-invariant features of the source domain dataset. Where s represents the source domain and n represents the dimension;
[0085] Based on the complementary term 1-m corresponding to the first adaptive mask vector s Element-wise multiplication of the original features of the source domain dataset yields the domain-specific features of the source domain dataset. ;
[0086] The second mask vector trained based on the convolutional neural network model The original features of the target domain dataset Element-wise multiplication is performed to obtain the domain-invariant features of the target domain dataset. Where T represents the target domain and n represents the dimension;
[0087] Based on the complementary term 1-m corresponding to the second adaptive mask vector T The original features of the target domain dataset Element-wise multiplication is performed to obtain the domain-specific features of the target domain dataset. ;
[0088] The second mask vector trained based on the convolutional neural network model The original features of the unlabeled training samples Element-wise multiplication is performed to obtain the domain-invariant features of the unlabeled training samples. .
[0089] In this exemplary embodiment, each element in the vector is only processed by This is obtained through a thresholding operation, which makes each element equal to... Weight coefficients within the specified range. Simultaneously, to establish the connection between the source and target domains, the cross-domain masking mechanism... and Applying sparse consistency constraints to them gives them similar sparse structures. This ensures that the features of the source and target domains after deentanglement have similar representation forms, facilitating cross-domain knowledge transfer.
[0090] Specifically, the field-invariant property of the source domain Domain-specific characteristics of the source domain Domain-invariant characteristics of the target domain Domain-specific features of the target domain can be derived from formula The result of the calculation.
[0091] ......(1) This represents element-wise multiplication;
[0092] Based on the masking process described above, independent mask vectors are set for the source and target domains respectively, in order to preserve the unique information that is beneficial to the task in each domain.
[0093] The specific processing steps are as follows: For the source domain dataset, the model uses the first mask vector trained to perform element-wise multiplication with the original features of the source domain to obtain the domain-invariant features of the source domain dataset; at the same time, it uses the complementary term of the first mask vector to perform element-wise multiplication with the original features of the source domain to obtain the domain-specific features of the source domain dataset.
[0094] For the target domain dataset, the model uses the trained second mask vector to perform element-wise multiplication with the original features of the target domain to obtain the domain-invariant features of the target domain dataset; at the same time, it uses the complementary term of the second mask vector to perform element-wise multiplication with the original features of the target domain to obtain the domain-specific features of the target domain dataset.
[0095] For unlabeled training samples, the model also uses the second mask vector to perform element-wise multiplication with its original features to obtain the domain-invariant features of the unlabeled training samples. The mask vector of the target domain is reused here because the unlabeled samples come from the same data distribution as the target domain.
[0096] This design preserves the independent deentanglement capabilities of the source and target domains, while also ensuring that the two mask vectors have similar sparse structures through subsequent sparse consistency constraints, thereby promoting cross-domain knowledge transfer.
[0097] In this exemplary embodiment, independent mask vectors are established for the source and target domains, preserving unique information beneficial to their respective domain tasks and helping to avoid information loss caused by excessive deentanglement. Reusing the target domain's mask vector to process unlabeled samples helps ensure consistency in feature extraction and facilitates the participation of unlabeled samples in subsequent training. The independent mask, combined with the subsequent sparse consistency constraint design, promotes cross-domain knowledge transfer while preserving domain specificity, balancing the advantages and disadvantages of the two strategies. Parallel computation of the mask vector and its complementary terms facilitates efficient separation of domain-invariant and domain-specific features, improving feature extraction efficiency. This design enables the model to simultaneously learn shared and unique knowledge from both domains, improving the accuracy of cross-domain classification.
[0098] In some instances, the step of inputting the domain-invariant features of the source domain dataset, the target domain dataset, and the unlabeled training samples into the bidirectional invertible mapping module of the convolutional neural network model for spatial feature mapping, to obtain the mapped domain-invariant features of the source domain, the mapped domain-invariant features of the target domain, and the mapped domain-invariant features of the unlabeled training samples, includes:
[0099] The domain-invariant features of the source domain dataset are input forward into the bidirectional invertible mapping module to obtain the domain-invariant features of the source domain after mapping.
[0100] The domain-invariant features of the target domain dataset are input in reverse to the bidirectional invertible mapping module to obtain the domain-invariant features of the target domain after mapping.
[0101] The domain-invariant features of the unlabeled training samples are input in reverse to the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped unlabeled training samples.
[0102] In this exemplary embodiment, following the above embodiments, when the extracted domain-invariant features are input into the bidirectional reversible mapping module, three different input methods are used to achieve complete bidirectional mapping.
[0103] First, the domain-invariant features of the source domain dataset are taken as positive input and fed into the bidirectional invertible mapping module. Internally, the module processes these features using a specific mapping function, transforming them from the source domain feature space to the target domain feature space, and outputting the mapped domain-invariant features of the source domain. This process is equivalent to "translating" the knowledge of the source domain into a form that the target domain can understand.
[0104] Secondly, the domain-invariant features of the target domain dataset are used as reverse inputs to the same bidirectional invertible mapping module. This module processes these features in the opposite direction, transforming them from the target domain feature space back to the source domain feature space, and outputting the mapped domain-invariant features of the target domain. This process achieves a reverse "translation" of target domain knowledge into the source domain.
[0105] Finally, the domain-invariant features of the unlabeled training samples are also used as the reverse input to the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped unlabeled training samples. This allows unlabeled samples to participate in the cross-domain mapping process, providing the model with more diverse feature transformation information.
[0106] Through this forward and reverse input, the bidirectional reversible mapping module constructs a complete bidirectional bridge between the feature spaces of the source and target domains, enabling the features of the two domains to be converted and aligned with each other.
[0107] In this exemplary embodiment, a bidirectional mapping between the feature spaces of the source and target domains is achieved through both forward and reverse input methods, enabling the model to learn cross-domain feature transformation relationships simultaneously from two directions. Including domain-invariant features of unlabeled samples in the mapping process expands the training data sources for the mapping module, making the mapping relationship more robust and generalizable. The bidirectional mapping design preserves the topological structure of features in their respective original spaces, avoiding the structural damage caused by forcibly aligning two domains to the same space in traditional methods. This provides a foundation for subsequently constructing classification and consistency losses using the mapped features, allowing the model to better utilize cross-domain information.
[0108] In some instances, the step of forward inputting the domain-invariant features of the source domain dataset into the bidirectional invertible mapping module to obtain the mapped domain-invariant features of the source domain includes:
[0109] Based on the bidirectional invertible mapping module, the domain-invariant features of the source domain dataset are... The first part of the features is divided into the same dimensions. Second part features ;
[0110] The first linear layer mapping function based on the bidirectional reversible mapping module For the first part of features Second part features Perform a feature space mapping from the source domain to the target domain to obtain the first part of the domain-invariant features of the source domain after the mapping. ;
[0111] The second linear layer mapping function based on the bidirectional reversible mapping module For the first part of features Second part features Perform a feature space mapping from the source domain to the target domain to obtain the second part of the domain-invariant features of the source domain after the mapping. ;
[0112] After concatenating the first part of the mapped source domain, the domain-invariant features are concatenated. and the second part of the domain-invariant features of the source domain after mapping The domain-invariant features of the source domain after the mapping are obtained. .
[0113] In this exemplary embodiment, the network architecture of the reversible bidirectional mapping block proposed in this method is as follows: Figure 5 As shown. Taking the mapping from the source domain feature space to the target domain feature space as a positive example, the reversible bidirectional mapping block first maps the source domain invariant features... Divided into two parts of equal dimension, the first part features Second part features , (dimension) In this method, the number is set to even. .
[0114] For forward calculation:
[0115] ........(2); where, and This is a mapping function based on a linear layer.
[0116] Features mapped from source domain to target domain It can be represented as:
[0117] In the aforementioned forward mapping process, when the domain-invariant features of the source domain dataset are input into the bidirectional invertible mapping module, the module first divides the feature vector into two parts of the same dimension, denoted as the first part feature and the second part feature. For example, if the domain-invariant feature of the source domain is a 128-dimensional vector, the module will split it into two 64-dimensional sub-vectors.
[0118] Next, the module processes these two feature parts using two different linear layer mapping functions. For the first feature part, the module combines the information from the second feature part and calculates new feature values using the first linear layer mapping function; for the second feature part, the module combines the updated first feature part and calculates new feature values using the second linear layer mapping function. This coupled computation method ensures information exchange between the different parts of the feature.
[0119] The specific calculation process is as follows: First, the first part of the features is added to the second part of the features after being processed by the first linear layer mapping function to obtain the first part of the domain-invariant features of the source domain after mapping; then, the second part of the features is added to the updated first part of the features after being processed by the second linear layer mapping function to obtain the second part of the domain-invariant features of the source domain after mapping.
[0120] Finally, the module concatenates the two calculated feature parts, recombines them into a complete feature vector, which is the final mapped domain-invariant feature of the source domain. This feature has been successfully transformed from the source domain feature space to the target domain feature space, while preserving the key structural information of the original feature.
[0121] In this exemplary embodiment, splitting the feature into two parts for coupled computation facilitates the interaction and fusion of information within the feature, enhancing its expressive power. Employing two linear layer mapping functions to process different parts of the feature separately increases the model's non-linear expressive power, enabling the learning of more complex mapping relationships. The coupled computation method ensures the continuity and reversibility of the mapping process, allowing the mapped feature to retain the topological structure of the original feature. The final concatenation operation helps restore the complete dimensionality of the feature, ensuring the integrity of the information required for subsequent classification tasks.
[0122] In some instances, the step of inputting the domain-invariant features of the target domain dataset in reverse to the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped target domain includes:
[0123] Based on the bidirectional invertible mapping module, the domain-invariant features of the target domain dataset are... The first part of the features is divided into the same dimensions. Second part features ;
[0124] The first linear layer mapping function based on the bidirectional reversible mapping module For the first part of features Second part features Perform a feature space mapping from the target domain to the source domain to obtain the first part of the domain-invariant features of the target domain after the mapping. ;
[0125] The second linear layer mapping function based on the bidirectional reversible mapping module For the first part of features Second part features Perform a feature space mapping from the target domain to the source domain to obtain the second part of the domain-invariant features of the target domain after the mapping. ;
[0126] The first part of the target domain after the mapping is concatenated, showing the domain-invariant features. and the second part of the domain-invariant features of the target domain after mapping The domain-invariant features of the target domain after the mapping are obtained. .
[0127] In this exemplary embodiment,
[0128] ........(3); among which, and It is a mapping function based on a linear layer;
[0129] Features of the target domain mapped to the source domain It can be represented as: The `concat()` function is used for concatenation.
[0130] The forward calculation process is denoted as... Its reverse process is .because and This is achieved through two linear layers, therefore the change is continuous, which means... and It is also continuous, which ensures that the topological structure of the original features can be preserved during the mapping process.
[0131] To construct a bidirectional mapping between the source and target domains, a homeomorphism is used. It needs to be able to correctly map the domain-invariant features of the source domain to the feature space of the target domain, while... It can correctly map the domain-invariant features of the target domain to the feature space of the source domain.
[0132] In this exemplary embodiment, corresponding to the forward mapping, when the domain-invariant features of the target domain dataset are input into the bidirectional invertible mapping module for reverse mapping, the module first divides the domain-invariant features of the target domain dataset into two parts of the same dimension, denoted as the first part features and the second part features. Unlike the forward mapping, the goal of the reverse mapping is to transform the features from the target domain feature space back to the source domain feature space.
[0133] The module also uses the first and second linear layer mapping functions to process these two parts of the features, but the calculation order and combination method remain symmetrical to the forward mapping. The first part of the features, plus the second part of the features processed by the first linear layer mapping function, yields the first part of the domain-invariant features of the mapped target domain. Then, the second part of the features, plus the updated first part of the features processed by the second linear layer mapping function, yields the second part of the domain-invariant features of the mapped target domain. Finally, the module concatenates the two parts of the calculated features to obtain the complete domain-invariant features of the mapped target domain. This feature has been successfully transformed from the target domain feature space back to the source domain feature space.
[0134] In this exemplary embodiment, the forward and reverse mappings are implemented symmetrically, ensuring the complete reversibility of the mapping and making feature transformations traceable and recoverable. The same segmentation and coupling computation method as the forward mapping ensures the consistency and symmetry of the feature processing flow, facilitating model learning and optimization. The reverse mapping allows the target domain features to be transformed into the source domain feature space, providing technical support for bidirectional knowledge transfer. Reversibility ensures the integrity of feature information during the mapping process, avoiding information loss or distortion. This design enables the model to simultaneously utilize feature transformation information from both directions for joint optimization, improving cross-domain alignment.
[0135] In some instances, the step of inverting the domain-invariant features of the unlabeled training samples into the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped unlabeled training samples includes:
[0136] Based on the bidirectional invertible mapping module, the domain-invariant features of the unlabeled training samples are divided into a first part of features and a second part of features with the same dimension.
[0137] Based on the first linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the first part of the domain-invariant features of the unlabeled training samples after mapping.
[0138] Based on the second linear layer mapping function of the bidirectional invertible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the second part of the domain-invariant features of the unlabeled training sample after mapping.
[0139] By concatenating the first part of the domain-invariant features of the mapped unlabeled training sample and the second part of the domain-invariant features of the mapped unlabeled training sample, the domain-invariant features of the mapped unlabeled training sample are obtained.
[0140] In this exemplary embodiment, unlabeled samples also participate in bidirectional invertible mapping during model training. The domain-invariant features of the unlabeled training samples are used as the inverse input and fed into the bidirectional invertible mapping module for processing. The processing flow is similar to the inverse mapping of labeled samples in the target domain. The module first divides the domain-invariant features of the unlabeled training samples into two parts of the same dimension, denoted as the first part and the second part. Then, it uses a first linear layer mapping function and a second linear layer mapping function to couple the calculations of these two parts: the first part is added to the second part after processing by the first linear layer mapping function to obtain the first part of the domain-invariant features of the mapped unlabeled training samples; the second part is added to the updated first part after processing by the second linear layer mapping function to obtain the second part of the domain-invariant features of the mapped unlabeled training samples. Finally, the module concatenates these two parts to obtain the complete domain-invariant features of the mapped unlabeled training samples. This process allows unlabeled samples, which originally had no category label, to participate in cross-domain mapping. The consistency constraint of features before and after mapping enhances the stability of the mapping, while also helping to avoid the noise problem caused by assigning pseudo-labels to unlabeled samples in traditional methods.
[0141] In this exemplary embodiment, enabling unlabeled samples to participate in the cross-domain mapping process fully utilizes a large amount of readily available unlabeled data, which helps alleviate the problem of scarce labeled samples. Enhancing mapping stability through consistency constraints on features before and after mapping helps avoid noise issues caused by assigning pseudo-labels to unlabeled samples. The participation of unlabeled samples increases the diversity of training data, contributing to the learning of more generalizable feature representations. Using the same mapping process as labeled samples ensures consistency in feature processing, facilitating unified model optimization. This provides a foundation for subsequently constructing a prediction consistency loss using unlabeled samples, enabling the model to learn from a large amount of unlabeled data in an unsupervised manner.
[0142] In some instances, the construction of the total loss function for the convolutional neural network model based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples includes:
[0143] Based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples, a feature combination is formed by at least two of these features to construct the classification loss, domain discrimination loss, sparsity consistency loss, cross-domain mapping loss from the source domain to the target domain feature space, cross-domain mapping loss from the target domain to the source domain feature space, and prediction consistency loss for unlabeled data of the convolutional neural network model.
[0144] Based on the classification loss, the domain discrimination loss, the sparsity consistency loss, the cross-domain mapping loss from the source domain to the target domain feature space, the cross-domain mapping loss from the target domain to the source domain feature space, and the prediction consistency loss of the unlabeled data, a total loss function for the convolutional neural network model is constructed.
[0145] Specifically, the classification loss of the convolutional neural network model is constructed based on the domain-invariant features of the source domain dataset, the domain-invariant features of the mapped source domain, the domain-invariant features of the target domain dataset, the domain-invariant features of the mapped target domain, the class labels of the source domain, the class labels of the target domain, and the cross-quotient loss function. ;
[0146] Based on the domain-specific features of the source domain dataset, the domain-specific features of the target domain dataset, the domain labels of the source domain, the domain labels of the target domain, and a domain discriminant loss function implemented using binary cross-entropy, a domain discriminant loss function for training the convolutional neural network model is constructed. ;
[0147] Based on the first mask vector trained by the convolutional neural network model and the second mask vector trained by the convolutional neural network model, the sparsity consistency loss is determined. ;
[0148] Based on the domain-invariant features of the source domain after mapping, the domain-invariant features of the target domain dataset, and the corresponding loss function of the source domain, a cross-domain mapping loss from the source domain to the target domain feature space is constructed. ;
[0149] Based on the domain-invariant features of the mapped target domain, the domain-invariant features of the source domain dataset, and the target-corresponding loss function, a cross-domain mapping loss is constructed to map the target domain to the source domain feature space. ;
[0150] Based on the domain-invariant features of the unlabeled training samples, the domain-invariant features of the mapped unlabeled training samples, and the KL discretization formula, a prediction consistency loss for unlabeled data is constructed. ;
[0151] Based on the classification loss, the domain discrimination loss, the sparsity consistency loss, the cross-domain mapping loss from the source domain to the target domain feature space, the cross-domain mapping loss from the target domain to the source domain feature space, and the prediction consistency loss of the unlabeled data, a total loss function for the convolutional neural network model is constructed. .
[0152] In this exemplary embodiment, the classification loss of the convolutional neural network model ,include:
[0153] ;in, Let the cross-quotient loss function be used. These are the domain-invariant features of the source domain dataset; For the domain-invariant features of the target domain dataset; The category label for the target domain; The category label for the source domain; The domain-invariant feature of the source domain after mapping; These are the domain-invariant features of the target domain after mapping;
[0154] Domain discrimination loss during convolutional neural network model training ,include:
[0155] ; The domain label for the source domain; The domain label for the target domain; This is a domain discriminant loss function implemented using binary cross-entropy; Domain-specific features of the source domain dataset; Domain-specific features for the target domain dataset;
[0156] Sparse consistency loss ,include:
[0157] ; This is the first mask vector; This is the second mask vector;
[0158] Cross-domain mapping loss from source domain to target domain feature space ,include:
[0159] The domain-invariant feature of the source domain after mapping; For the domain-invariant features of the target domain dataset; For the domain-invariant features of the target domain dataset during the i-th training iteration; Let B be the domain-invariant features of the source domain after the mapping in the i-th training iteration; B is the number of training batches.
[0160] Cross-domain mapping loss from the target domain to the feature space of the source domain ,include:
[0161] Let be the domain-invariant features of the target domain after the mapping in the i-th training iteration; For the domain-invariant features of the source domain dataset during the i-th training iteration; These are the domain-invariant features of the source domain dataset; These are the domain-invariant features of the target domain after mapping;
[0162] Prediction consistency loss of unlabeled data ,include:
[0163] ; These are the domain-invariant features of unlabeled training samples; These are the domain-invariant features of the unlabeled training samples after mapping; This is the KL discrete formula; C represents the classifier;
[0164] ;in, , All are input variables;
[0165] Total loss function ,include:
[0166] ; , , and These are the parameters for weighing the various losses; Cross-domain mapping loss for mapping from the source domain to the feature space of the target domain Cross-domain mapping loss between the target domain and the source domain feature space The sum of.
[0167] In this application, in order to jointly optimize all components of the model, a multi-objective total loss function is constructed, which consists of five parts, as follows:
[0168] Based on the source domain invariant features, the mapped source domain invariant features, the target domain invariant features, the mapped target domain invariant features, and the corresponding class labels, a classification loss is constructed using the cross-entropy loss function. This loss ensures that all features (including original features and mapped features) can be correctly classified, maintaining the consistency of discriminative information.
[0169] Based on source domain-specific features, target domain-specific features, and corresponding domain labels, a domain-discriminative loss is constructed using a binary cross-entropy loss function. This loss ensures that domain-specific features can accurately identify the domain to which the features belong, thus promoting feature deentanglement.
[0170] Third, based on the source domain mask vector and the target domain mask vector, and combined with norm regularization, a sparse consistency loss is constructed. This loss makes the two mask vectors have similar sparse structures, which promotes cross-domain knowledge transfer.
[0171] Fourth, based on the differences between the domain-invariant features of the source domain and the domain-invariant features of the target domain after mapping, and the differences between the domain-invariant features of the target domain and the domain-invariant features of the source domain after mapping, a cross-domain mapping loss is constructed in conjunction with the mean absolute error (MAE). This loss ensures that the mapped features can accurately match the target feature space.
[0172] Fifth, based on the domain-invariant features of the unlabeled training samples and the domain-invariant features of the mapped unlabeled training samples, and combined with KL divergence, a prediction consistency loss is constructed. This loss ensures that the features before and after mapping have consistent discriminative information, thus enhancing the stability of the mapping.
[0173] Finally, the five losses are weighted and summed to obtain the total loss function. The model is then jointly optimized end-to-end with the goal of minimizing the total loss.
[0174] In this exemplary embodiment, the multi-objective loss function design enables the model to simultaneously optimize classification performance, deentanglement effect, cross-domain mapping accuracy, and unlabeled sample utilization efficiency, which is beneficial for achieving multi-task joint learning. The classification loss ensures that all features (including before and after mapping) maintain consistent discriminative information, helping to avoid information loss during the mapping process. The domain discriminative loss promotes feature deentanglement, allowing domain-invariant features and domain-specific features to perform their respective functions, reducing mutual interference. The sparse consistency loss, by constraining the sparse structure of the mask vector, facilitates cross-domain knowledge transfer while purifying discriminative information. The cross-domain mapping loss helps ensure mapping accuracy, enabling precise alignment of features between the source and target domains. The prediction consistency loss utilizes unlabeled samples to enhance mapping stability, helping to avoid noise problems caused by traditional pseudo-label methods. The trade-off parameters between the various losses allow the model to adjust the weights of each objective according to different task requirements, enhancing the model's flexibility.
[0175] Figure 2 This is a schematic diagram of the model architecture provided for an embodiment of the present invention. Figure 2 As shown in the figure, this diagram illustrates the complete network architecture of the proposed cross-scene hyperspectral image classification model. The model mainly consists of four core modules: a feature extraction module, a deentanglement module (cross-domain masking mechanism), a reversible bidirectional mapping block, and a classifier and domain discriminator. The entire architecture achieves effective deentanglement and bidirectional alignment of source and target domain features through the collaborative work of multiple data streams.
[0176] The feature extraction module, located on the far left of the graph, receives input data from both the source and target domains. This module extracts raw features using a convolutional neural network, outputting source and target domain features respectively, providing basic feature representations for subsequent processing. The deentanglement unit (cross-domain masking mechanism), located in the upper-middle part of the graph, contains two parallel masking processing branches:
[0177] Source domain deentanglement: The source domain mask vector (first mask vector) and its complementary term are used to deentangle the source domain features, separating the domain-invariant features (sensitive to land cover categories) and the domain-specific features (sensitive to domain information) of the source domain.
[0178] Target domain deentanglement: The target domain features are deentangled using the target domain mask vector (second mask vector) and its complementary term, separating the domain-invariant features and domain-specific features of the target domain.
[0179] The domain-specific features of the de-entangled source and target domains are fed into the domain discriminator, and the domain discrimination loss ensures that they contain domain-related information; the domain-invariant features of the source and target domains are fed into the classifier, and the classification loss ensures that they contain class discrimination information.
[0180] The reversible bidirectional mapping block is located at the center of the graph, receives the domain-invariant features after disentanglement, and constructs a bidirectional mapping between the feature spaces of the source and target domains:
[0181] Forward mapping (source domain → target domain): Maps the domain-invariant features of the source domain to the feature space of the target domain, resulting in source domain features mapped to the feature space of the target domain.
[0182] Inverse mapping (target domain → source domain): Mapping the domain-invariant features of the target domain to the feature space of the source domain, resulting in the target domain features mapped to the feature space of the source domain.
[0183] The mapped features are also fed into the classifier to ensure consistency in the discrimination of features before and after mapping.
[0184] The classifier receives all domain-invariant features (including original domain-invariant features and mapped features) and guarantees the class discriminative ability of the features through classification loss.
[0185] The domain discriminator receives all domain-specific features and ensures the domain sensitivity of the features through domain discriminant loss.
[0186] In this exemplary embodiment, the model training task includes:
[0187] The task of model training is to input the domain-invariant features of the source domain dataset, the domain-invariant features of the mapped source domain, the domain-invariant features of the target domain dataset, the domain-invariant features of the mapped target domain, the domain-invariant features of the unlabeled training samples, and the domain-invariant features of the mapped unlabeled training samples into the classifier to classify land cover categories.
[0188] This architecture separates domain-invariant and domain-specific features through a deentanglement mechanism, enabling the model to focus on shared information beneficial to the classification task. It establishes a bridge between the two feature spaces through an invertible bidirectional mapping block, avoiding the loss of discriminative information caused by the forced mapping to a single shared space in traditional methods. Through the collaborative optimization of the classifier and the domain discriminator, it achieves effective transfer of knowledge between the source and target domains, ultimately achieving excellent classification performance with only a small number of labeled samples in the target domain.
[0189] Figure 3 This is a schematic diagram illustrating the feature deentanglement process based on a cross-domain masking mechanism provided in an embodiment of the present invention. Figure 3 As shown, the first mask vector trained based on the convolutional neural network model The original features of the source domain dataset Perform element-wise multiplication to obtain the domain-invariant features of the source domain dataset. Based on the complementary term 1-m corresponding to the first adaptive mask vector S Element-wise multiplication of the original features of the source domain dataset yields the domain-specific features of the source domain dataset. The second mask vector trained based on the convolutional neural network model The original features of the target domain dataset Element-wise multiplication is performed to obtain the domain-invariant features of the target domain dataset. Based on the complementary term 1-m corresponding to the second adaptive mask vector T The original features of the target domain dataset Element-wise multiplication is performed to obtain the domain-specific features of the target domain dataset. .
[0190] Figure 4 This is a network architecture diagram of a reversible mapping block provided in an embodiment of the present invention. Figure 4 As shown, the reversible bidirectional mapping block (i.e., the bidirectional reversible mapping module) can realize the mapping of the domain-invariant features of the source domain dataset to the target domain feature space, and the mapping of the domain-invariant features of the target domain dataset to the source domain feature space.
[0191] Figure 5 This is a network architecture diagram of the feature extraction module provided in an embodiment of the present invention. Figure 5 As shown in the figure, this diagram illustrates the specific network structure of the feature extraction module in the proposed cross-scene hyperspectral image classification model. This module employs a dual-branch parallel design, processing hyperspectral image data from the source and target domains respectively, and extracting discriminative deep features through a series of convolutional operations.
[0192] The input layer receives hyperspectral image data from both the source and target domains. The data from each domain is fed into two structurally identical but parameter-independent processing branches. This design allows the model to learn feature extraction parameters for different domain data distributions.
[0193] The first layer of both branches of the convolutional layer (spectral dimensionality reduction) is a 1×1 convolution. Its function is to compress the original spectral dimension of the hyperspectral image, reduce the data dimension, unify the feature dimensions of the source and target domains, lay the foundation for subsequent processing, introduce nonlinear transformation, and enhance the feature expression capability.
[0194] Convolutional layers (spectral-spatial feature extraction): 1×1 convolutions are followed by 3D convolutional layers, which is the core part for extracting hyperspectral image features. 3D convolution can process both spatial and spectral dimensions simultaneously, effectively capturing spectral features, spatial features, and joint spectral-spatial features.
[0195] The 3D batch normalization (BN) layer follows each 3D convolution. Its function is to accelerate model convergence, alleviate the gradient vanishing problem, and improve the stability of model training.
[0196] After 3D convolution, a 2D convolutional layer is applied to further extract deeper spatial features. At this point, the feature map has already incorporated spectral information, and the 2D convolution focuses on learning features in the spatial dimension. A 2D batch normalization (BN) layer follows the 2D convolution, also used to stabilize the training process. Finally, a 1D linear layer is applied to flatten the feature map extracted by the convolution and map it to the final feature vector space. The output consists of source and target domain features usable by the subsequent deentanglement processor.
[0197] This feature extraction module employs a hierarchical convolutional design to jointly extract spectral and spatial information from hyperspectral images. 1×1 convolutions reduce computational complexity by minimizing dimensionality; 3D convolutions capture joint spectral-spatial features; 2D convolutions enhance spatial feature representation; batch normalization layers ensure training stability; and linear layers output fixed-dimensional feature vectors. The final output source and target domain features provide high-quality input features for subsequent deentanglement and bidirectional mapping, forming the foundation for the model's excellent classification performance.
[0198] In some instances, including:
[0199] Construct an overall classification accuracy evaluation index, an average classification accuracy evaluation index, and a Kappa coefficient evaluation index;
[0200] The performance of the trained convolutional neural network model is evaluated based on the overall classification accuracy evaluation index, the average classification accuracy evaluation index, and the Kappa coefficient evaluation index.
[0201] In this exemplary embodiment, after the model training is completed, a complete evaluation system is constructed to verify the model's performance. Three evaluation metrics widely used in the field of remote sensing image classification are adopted: overall classification accuracy (OA), average classification accuracy (AA), and Kappa coefficient.
[0202] Overall classification accuracy calculates the proportion of correctly classified samples out of the total sample size, directly reflecting the model's overall classification performance. Average classification accuracy first calculates the classification accuracy for each land cover category and then averages it, balancing the impact of uneven sample sizes across categories. The Kappa coefficient considers the impact of random consistency, providing a more objective assessment of the consistency between the classification results and the actual land cover categories.
[0203] The trained model was comprehensively evaluated on three real-world cross-domain hyperspectral image datasets (RPaviaU-DPaviaC, RPVaviaC-DPaviaU, and Houston2018-Houston2013). Experiments on each dataset were conducted with a small sample size: 50 labeled samples were randomly selected from each class in the source domain, 5 labeled samples were randomly selected from each class in the target domain as the training set, and the remaining target domain samples were used as the test set. To avoid experimental randomness, the final results were calculated as the average of ten independent random sampling experiments.
[0204] Experimental results show that the overall classification accuracy of our method on the three datasets reaches 96.22%, 89.47%, and 85.18%, respectively, all of which are significantly better than existing comparative methods. In particular, on the RPaviaU-DPPaviaC dataset, our method improves the accuracy by 3.7 percentage points compared to the suboptimal method (AGM-ST), verifying the superiority of our method.
[0205] In this exemplary embodiment, three complementary evaluation metrics—overall classification accuracy, average classification accuracy, and Kappa coefficient—are constructed to comprehensively measure model performance from different perspectives, thus avoiding the limitations of a single metric. Overall classification accuracy directly reflects the overall classification effect, facilitating rapid evaluation of the model's merits. Average classification accuracy balances the impact of uneven sample sizes across categories, ensuring good model performance in all categories. The Kappa coefficient considers the impact of random consistency, enabling a more objective assessment of the consistency between the classification results and the actual land cover categories.
[0206] Table 1. Shared land cover types and sample numbers in the RPaviaU-DPaviaC dataset.
[0207]
[0208] Table 2. Shared land cover types and sample numbers in the RPaviaC-DPaviaU dataset.
[0209]
[0210] Table 3. Shared land cover types and their sample numbers in the Houston2018-Houston2013 dataset.
[0211]
[0212] To simulate the small sample size problem faced in hyperspectral image classification, this method randomly selects 50 labeled samples from each land cover category in the source domain and 5 labeled samples from each land cover category in the target domain as the training set for experiments. The remaining labeled samples from the target domain form the test set. The single-domain classification method uses only the target domain data (a dataset with a small number of labeled samples) as the training set. To achieve joint training of the source domain (a dataset with many labeled samples) and the target domain, the training samples from the source and target domains are matched one-to-one according to the real land cover category labels, resulting in 250 training sample pairs for each real land cover category. To avoid experimental randomness, the final experimental results are obtained by averaging ten independent random sampling experiments. Meanwhile, three evaluation metrics—Overall Accuracy (OA), Average Accuracy (AA), and Kappa Coefficient (Kappa)—are used to measure model performance, and their calculation formulas are shown below:
[0213] Overall classification accuracy, including:
[0214] ;
[0215] Average classification accuracy, including:
[0216] ;
[0217] Kappa coefficient, including:
[0218] ;in, Indicates the total number of categories. The actual category in the confusion matrix is But it was predicted as a category The number of samples, For the first The sum of rows (actual category is) (total number of samples) For the first The sum of the columns (predicted as categories) (total number of samples) This represents the total number of test samples.
[0219] The comparison results of this method with other existing hyperspectral image classification algorithms on different datasets are shown in Tables 4, 5, and 6, respectively.
[0220] Table 4. Comparative experimental results on the RPiviaU-DPaviaC dataset.
[0221]
[0222] Table 5. Comparative experimental results on the RPaviaC-DPPaviaU dataset.
[0223]
[0224] Table 6. Comparative experimental results on the Houston2018-Houston2013 datasets.
[0225]
[0226] As can be seen, this method can guarantee higher classification accuracy with only a small number of training samples. Furthermore, compared to semi-supervised classification methods based on pseudo-label assignment (AGM-ST), this method can avoid the impact of pseudo-label noise on classification accuracy through prediction consistency.
[0227] This invention provides a model training device for image classification. Figure 6 A schematic diagram of a model training device for image classification provided in an embodiment of the present invention. The model training device for image classification includes:
[0228] The data acquisition unit 60 is used to acquire labeled training samples and unlabeled training samples constructed from the source domain dataset and the target domain dataset;
[0229] The feature extraction unit 61 is used to extract features from the labeled training samples and the unlabeled training samples based on the feature extraction module of the convolutional neural network model and combined with the adaptive mask vector, so as to obtain the domain-invariant features and domain-specific features of the source domain dataset, the domain-invariant features and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples.
[0230] The feature mapping unit 62 is used to input the domain-invariant features of the source domain dataset, the domain-invariant features of the target domain dataset, and the domain-invariant features of the unlabeled training samples into the bidirectional reversible mapping module of the convolutional neural network model to perform spatial feature mapping, so as to obtain the domain-invariant features of the source domain, the domain-invariant features of the target domain, and the domain-invariant features of the unlabeled training samples after mapping.
[0231] The total loss function construction unit 63 is used to construct the total loss function of the convolutional neural network model based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples.
[0232] The model training unit 64 is used to train the model with land cover classification as the model training task and optimize the model parameters with minimizing the total loss function as the training objective, so as to obtain a trained convolutional neural network model for image classification.
[0233] In this exemplary embodiment, the image classification unit 65 is used to perform land cover category classification on the image to be classified based on the trained convolutional neural network model to obtain the land cover category classification information of the image to be classified.
[0234] In this exemplary embodiment, a cross-scene hyperspectral image classification problem is solved in a remote sensing image classification application scenario. First, two datasets are constructed: a source domain dataset and a target domain dataset. The source domain dataset consists of hyperspectral images of the target area acquired by a first image acquisition device (such as a ROSIS sensor), with a sufficient number of land cover category labels for each pixel (e.g., 50 samples per category). The target domain dataset consists of hyperspectral images of the target area acquired by a second image acquisition device (such as a DAIS sensor), with only a small number of land cover category labels for each pixel (e.g., 5 samples per category). Simultaneously, a large number of unlabeled hyperspectral images of the target area acquired by the second image acquisition device are used as unlabeled training samples.
[0235] In this exemplary embodiment, a convolutional neural network model is constructed, which includes components such as a feature extraction module, a mask vector, and a bidirectional invertible mapping module. During model training, labeled source and target domain training samples, as well as unlabeled training samples, are first input into the feature extraction module. Features are extracted using the mask vector from the model training, yielding domain-invariant and domain-specific features of the source domain dataset, the target domain dataset, and the domain-invariant features of the unlabeled training samples. Among these, the domain-invariant features are sensitive to land cover category information, while the domain-specific features are sensitive to domain information.
[0236] Next, the extracted source domain invariant features, target domain invariant features, and unlabeled training sample domain invariant features are input into the bidirectional invertible mapping module for spatial feature mapping, resulting in mapped source domain invariant features, target domain invariant features, and unlabeled training sample domain invariant features. This mapping process enables the mutual conversion between the source and target domain feature spaces.
[0237] Based on all the aforementioned features, mask vectors, and mapped features, a total loss function for model training is constructed. The model is trained to classify land cover categories using source domain invariant features, mapped source domain invariant features, target domain invariant features, mapped target domain invariant features, unlabeled training sample domain invariant features, and mapped unlabeled training sample domain invariant features. The model parameters are optimized with the goal of minimizing the total loss function, ultimately resulting in the trained convolutional neural network model.
[0238] In practical applications, when it is necessary to identify land cover categories in new hyperspectral images to be classified, the image can be input into a trained model to quickly and accurately obtain the land cover category classification information corresponding to each pixel, such as trees, grassland, asphalt, soil, etc.
[0239] In this exemplary embodiment, constructing multi-source training data of labeled and unlabeled samples in the source and target domains helps increase the number of labeled hyperspectral image samples, enabling the model to fully utilize both limited labeled data and abundant unlabeled data. Simultaneously, using mask vectors for feature deentanglement effectively separates domain-invariant and domain-specific features, reducing interference from land cover category-independent information on feature alignment and mitigating negative transfer. A bidirectional reversible mapping module is introduced to construct mutual transformations between the source and target domain feature spaces. By preserving the original feature spaces of both the source and target domains and establishing a reversible transformation relationship between the two spaces rather than forced merging, the original topological structure and discrimination boundaries of the data are fully preserved. Furthermore, reversibility ensures that information is not lost during the mapping process, fundamentally solving the problem of loss of discrimination information caused by forcibly mapping source and target domain features to a single shared feature space. This, in turn, improves the training effect of the model for hyperspectral image classification.
[0240] Since the systems / devices described in the above embodiments of the present invention are systems / devices used to implement the methods of the above embodiments of the present invention, those skilled in the art can understand the specific structure and modifications of the systems / devices based on the methods described in the above embodiments of the present invention, and therefore will not be repeated here. All systems / devices used in the methods of the above embodiments of the present invention fall within the scope of protection of the present invention.
[0241] This invention provides a computer-readable storage medium storing an image classification program thereon. When the image classification program is executed by a processor, it implements the model training method for image classification described in the above embodiments.
[0242] This invention provides an electronic device, including a memory, a processor, and an image classification program stored in the memory and executable on the processor. When the processor executes the image classification program, it implements the model training method for image classification described in the above embodiments.
[0243] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0244] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0245] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0246] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A model training method for image classification, characterized in that, include: Obtain labeled and unlabeled training samples constructed from the source domain dataset and the target domain dataset; Based on the feature extraction module of the convolutional neural network model and combined with the adaptive mask vector, features are extracted from the labeled training samples and the unlabeled training samples to obtain the domain-invariant features and domain-specific features of the source domain dataset, the domain-invariant features and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples. The domain-invariant features of the source domain dataset, the domain-invariant features of the target domain dataset, and the domain-invariant features of the unlabeled training samples are input into the bidirectional invertible mapping module of the convolutional neural network model to perform spatial feature mapping, thereby obtaining the domain-invariant features of the source domain, the domain-invariant features of the target domain, and the domain-invariant features of the unlabeled training samples after mapping. Based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples, the total loss function of the convolutional neural network model is constructed. Using land cover classification as the model training task and minimizing the total loss function as the training objective, the model parameters are optimized to obtain a trained convolutional neural network model for image classification.
2. The model training method for image classification according to claim 1, characterized in that, The step of inputting the domain-invariant features of the source domain dataset, the target domain dataset, and the unlabeled training samples into the bidirectional invertible mapping module of the convolutional neural network model for spatial feature mapping to obtain the mapped domain-invariant features of the source domain, the target domain, and the unlabeled training samples includes: The domain-invariant features of the source domain dataset are input forward into the bidirectional invertible mapping module to obtain the domain-invariant features of the source domain after mapping. The domain-invariant features of the target domain dataset are input in reverse to the bidirectional invertible mapping module to obtain the domain-invariant features of the target domain after mapping. The domain-invariant features of the unlabeled training samples are input in reverse to the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped unlabeled training samples.
3. The model training method for image classification according to claim 2, characterized in that, The step of inputting the domain-invariant features of the source domain dataset in a forward direction into the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped source domain includes: Based on the bidirectional invertible mapping module, the domain-invariant features of the source domain dataset are divided into a first part of features and a second part of features with the same dimension. Based on the first linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the source domain to the target domain feature space to obtain the first part of the source domain domain-invariant features after mapping. Based on the second linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the source domain to the target domain feature space to obtain the second part of the source domain domain-invariant features after mapping. By concatenating the first part of the domain-invariant features of the mapped source domain and the second part of the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped source domain are obtained.
4. The model training method for image classification according to claim 2, characterized in that, The step of inputting the domain-invariant features of the target domain dataset in reverse to the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped target domain includes: Based on the bidirectional invertible mapping module, the domain-invariant features of the target domain dataset are divided into a first part of features and a second part of features with the same dimension. Based on the first linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the first part of the target domain domain invariant features after mapping. Based on the second linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the second part of the target domain domain-invariant features after mapping. By concatenating the first part of the domain-invariant features of the mapped target domain and the second part of the domain-invariant features of the mapped target domain, the domain-invariant features of the mapped target domain are obtained.
5. The model training method for image classification according to claim 2, characterized in that, The step of inverting the domain-invariant features of the unlabeled training samples into the bidirectional invertible mapping module to obtain the domain-invariant features of the mapped unlabeled training samples includes: Based on the bidirectional invertible mapping module, the domain-invariant features of the unlabeled training samples are divided into a first part of features and a second part of features with the same dimension. Based on the first linear layer mapping function of the bidirectional reversible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the first part of the domain-invariant features of the unlabeled training samples after mapping. Based on the second linear layer mapping function of the bidirectional invertible mapping module, the first part of the features and the second part of the features are mapped from the target domain to the source domain feature space to obtain the second part of the domain-invariant features of the unlabeled training sample after mapping. By concatenating the first part of the domain-invariant features of the mapped unlabeled training sample and the second part of the domain-invariant features of the mapped unlabeled training sample, the domain-invariant features of the mapped unlabeled training sample are obtained.
6. The model training method for image classification according to claim 1, characterized in that, The feature extraction module based on the convolutional neural network model, combined with an adaptive mask vector, extracts features from the labeled training samples and the unlabeled training samples to obtain domain-invariant and domain-specific features of the source domain dataset, domain-invariant and domain-specific features of the target domain dataset, and domain-invariant features of the unlabeled training samples, including: The feature extraction module based on the convolutional neural network model extracts the original features of the labeled training samples and the unlabeled samples to obtain the original features of the source domain dataset, the original features of the target domain dataset, and the original features of the unlabeled samples. Based on the mask vector trained by the convolutional neural network model and the complementary term corresponding to the mask vector, the original features of the source domain dataset, the original features of the target domain dataset, and the original features of the unlabeled training samples are multiplied element-wise to obtain the domain-invariant features and domain-specific features of the source domain dataset, the domain-invariant features and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples.
7. The model training method for image classification according to claim 6, characterized in that, The mask vector trained based on the convolutional neural network model and its corresponding complementary term are used to perform element-wise multiplication on the original features of the source domain dataset, the original features of the target domain dataset, and the original features of the unlabeled training samples to obtain the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples, including: Based on the first adaptive mask vector, the original features of the source domain dataset are multiplied element-wise to obtain the domain-invariant features of the source domain dataset. Based on the complementary term corresponding to the first adaptive mask vector, the original features of the source domain dataset are multiplied element-wise to obtain the domain-specific features of the source domain dataset. Based on the second adaptive mask vector, the original features of the target domain dataset are multiplied element-wise to obtain the domain-invariant features of the target domain dataset; Based on the complementary term corresponding to the second adaptive mask vector, the original features of the target domain dataset are multiplied element-wise to obtain the domain-specific features of the target domain dataset; Based on the second adaptive mask vector, the original features of the unlabeled training samples are multiplied element-wise to obtain the domain-invariant features of the unlabeled training samples.
8. The model training method for image classification according to claim 7, characterized in that, The total loss function of the convolutional neural network model is constructed based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples. Based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples, a feature combination is formed by at least two of these features to construct the classification loss, domain discrimination loss, sparsity consistency loss, cross-domain mapping loss from the source domain to the target domain feature space, cross-domain mapping loss from the target domain to the source domain feature space, and prediction consistency loss for unlabeled data of the convolutional neural network model. Based on the classification loss, the domain discrimination loss, the sparsity consistency loss, the cross-domain mapping loss from the source domain to the target domain feature space, the cross-domain mapping loss from the target domain to the source domain feature space, and the prediction consistency loss of the unlabeled data, a total loss function for the convolutional neural network model is constructed.
9. The model training method for image classification according to claim 1, characterized in that, include: Construct an overall classification accuracy evaluation index, an average classification accuracy evaluation index, and a Kappa coefficient evaluation index; The performance of the trained convolutional neural network model is evaluated based on the overall classification accuracy evaluation index, the average classification accuracy evaluation index, and the Kappa coefficient evaluation index.
10. A model training device for image classification, characterized in that, include: The data acquisition unit is used to acquire labeled training samples and unlabeled training samples constructed from the source domain dataset and the target domain dataset; The feature extraction unit is used to extract features from the labeled training samples and the unlabeled training samples based on the feature extraction module of the convolutional neural network model and combined with the adaptive mask vector, so as to obtain the domain-invariant features and domain-specific features of the source domain dataset, the domain-invariant features and domain-specific features of the target domain dataset, and the domain-invariant features of the unlabeled training samples. The feature mapping unit is used to input the domain-invariant features of the source domain dataset, the domain-invariant features of the target domain dataset, and the domain-invariant features of the unlabeled training samples into the bidirectional invertible mapping module of the convolutional neural network model to perform spatial feature mapping, so as to obtain the domain-invariant features of the source domain, the domain-invariant features of the target domain, and the domain-invariant features of the unlabeled training samples after mapping. The total loss function construction unit is used to construct the total loss function of the convolutional neural network model based on the domain-invariant and domain-specific features of the source domain dataset, the domain-invariant and domain-specific features of the target domain dataset, the domain-invariant features of the unlabeled training samples, the mask vector, the domain-invariant features of the mapped source domain, the domain-invariant features of the mapped target domain, and the domain-invariant features of the mapped unlabeled training samples. The model training unit is used to train the model by classifying land cover categories and optimize the model parameters with the goal of minimizing the total loss function, so as to obtain a trained convolutional neural network model for image classification.