A Training Method for SAR Image Domain Adaptive Dynamic Optimization of Feature Classification Model
By using preference vectors to guide the optimization process in the SAR image domain adaptive dynamic optimization geographic classification model, the problem of insufficient labeling data in the SAR image domain classification is solved, and high-precision unsupervised geographic classification is achieved.
Patent Information
- Application Number
- CN202210795908.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-07
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-07-07
AI Technical Summary
Deep learning networks require a large amount of labeling data in SAR image geometry classification, but SAR image samples are difficult and costly, resulting in serious shortage of labeling and difficult to reach the scale of labeling samples in the natural image field.
The SAR image domain adaptive dynamic optimization geometry classification model training method is adopted to dynamically guide the optimization process from the perspective of multi-objective optimization, so as to find the Pareto optimal solution located at the Pareto front end of the preference vector control under unsupervised domain adaptation conditions.
The accuracy of unsupervised domain adaptive SAR images is significantly improved, and the original prior knowledge is better preserved through the selection of preference vectors [1, 1].
Smart Images

Figure CN115359361B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and particularly relates to a method for training a ground object classification model with SAR image domain adaptive dynamic optimization. Background Art
[0002] Polarimetric SAR (Synthetic Aperture Radar) is a high-resolution active coherent multi-channel microwave remote sensing imaging radar, which is an important part of SAR. It has the advantages of all-weather, all-day, high resolution, side-looking imaging, etc., and is widely used in many fields such as military, agriculture, navigation, land use, and geographical surveillance. Ground object classification of SAR images is a type of SAR image classification. In recent years, due to the powerful feature extraction ability and image processing ability of deep learning, implementing ground object classification of SAR images by combining deep learning has become a research focus in the field of SAR images. However, deep learning networks often require a large amount of labeled data. The annotation of SAR image samples is difficult and costly, and the number of annotations is seriously insufficient, making it difficult to reach the same level of labeled sample magnitude as in the field of natural images.
[0003] To solve the above problems, it is necessary to perform feature transfer on SAR images with different radars and different resolutions to reduce the distance of their feature distributions, which is exactly the research content of unsupervised domain adaptation methods. Unsupervised domain adaptation methods aim to achieve information transfer from a labeled source domain dataset to an unlabeled target domain dataset, and find a general classification feature extraction method between different domains, which are mainly divided into methods based on domain distribution differences, methods based on adversarial learning, methods based on reconstruction, and methods based on sample generation.
[0004] AdaptSegNet is a domain adaptation method based on adversarial learning, which includes two modules: a segmentation network (generator) and a discriminator. During the network training process, since the optimization goal is to make the segmentation results of the source domain and the target domain as similar as possible, the prediction results of the source domain and the target domain are used as the input of the discriminator, and the discriminator is used to distinguish whether the input comes from the source domain or the target domain. The network propagates the gradient of the discriminator to the generator through the adversarial loss of the target prediction, so as to promote the generator to generate a segmentation distribution similar to the source prediction in the target domain.
[0005] However, AdaptSegNet adopts the idea of confrontation, and the optimization goal includes not only the segmentation loss but also the adversarial loss. This algorithm linearly combines the training objectives (segmentation loss and adversarial loss) into an overall objective using weight hyperparameters during training. Due to the domain transfer, the gradient directions of these objectives may conflict with each other. In this case, the linear optimization scheme may reduce the overall objective value at the cost of destroying one of the training objectives, and finally reach a Pareto optimal solution, and can only reach the convex part of the Pareto front. Summary of the Invention
[0006] In order to solve the above problems existing in the prior art, the present invention provides a method for training a SAR image domain adaptive dynamic optimization ground object classification model. The technical problems to be solved by the present invention are realized through the following technical solutions:
[0007] The present invention provides a method for training a SAR image domain adaptive dynamic optimization ground object classification model, including:
[0008] After obtaining the labeled source domain SAR images and the unlabeled target domain SAR images, generating source domain training samples according to the source domain SAR images and the labels corresponding to the source domain SAR images, and generating target domain training samples according to the target domain SAR images;
[0009] Initializing a segmentation network and a discriminator network to obtain a first model to be trained;
[0010] Inputting the source domain training samples and the target domain training samples into the first model to be trained, and determining a first loss value according to a preset loss function;
[0011] Updating the network parameters of the segmentation network in the first model to be trained through backpropagation according to the first loss value and the gradient of the preset loss function to obtain a second model to be trained;
[0012] Determining a dynamic optimization module according to the first loss value, a preference vector, the number of tasks of the first model to be trained, and the number of parameters of the segmentation network, and calculating a dynamic optimization coefficient by using the dynamic optimization module;
[0013] Inputting the source domain training samples and the target domain training samples into the second model to be trained, and determining a second loss value according to the preset loss function; wherein, the preset loss function includes loss functions of different tasks, and the second loss value includes loss values corresponding to different tasks;
[0014] Adjusting the network parameters of the second model to be trained by using the dynamic optimization coefficient, the loss values corresponding to different tasks, and the gradients of the loss functions of different tasks;
[0015] Judging whether the number of iterations reaches a preset value; if so, determining the segmentation network in the adjusted second model to be trained as the ground object classification model; if not, determining the adjusted second model to be trained as the first model to be trained, and executing the step of inputting the source domain training samples and the target domain training samples into the first model to be trained and determining a first loss value according to the preset loss function.
[0016] In one embodiment of the present invention, after obtaining the labeled source domain SAR images and the unlabeled target domain SAR images, the steps of generating source domain training samples according to the source domain SAR images and the labels corresponding to the source domain SAR images, and generating target domain training samples according to the target domain SAR images include:
[0017] Obtain the labeled source domain SAR images and the unlabeled target domain SAR images;
[0018] Cut each source domain SAR image and its corresponding label into small pieces of 512×512 to obtain source domain cut small images and the labels corresponding to each source domain cut small image, and obtain source domain training samples;
[0019] Cut each target domain SAR image into small pieces of 512×512 to obtain target domain cut small images, and obtain target domain training samples.
[0020] In one embodiment of the present invention, the preference vector is [1, 1].
[0021] In one embodiment of the present invention, the preset loss function is:
[0022]
[0023] where I s represents the source domain training samples, I t represents the target domain training samples, L seg represents the loss value of the source domain segmentation task, L adv represents the loss value of the target domain adversarial task, L(I s ,I t ) is the calculated loss value, and [k1, k2] represents the preference vector.
[0024] In one embodiment of the present invention, the dynamic optimization coefficient is calculated according to the following formula:
[0025]
[0026]
[0027]
[0028] In the formula, is the indicator function, it is 1 when it is 0 when a represents the loss adjustment weight, β represents the candidate value of the dynamic optimization coefficient that satisfies the constraint condition and β∈S m , c j =G T gj , where g j represents the gradient of the preset loss function, G = [g1, …, g m , m is the number of tasks, and r j represents the component of the preference vector, represents the value of the loss function, and β * is the calculated dynamic optimization coefficient.
[0029] In an embodiment of the present invention, the step of adjusting the network parameters of the second model to be trained by using the dynamic optimization coefficient, the loss values corresponding to different tasks, and the gradients of the loss functions of different tasks includes:
[0030] Using the dynamic optimization coefficient, performing weighted summation on the gradients of the segmentation task loss function and the adversarial task loss function according to the loss value of the segmentation task and the loss value of the adversarial task, and adjusting the network parameters of the segmentation network and the discriminator network in the second model to be trained through backpropagation.
[0031] In an embodiment of the present invention, after the step of determining whether the number of iterations reaches a preset value, the following steps are further included:
[0032] Calculating the evaluation index of the ground object classification model obtained in the current iteration every fixed number of iterations.
[0033] In an embodiment of the present invention, when the number of iterations reaches the preset value, after the step of determining the segmentation network in the adjusted second model to be trained as the ground object classification model, the following steps are further included:
[0034] Obtaining the labels of each target domain SAR image and the target domain patch sub-images obtained by segmenting each target domain SAR image;
[0035] Inputting the target domain patch sub-images into the ground object classification model to obtain the local prediction results of each target domain patch sub-image;
[0036] Stitching the prediction results to obtain the overall prediction result of the target domain SAR image;
[0037] Calculating the evaluation index of the ground object classification model according to the overall prediction result and the labels of each target domain SAR image.
[0038] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0039] The present invention provides a method for training a SAR image domain adaptive dynamic optimization ground object classification model. From the perspective of multi-objective optimization, a preference vector is used to dynamically guide the optimization process, so as to find the Pareto optimal solution located on the Pareto front controlled by the preference vector, significantly improving the accuracy of unsupervised domain adaptive SAR image ground object classification.
[0040] In addition, the preference vector in the present invention is [1, 1], which is beneficial to better retain the original prior knowledge.
[0041] The following will further elaborate on the present invention in conjunction with the drawings and embodiments. Description of the Drawings
[0042] Figure 1 is a flowchart of a method for training a SAR image domain adaptive dynamic optimization ground object classification model provided by an embodiment of the present invention;
[0043] Figure 2 is a polarimetric SAR image provided by an embodiment of the present invention;
[0044] Figure 3 is a reference map of the ground object distribution of the polarimetric SAR image provided by an embodiment of the present invention;
[0045] Figure 4 is a classification result map provided by an embodiment of the present invention;
[0046] Figure 5 is another classification result map provided by an embodiment of the present invention. Detailed Embodiments
[0047] The following further describes the present invention in detail in conjunction with specific embodiments, but the implementation manners of the present invention are not limited thereto.
[0048] Figure 1 is a flowchart of a method for training a SAR image domain adaptive dynamic optimization ground object classification model provided by an embodiment of the present invention. Please refer to Figure 1 , an embodiment of the present invention provides a method for training a SAR image domain adaptive dynamic optimization ground object classification model, including:
[0049] S1. After obtaining the labeled source domain SAR images and the unlabeled target domain SAR images, generate source domain training samples according to the source domain SAR images and the corresponding labels of the source domain SAR images, and generate target domain training samples according to the target domain SAR images;
[0050] S2. Initialize the segmentation network and the discriminator network to obtain the first model to be trained;
[0051] S3. Input the source domain training samples and the target domain training samples into the first model to be trained, and determine the first loss value according to the preset loss function;
[0052] S4. Update the network parameters of the segmentation network in the first model to be trained through backpropagation according to the first loss value and the gradient of the preset loss function, and obtain the second model to be trained;
[0053] S5. Determine the dynamic optimization module according to the first loss value, the preference vector, the number of tasks of the first model to be trained, and the number of parameters of the segmentation network, and calculate the dynamic optimization coefficient by using the dynamic optimization module;
[0054] S6. Input the source domain training samples and the target domain training samples into the second model to be trained, and determine the second loss value according to the preset loss function; wherein, the preset loss function includes the loss functions of different tasks, and the second loss value includes the loss values corresponding to different tasks;
[0055] S7. Adjust the network parameters of the second model to be trained by using the dynamic optimization coefficient, the loss values corresponding to different tasks, and the gradients of the loss functions of different tasks;
[0056] S8. Determine whether the number of iterations reaches the preset value;
[0057] S9. If so, determine the segmentation network in the adjusted second model to be trained as the ground object classification model; if not, determine the adjusted second model to be trained as the first model to be trained, and return to step S3 to execute the step of inputting the source domain training samples and the target domain training samples into the first model to be trained and determining the first loss value according to the preset loss function.
[0058] It should be understood that there are two concepts in domain adaptation: the source domain and the target domain. Among them, there is rich supervised learning information in the source domain. During the model training process, both the source domain data and its labels participate in the training, while the target domain represents the domain where the test set is located, usually without labels or only containing a small number of labels.
[0059] In step S2, the initialized segmentation network adopts the DeepLab-v2 framework. In this framework, the ResNet-101 model pre-trained on ImageNet is used for feature extraction. The last classification layer is removed, and the stride of the last two convolutional layers is modified from 2 to 1, so that the resolution of the output feature map reaches 1 / 8 of the input image size. To expand the receptive field, dilated convolutional layers with strides of 2 and 4 are used in the fourth and fifth convolutional layers respectively. After the last convolutional layer, ASPP (Atrous Spatial Pyramid Pooling) is used as the classifier. Finally, an upsampling layer is applied while outputting the softmax of the flexible maximization to match the size of the input image.
[0060] Furthermore, the initialized discriminator network uses a structure similar to DCGAN, but all fully convolutional layers are used to retain spatial information. Specifically, the network consists of 5 convolutional layers with a convolutional kernel size of 4×4, a stride of 2, and the number of channels being {64, 128, 256, 512, 1}. Except for the last convolutional layer, a Leaky ReLU function (Leaky Rectified Linear Unit) with a parameter of 0.2 is connected behind each convolutional layer. Since a small batch size of the segmentation network is used to jointly train the discriminator, there is no need to use any batch normalization layer.
[0061] In step S2, the initialization of the segmentation network and the discriminator network includes initializing the network parameters and calculating the number of parameters of the segmentation network.
[0062] Optionally, after obtaining the labeled source domain SAR images and the unlabeled target domain SAR images, the steps of generating source domain training samples according to the source domain SAR images and the labels corresponding to the source domain SAR images, and generating target domain training samples according to the target domain SAR images include:
[0063] Obtain the labeled source domain SAR images and the unlabeled target domain SAR images;
[0064] Cut each source domain SAR image and its corresponding label into small pieces of 512×512 to obtain source domain cut small images and the labels corresponding to each source domain cut small image, and obtain source domain training samples;
[0065] Cut each target domain SAR image into small pieces of 512×512 to obtain target domain cut small images, and obtain target domain training samples.
[0066] Optionally, for the above SAR image domain adaptive dynamic optimization ground object classification model training method, the preference vector is [1, 1].
[0067] Optionally, the preset loss function is:
[0068]
[0069] where I s represents the source domain training samples, and I t represents the target domain training samples, L seg represents the loss value of the source domain segmentation task, and L adv represents the loss value of the target domain adversarial task, and L(I s , I t ) is the calculated loss value, and [k1, k2] represents the preference vector.
[0070] In this embodiment, since the domain adaptive semantic segmentation algorithm AdaptSegNet based on adversarial training is used as the basic framework, the loss function of the first model to be trained can be expressed as:
[0071]
[0072] where I s represents the source domain training samples, and I t represents the target domain training samples, L seg represents the loss value of the source domain segmentation task, that is, the cross-entropy loss calculated using the source domain labels, and L adv represents the loss value of the target domain adversarial task, that is, adversarial training is performed in the output / feature space of the segmentation network, and the parameters of the segmentation network are shared.
[0073] Although performing adversarial learning in the output space can directly adapt the prediction, since the low-level features are quite different from the output, they may not be well adapted. In view of this, AdaptSegNet adds an additional adversarial module in the low-level feature space to enhance the adaptive ability of the model. Specifically, the last layer and the penultimate layer of ResNet can be selected for multi-level adaptation. Therefore, i in (1) represents the level used to predict the segmentation output. is the weight coefficient used to balance the segmentation loss value and the adversarial loss value.
[0074] It can be seen from (1) that there are four loss functions to be optimized in the segmentation network. Due to the use of multi-level output, there are essentially two loss functions: the source domain segmentation loss and the inter-domain adversarial loss. The EPO method can find the exact Pareto optimal solution of multi-task learning according to the preference vector (that is, the weighted coefficient before different optimization objectives set according to the preference prior). Further, the segmentation loss and the adversarial loss in (1) are regarded as different tasks, and EPO is introduced into the domain adaptive semantic segmentation framework based on adversarial learning, so as to find the exact Pareto optimal solution controlled by the preference vector.
[0075] For the loss function in (1), in fact, linear scalar weighting is adopted at two levels. One is different levels of the same task, and the other is different tasks. To analyze its weighting coefficients more clearly, (1) is specified as (2) as follows:
[0076]
[0077] For different levels of the same task (i.e., two-level segmentation loss and two-level adversarial loss), the linear scalar weighting is retained. For the linear weighting between different tasks, dynamic optimization guided by a preference vector is adopted. Since the linear weighting coefficients of the segmentation task and the adversarial task in the original formula are both 1, in order to better retain the original prior knowledge, [1, 1] is selected as the preference vector to guide the dynamic optimization process.
[0078] In the above step S5, the dynamic optimization module is determined according to three parameters: the number of tasks, the number of parameters of the segmentation network, and the preference vector. Among them, the tasks include the segmentation task and the adversarial task, so the number of tasks is 2. The role of the dynamic optimization module is to calculate the dynamic weighting coefficients corresponding to different loss functions in each iteration of network training. That is to say, although [1, 1] is selected as the preference vector, the weighting coefficients before the gradients backpropagated by the loss functions of different tasks change during the network iteration, so that the exact Pareto optimal solution under the control of the preference vector can be finally obtained.
[0079] Optionally, the dynamic optimization coefficient is calculated according to the following formula:
[0080]
[0081]
[0082]
[0083] In the formula, is an indicator function, it is 1 when and 0 when a represents the loss adjustment weight, β represents the candidate value of the dynamic optimization coefficient that satisfies the constraint condition and β ∈ Sm, c j = G T g j where g j represents the gradient of the preset loss function, G = [g1,..., g m , m is the number of tasks, r j represents the component of the preference vector, represents the value of the loss function, and β * is the calculated dynamic optimization coefficient.
[0084] In the above method for training a ground object classification model with domain adaptive dynamic optimization for SAR images, the solution of the dynamic optimization coefficient requires the use of different task loss functions and their gradients after one-step optimization, and in the solution of the dynamic optimization coefficient, the shared parameters of the segmentation network are used. Therefore, in the process of one-step optimization, it is not necessary to update the gradients of the discriminator network.
[0085] The solution process of the dynamic optimization coefficient is described in detail below.
[0086] (1) First, parameter initialization: preference vector The step size is η, and a Pareto optimal solution that satisfies the preference vector r belongs to the following set:
[0087]
[0088] Among them, For any EPO solution is a point on the Pareto front that intersects with the ray . r⊙l is proportional to , where ⊙ is the element-wise product operator.
[0089] (2) Calculate the loss value and the gradient of the loss function G = [g1,..., g m , c j = G T g j , C = [c1,..., c m .
[0090] (3) Calculate the non-uniformity μ r (l t ). To find the EPO solution, not only the descending direction along the Pareto front needs to be found, but also the condition in (3) needs to be satisfied. To achieve the latter, for any point θ in the solution space , the non-uniformity of its objective value with respect to a given preference vector r is defined as:
[0091]
[0092] Among them, is weighted normalization:
[0093]
[0094] (4) Loss adjustment a. For the above uniformity, first find a direction such that when moving along this direction, the non-uniformity of the new solution is less than that of the starting point θ.
[0095] Construct the required "balanced" direction using a linear combination of m known gradients:
[0096]
[0097] where the weight a j is the relative deviation corresponding to the overall non-uniformity μ r (l), which is called the adjustment:
[0098]
[0099] It can be shown that d bal ensures a reduction in non-uniformity. The adjustment a j is non-negative for some objectives and negative for others. Unless all r j l j are equal, there will always be some objectives for which the gradient term in d bal is negative.
[0100] (5) Let be the index set of all gradients in the positive half-plane of d bal , and be the index set of gradients in the negative half-plane of d bal . If moving to a new solution bal using d then for some step size η0, we have:
[0101]
[0102]
[0103] For when using d bal to update θ t , gradient descent occurs for the objectives in J, while gradient ascent occurs for the objectives in
[0104] (6) Solve the EPO solution β * of the linear programming problem.
[0105] Now seek a direction such that when moving from one solution θ t to another solution θ t+1 , θ t+1 can dominate or achieve a better uniformity (μ r (l t+1 ) ≤ μ r (l t ), or both. Solve this problem through linear programming. Given that a descent direction in m will be towards the Pareto front, then d = Gβ, β ∈ S bal ; and moving in the reverse direction along the direction that forms a positive angle with d
[0106] Combining these two requirements, to find the direction in bal that has the largest angle with d
[0107] d T d bal = β T G T Ga = β T Ca (5)
[0108] Once the uniformity is achieved, that is, when μ r (l t ) = 0 or the multi-objective value of the current iteration lies on the r -1 ray, the "pure descent" mode can be entered. At this time, it can be achieved by finding a direction in whose sum of inner products with all gradients is the largest. Therefore, maximize
[0109]
[0110] Combining (5) and (6), the dynamic optimization coefficient can be obtained:
[0111]
[0112]
[0113]
[0114] where is the indicator function, it is 1 when and 0 when
[0115] (7) Solve the linear programming in (7) to obtain the final non-dominated direction d nd = Gβ * .
[0116] (8) Output: θ t+1 = θ t - ηd nd .
[0117] Exemplarily, the second loss value includes the loss value of the segmentation task and the loss value of the adversarial task;
[0118] In the above step S7, the step of adjusting the network parameters of the second model to be trained by using the dynamic optimization coefficient, the loss values corresponding to different tasks, and the gradients of the loss functions of different tasks includes:
[0119] Using the dynamic optimization coefficient, according to the loss value of the segmentation task and the loss value of the adversarial task, perform weighted summation on the gradients of the segmentation task loss function and the adversarial task loss function, and adjust the network parameters of the segmentation network and the discriminator network in the second model to be trained through backpropagation.
[0120] In this embodiment, conventional optimization steps are adopted to adjust the network parameters of the segmentation network and the discriminator network, and the dynamic optimization coefficient is used to perform weighted summation on the gradients of the loss functions of different tasks, and then backpropagation is performed.
[0121] In this embodiment, after the step of determining the segmentation network in the adjusted second model to be trained as the ground object classification model when the number of iterations reaches the preset value, it further includes:
[0122] Obtain the labels of each target domain SAR image and the target domain patch sub-images obtained by splitting each target domain SAR image;
[0123] Input the target domain patch sub-images into the ground object classification model to obtain the local prediction results of each target domain patch sub-image;
[0124] Stitch the prediction results to obtain the overall prediction result of the target domain SAR image;
[0125] According to the overall prediction result and the labels of each target domain SAR image, calculate the evaluation index of this ground object classification model.
[0126] Exemplarily, the evaluation indexes include: OA (Overall Accuracy) and MIoU (Mean Intersection over Union), etc.
[0127] Optionally, after the step of determining whether the number of iterations reaches the preset value, it further includes:
[0128] Every fixed number of iterations, calculate the evaluation index of the ground object classification model obtained in this iteration process.
[0129] It should be noted that during the training process, the evaluation metrics of the ground object classification model can be calculated at fixed iteration intervals, and then the best ground object classification model can be selected. For example, the evaluation metrics are calculated every 2000 iterations. If the evaluation metric result of the ground object classification model in the 4000th generation is worse than that in the 2000th generation, the ground object classification model in the 4000th generation is not saved, and the evaluation metric result of the ground object classification model in the 6000th generation is continued to be compared with that in the 2000th generation... and then the best ground object classification model is selected.
[0130] The above SAR image domain adaptive dynamic optimization method for training a ground object classification model will be further described through simulation experiments below.
[0131] In the simulation experiment, the source domain image with a size of 10240×9216 and a resolution of 1m and the target domain image with a size of 9728×7680 and a resolution of 1m are cut into small patches of 512×512, obtaining 360 source domain training samples and 285 target domain samples; at the same time, the target domain image is cut into 744 small images of 512×512 as the test set by using different cutting methods.
[0132] Figure 2 is the polarimetric SAR image provided by the embodiment of the present invention, Figure 3 is the reference map of the ground object distribution of the polarimetric SAR image provided by the embodiment of the present invention, Figures 4-5 is the classification result map provided by the embodiment of the present invention. Further, OA, kappa coefficient, MIoU, and FWIoU are selected as evaluation metrics, and the evaluation results are shown in Table 1:
[0133] Table 1
[0134]
[0135] Please refer to Figures 2-5 and Table 1. The ground object classification model obtained by using the SAR image domain adaptive dynamic optimization method for training a ground object classification model provided by the present invention can obtain better classification results compared with the existing AdaptSegNet, and there are significant improvements to varying degrees in the evaluation metrics of OA, kappa coefficient, MIoU, and FWIoU.
[0136] As can be seen from the above embodiments, the beneficial effects of the present invention are as follows:
[0137] The present invention provides a method for training a ground object classification model with SAR image domain adaptive dynamic optimization. From the perspective of multi-objective optimization, a preference vector is used to dynamically guide the optimization process, so as to find the Pareto optimal solution located on the Pareto front controlled by the preference vector, significantly improving the accuracy of unsupervised domain adaptive SAR image ground object classification.
[0138] In addition, in the present invention, the preference vector is [1, 1], which is conducive to better retaining the original prior knowledge.
[0139] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality" means two or more unless otherwise specifically defined.
[0140] In the description of this specification, the descriptions with reference to the terms "an embodiment", "some embodiments", "examples", "specific examples", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification.
[0141] Although the present application has been described in conjunction with various embodiments herein, however, in the process of implementing the claimed present application, those skilled in the art can understand and achieve other variations of the disclosed embodiments by viewing the accompanying drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude a plurality. A single processor or other unit can implement several functions recited in the claims. Certain measures are recited in mutually different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0142] The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can still be made, and all should be regarded as belonging to the protection scope of the present invention.
Claims
1. A method for training a ground object classification model with domain adaptation and dynamic optimization in SAR image domain, characterized in that, Including: After obtaining the labeled source domain SAR images and the unlabeled target domain SAR images, generating source domain training samples according to the source domain SAR images and the labels corresponding to the source domain SAR images, and generating target domain training samples according to the target domain SAR images; Initializing a segmentation network and a discriminator network to obtain a first model to be trained; Inputting the source domain training samples and the target domain training samples into the first model to be trained, and determining a first loss value according to a preset loss function; According to the first loss value and the gradient of the preset loss function, updating the network parameters of the segmentation network in the first model to be trained through backpropagation to obtain a second model to be trained; Determining a dynamic optimization module according to the first loss value, the preference vector, the number of tasks of the first model to be trained, and the number of parameters of the segmentation network, and calculating a dynamic optimization coefficient by using the dynamic optimization module; Inputting the source domain training samples and the target domain training samples into the second model to be trained, and determining a second loss value according to the preset loss function; wherein, the preset loss function includes loss functions of different tasks, and the second loss value includes loss values corresponding to different tasks; Adjusting the network parameters of the second model to be trained by using the dynamic optimization coefficient, the loss values corresponding to different tasks, and the gradients of the loss functions of different tasks; Judging whether the number of iterations reaches a preset value; if so, determining the segmentation network in the adjusted second model to be trained as a ground object classification model; if not, determining the adjusted second model to be trained as the first model to be trained, and executing the step of inputting the source domain training samples and the target domain training samples into the first model to be trained and determining a first loss value according to a preset loss function.
2. The training method of the SAR image domain adaptive dynamic optimization ground object classification model according to claim 1, characterized in that, The step of, after obtaining the labeled source domain SAR images and the unlabeled target domain SAR images, generating source domain training samples according to the source domain SAR images and the labels corresponding to the source domain SAR images, and generating target domain training samples according to the target domain SAR images, includes: Obtaining the labeled source domain SAR images and the unlabeled target domain SAR images; Cutting each source domain SAR image and its corresponding label into small pieces of 512×512 to obtain source domain cut small images and the labels corresponding to each source domain cut small image, and obtaining source domain training samples; Cutting each target domain SAR image into small pieces of 512×512 to obtain target domain cut small images, and obtaining target domain training samples.
3. The training method of the SAR image domain adaptive dynamic optimization ground object classification model according to claim 1, characterized in that, The preference vector is [1, 1].
4. The method for training a SAR image domain adaptive dynamic optimization ground object classification model according to claim 2, wherein The preset loss function is: Among them, I s represents the source domain training samples, and I t represents the target domain training samples, L seg represents the loss value of the source domain segmentation task, and L adv represents the loss value of the target domain adversarial task, and L(I s , I t ) is the calculated loss value, and [k1, k2] represents the preference vector.
5. The training method of the SAR image domain adaptive dynamic optimization ground object classification model according to claim 1, characterized in that, Calculating the dynamic optimization coefficient according to the following formula: In the formula, is an indicator function, it is 1 when and 0 when a represents the loss adjustment weight, β represents the candidate values of the dynamic optimization coefficient that satisfy the constraint conditions and β ∈ S m , c j = G T g j , where g j represents the gradient of the preset loss function, G = [g1,…,g m , m is the number of tasks, r j represents the component of the preference vector, represents the value of the loss function, and β * is the calculated dynamic optimization coefficient.
6. The training method of the SAR image domain adaptive dynamic optimization ground object classification model according to claim 1, wherein, The step of adjusting the network parameters of the second model to be trained by using the dynamic optimization coefficient, the loss values corresponding to different tasks, and the gradients of the loss functions of different tasks, includes: Using the dynamic optimization coefficient, performing weighted summation on the gradients of the segmentation task loss function and the adversarial task loss function according to the loss value of the segmentation task and the loss value of the adversarial task, and adjusting the network parameters of the segmentation network and the discriminator network in the second model to be trained through backpropagation.
7. The training method of the SAR image domain adaptive dynamic optimization ground object classification model according to claim 1, characterized in that, After the step of determining whether the number of judgment iterations reaches a preset value, the following steps are further included: Every fixed number of iterations, calculate the evaluation index of the ground object classification model obtained in the current iteration process.
8. The method for training a ground object classification model with SAR image domain adaptive dynamic optimization according to claim 2, wherein When the number of iterations reaches the preset value, after the step of determining the segmentation network in the adjusted second model to be trained as the ground object classification model, the following steps are further included: Obtain the labels of each target domain SAR image and the target domain patch sub-images obtained by splitting each target domain SAR image; Input the target domain patch sub-images into the ground object classification model to obtain the local prediction results of each target domain patch sub-image; Stitch the prediction results to obtain the overall prediction result of the target domain SAR image; According to the overall prediction result and the labels of each target domain SAR image, calculate the evaluation index of the ground object classification model.
Citation Information
Patent Citations
Unsupervised semantic segmentation method for cross-domain remote sensing image
CN112991353A
Method and system for directed transfer of cross-domain data based on high-resolution remote sensing images
US20220028038A1