Vector image alignment model training method and device, and electronic device

By performing offset processing on the initial sample data and iterative training using a multi-scale convolution module combined with a mask attention mechanism, the problem of inconsistency between building image data and vector data overlay was solved, improving the prediction accuracy and reliability of the deep learning model.

CN118097428BActive Publication Date: 2026-04-10WUHAN DASHI SMART TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN DASHI SMART TECH CO LTD
Filing Date
2024-03-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

The misalignment between building image data and vector data leads to poor training results for deep learning models, and existing technologies struggle to effectively correct the offset between vector data and image data.

Method used

By acquiring initial sample data and performing offset processing, target sample data is generated. Then, multi-scale convolution modules and mask attention mechanism modules are used for iterative training to form a target training model, thereby improving the model's accuracy in predicting building offsets.

Benefits of technology

This improves the accuracy and reliability of deep learning models in predicting building offsets, ensures high overlay quality of training sample data, and avoids the impact of overlay problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118097428B_ABST
    Figure CN118097428B_ABST
Patent Text Reader

Abstract

The application provides a vector image alignment model training method and device and electronic equipment. The method comprises: obtaining initial sample data, wherein the initial sample data comprises image data and initial vector data having a first set relationship with the image data; offsetting the initial sample data to obtain target sample data, wherein the target sample data comprises the image data and offset vector data having a second set relationship with the image data, and the alignment degree of the second set relationship is lower than that of the first set relationship; and inputting the target sample data into an initial training model for iterative training to obtain a target training model. The accuracy and reliability of the obtained target training model prediction can be improved, so that the offset between the image data and the vector data can be predicted based on the target training model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of remote sensing application, in particular to a vector image alignment model training method and device and electronic equipment. BACKGROUND

[0002] The accuracy and timeliness of data are particularly important for building extraction, and ensuring accurate vector data of buildings is an important part of building extraction. Due to the differences in the sources of image data and vector data of buildings, there may be offsets between vector data and image data, and it is necessary to correct the vector data based on image data.

[0003] At present, deep learning models are commonly used for automatic extraction of remote sensing image features. Deep learning models need to be pre-trained, and when training a deep learning model, the matching result data of vector data and image data is used as training samples.

[0004] However, due to inconsistent data production requirements and differences in matching result data quality, the current matching result data of vector data and image data may not be suitable for training deep learning models, thereby affecting the training effect of deep learning models. SUMMARY

[0005] The present application aims to overcome the deficiencies in the prior art and provide a vector image alignment model training method, device and electronic equipment to improve the accuracy and reliability of deep learning model correction of vector data.

[0006] To achieve the above-mentioned purpose, the technical solutions adopted by the embodiments of the present application are as follows:

[0007] In a first aspect, the embodiments of the present application provide a vector image alignment model training method, which comprises:

[0008] Obtaining initial sample data, wherein the initial sample data includes image data and initial vector data having a first matching relationship with the image data;

[0009] Offsetting the initial sample data to obtain target sample data, wherein the target sample data includes the image data and offset vector data having a second matching relationship with the image data, and the alignment degree of the second matching relationship is lower than that of the first matching relationship;

[0010] Inputting the target sample data into an initial training model for iterative training to obtain a target training model.

[0011] Optionally, before offsetting the initial sample data, the method comprises:

[0012] The initial sample data is sliced to obtain a plurality of slice sample data;

[0013] The initial vector data in each of the slice sample data is binarized to obtain initial binary vector data.

[0014] Optionally, the initial sample data is offset to obtain target sample data, comprising:

[0015] The initial binary vector data in each of the slice sample data is offset to obtain mask data corresponding to the initial binary vector data;

[0016] The mask data and the image data in the slice sample data are merged to obtain target sample data.

[0017] Optionally, the mask data and the image data corresponding to the mask data are merged to obtain target sample data, comprising:

[0018] The mask data and the image data corresponding to the mask data are merged to obtain merged image data;

[0019] The merged image data is processed according to the pixel mean and the pixel standard deviation obtained in advance to obtain the target sample data.

[0020] Optionally, the target sample data is input into an initial training model for iterative training to obtain a target training model, comprising:

[0021] The target sample data and the mask data are input into the initial training model, and feature extraction and target detection are performed by a multi-scale convolution module and a mask attention mechanism module in the initial training model to obtain an output result of the initial training model;

[0022] The initial training model is corrected according to the output result of the initial training model, and the correction is iteratively performed until the corrected initial training model meets a preset iteration end condition, and the initial training model meeting the iteration end condition is taken as the target training model.

[0023] Optionally, the target sample data and the mask data are input into the initial training model, and iterative feature extraction and target detection are performed by a multi-scale convolution module and a mask attention mechanism module in the initial training model to obtain an output result of the initial training model, comprising:

[0024] The multi-scale convolution module extracts features from the target sample data to obtain a plurality of feature maps of different scales;

[0025] inputting the plurality of feature maps of different scales into the mask attention mechanism module, and obtaining target results of vectors based on a target detection algorithm by the mask attention mechanism module;

[0026] predicting the target results by a multilayer perceptron to obtain an output result of the initial training model.

[0027] Optionally, the predicting the target results by the multilayer perceptron comprises:

[0028] performing category prediction on the target results by the multilayer perceptron to obtain category prediction results under different scales;

[0029] performing segmentation mask prediction on the target results by the multilayer perceptron to obtain a probability value of the target results being buildings;

[0030] performing offset prediction on the target results by the multilayer perceptron to obtain an offset result of the target results.

[0031] In a second aspect, an embodiment of the present application further provides a training device of a vector image alignment model, and the device comprises:

[0032] an acquisition module configured to acquire initial sample data, wherein the initial sample data comprises image data and initial vector data having a first set of fitting relationship with the image data;

[0033] an offset module configured to offset the initial sample data to obtain target sample data, wherein the target sample data comprises the image data and offset vector data having a second set of fitting relationship with the image data, and the alignment degree of the second set of fitting relationship is lower than the alignment degree of the first set of fitting relationship;

[0034] a training module configured to input the target sample data into an initial training model for iterative training to obtain a target training model.

[0035] Optionally, the offset module is specifically configured to:

[0036] perform slice processing on the initial sample data to obtain a plurality of slice sample data;

[0037] perform binaryzation processing on the initial vector data in each of the slice sample data to obtain initial binary vector data.

[0038] Optionally, the offset module is specifically configured to:

[0039] offset the initial binary vector data in each of the slice sample data to obtain mask data corresponding to the initial binary vector data;

[0040] Merge the mask data with image data in the slice sample data to obtain target sample data.

[0041] Optionally, the offset module is specifically configured to:

[0042] Merge the mask data with image data corresponding to the mask data to obtain merged image data.

[0043] Process the merged image data according to the pixel mean and the pixel standard deviation obtained in advance to obtain the target sample data.

[0044] Optionally, the training module is specifically configured to:

[0045] Input the target sample data and the mask data into the initial training model, and perform feature extraction and target detection by the multi-scale convolution module and the mask attention mechanism module in the initial training model to obtain an output result of the initial training model.

[0046] Modify the initial training model according to the output result of the initial training model, and iterate until the modified initial training model meets a preset iteration end condition, and the initial training model meeting the iteration end condition is taken as the target training model.

[0047] Optionally, the training module is specifically configured to:

[0048] Perform feature extraction on the target sample data by the multi-scale convolution module to obtain a plurality of feature maps of different scales.

[0049] Input the plurality of feature maps of different scales into the mask attention mechanism module, and obtain a target result of each vector based on a target detection algorithm by the mask attention mechanism module.

[0050] Perform prediction on the target result by the multilayer perceptron to obtain an output result of the initial training model.

[0051] Optionally, the training module is specifically configured to:

[0052] Perform category prediction on the target result by the multilayer perceptron to obtain a category prediction result under different scales.

[0053] Perform segmentation mask prediction on the target result by the multilayer perceptron to obtain a probability value of the target result being a building.

[0054] Perform offset prediction on the target result by the multilayer perceptron to obtain an offset result of the target result.

[0055] In a third aspect, the embodiments of the present application further provide an electronic device, comprising a processor, a storage medium and a bus, the storage medium stores program instructions executable by the processor, when an application program is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to perform the steps of the vector image alignment model training method in the first aspect.

[0056] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is read and executed to perform the steps of the vector image alignment model training method in the first aspect.

[0057] The beneficial effects of the present application are:

[0058] The vector image alignment model training method, device and electronic device provided by the present application can guarantee that the initial sample data is high-fitting result data by obtaining initial vector data having a first fitting relationship with the image data as initial sample data, avoid using fitting result data with fitting problems, and offset the initial sample data, train the initial training model using target sample data with offset, train the initial training model to predict different building offsets and guarantee the accuracy of the training, thereby improving the accuracy and reliability of the target training model. BRIEF DESCRIPTION OF DRAWINGS

[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0060] Figure 1 A flowchart of a vector image alignment model training method provided by the embodiments of the present application is shown in the figure.

[0061] Figure 2 A flowchart of another vector image alignment model training method provided by the embodiments of the present application is shown in the figure.

[0062] Figure 3 A flowchart of another vector image alignment model training method provided by the embodiments of the present application is shown in the figure.

[0063] Figure 4 A flowchart of another vector image alignment model training method provided by the embodiments of the present application is shown in the figure.

[0064] Figure 5 A flowchart of a process for training an initial training model is provided for the embodiments of the present application.

[0065] Figure 6 A device diagram of a vector image alignment model training method is provided for the embodiments of the present application.

[0066] Figure 7 A structural block diagram of an electronic device is provided for the embodiments of the present application. DETAILED DESCRIPTION

[0067] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the drawings in the present application serve only the purpose of description and illustration, and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowcharts show the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts under the guidance of the content of the present application.

[0068] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0069] It should be noted that the term “comprising” will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0070] Optionally, the vector image alignment model training method provided by the embodiments of the present application is applied to an electronic device, which can be, for example, a mobile phone, a tablet computer, a notebook computer, a palm computer, a desktop computer, or other terminal devices with computing processing capability and display function, or can also be a server. It can be specifically applied to an application program in a terminal device, for example, an APP (application, mobile phone software) of a mobile phone, an application system on a computer, and the like.

[0071] The following specifically explains the specific implementation process of the training of the vector image alignment model provided in the embodiments of the present application.

[0072] Figure 1 A flowchart of a vector image alignment model training method provided in the embodiments of the present application is shown in FIG. 1. The execution subject of the method is the electronic device as described above. As shown in FIG. 1, the method comprises the following steps. Figure 1

[0073] S101, obtaining initial sample data.

[0074] The initial sample data can include image data and initial vector data having a first fitting relationship with the image data. The first fitting relationship can refer to a high-quality fitting relationship. Specifically, for certain sample data, the image data in the sample data is strictly fitted with the feature contour in the image data, that is, for image data of a building, the fitting between the image data of the building and the vector contour of the building does not have a deviation, that is, the fitting between the image data of the building and the initial vector data of the building does not have a deviation.

[0075] Optionally, the image data can refer to visible light building image data, and the vector data refers to the vector data corresponding to the building. In production, the vector data is consistent with the building base contour, but the actual image data is not a true projection image, resulting in that the vector data is fitted with the bottom of the building in the image data, but there is a deviation between the vector data and the top of the building in the image data. The fitting result data of the vector data and the building top deviation is not suitable for training the learning model. Therefore, for the initial sample data, open source data and historical data can be collected, and the fitting result data of the high-quality image data and the vector data is selected, that is, the alignment degree between the vector data and the top of the building in the image data is high, that is, there is no deviation between the vector data and the top of the building in the image data.

[0076] Optionally, in one initial sample data, the image data of multiple buildings and the initial vector data having a first fitting relationship with the image data of each building can be included.

[0077] For example, the initial sample data can include the image data of building A, the image data of building B, the image data of building C, and the image data of building D. In the initial sample data, the initial vector data 1 having a first fitting relationship with the image data of building A, the initial vector data 2 having a first fitting relationship with the image data of building B, the initial vector data 3 having a first fitting relationship with the image data of building C, and the initial vector data 4 having a first fitting relationship with the image data of building D can also be included.​

[0078] S102, offset the initial sample data to obtain target sample data.

[0079] The target sample data can include image data and offset vector data having a second set of matching relationship with the image data, and the alignment degree of the second set of matching relationship is lower than the alignment degree of the first set of matching relationship.

[0080] Optionally, the image data of each building in the initial sample data and the initial vector data having a first set of matching relationship with each image data can be offset to obtain the target sample data. Since the initial sample data can include multiple building image data and initial vector data having a first set of matching relationship with each building image data, the same offset amount can be used to offset each building image data and the initial vector data having a first set of matching relationship with each building image data, or different offset amounts can be used to offset each building image data and the initial vector data having a first set of matching relationship with each building image data, that is, the offset amounts of different buildings can be the same or different.

[0081] S103, input the target sample data into the initial training model for iterative training to obtain a target training model.

[0082] Optionally, the initial training model can be a training model based on a framework combined with a mask attention mechanism for target query, and network training and testing can be performed according to the input target sample data. When the trained model meets the preset iteration end condition, the trained model meeting the iteration end condition can be used as the target training model, and the target training model is used to predict the offset amount between the image data and the vector data.

[0083] In this embodiment, by obtaining the image data and the initial vector data having a first set of matching relationship with the image data as the initial sample data, it can be ensured that the initial sample data is high set matching result data, and the use of set matching result data with set matching problems is avoided. The initial sample data is offset, the target sample data with offset is used to train the initial training model, the prediction of the initial training model for different building offset amounts can be trained and the accuracy of the training can be ensured, so that the accuracy and reliability of the obtained target training model prediction can be improved.

[0084] Optionally, before the initial sample data is offset in S102, it can include:

[0085] Optionally, the initial sample data is subjected to slicing processing to obtain a plurality of slice sample data.

[0086] Optionally, since the initial sample contains multiple building image data and the initial vector data having the first set relationship with each building image data, the initial sample data is large, and therefore, the initial sample can be sliced, for example, the initial sample data can be uniformly sliced according to the size of 512 512, so that multiple 512 512 slice sample data can be obtained, and each slice sample data includes at least one building image data and the initial vector data having the first set relationship with each building image data.

[0087] For example, continuing the example of the initial sample data in the above S101 step, after slicing the initial sample data, six slice sample data can be obtained. The first slice sample data includes the image data of building A and the initial vector data 1 having the first set relationship with the image data of building A, the image data of building B and the initial vector data 2 having the first set relationship with the image data of building B, and the image data of building C and the initial vector data 3 having the first set relationship with the image data of building C.

[0088] Optionally, after slicing the initial sample data, the initial vector data in each slice sample data can also be binarized, for example, the pixels corresponding to the building are marked as 1, and other pixels are marked as 0, and then the initial binary vector data after binarization can be obtained.

[0089] For example, the initial vector data 1, the initial vector data 2, and the initial vector data 3 can be binarized respectively, and then the initial binary vector data 1, the initial binary vector data 2, and the initial binary vector data 3 can be obtained.

[0090] In this embodiment, by slicing the initial sample data, the accuracy of the training sample can be improved, the inaccurate training result caused by the large sample data can be avoided, and the training speed can be improved.

[0091] Figure 2 Another vector image alignment model training method provided by the embodiment of the present application is shown in the flowchart as shown in Figure 2 The above S102 can include:

[0092] S201, offsetting the initial binary vector data in each slice sample data to obtain mask data corresponding to the initial binary vector data.

[0093] Optionally, the initial binary vector data in each slice sample data can be randomly offset, for example, the initial binary vector data of each building with a pixel of 1 can be randomly offset, specifically, upward or downward or left or right offset, and the offset of the initial binary vector data of different buildings can be the same or different. The obtained mask data is the offset initial binary vector data.

[0094] For example, the initial binary vector data 1 can be offset to the left, the initial binary vector data 2 can be offset to the right, and the initial binary vector data 3 can be offset downward, or the initial binary vector data 1, the initial binary vector data 2 and the initial binary vector data 3 can all be offset downward.

[0095] S202, merge the mask data and the image data in the slice sample data to obtain target sample data.

[0096] Specifically, the mask data corresponding to each initial binary vector data in the slice sample data is merged with the image data having the first set of fitting relationship with the initial vector data corresponding to the initial binary vector data, that is, the offset initial binary vector data in the slice sample data is merged with the image data having the first set of fitting relationship with the initial vector data corresponding to the initial binary vector data, and then the target sample data can be obtained. The target sample data contains image data and offset vector data having a second set of fitting relationship with the image data, and the offset vector data refers to the offset initial binary vector data.

[0097] In this embodiment, by offsetting the initial vector data in each slice sample data, different buildings in the obtained target sample data have different offset conditions, and training with such target sample data can make the prediction ability of the target training model obtained by training more accurate.

[0098] Optionally, the step S202 of merging the mask data and the image data in the slice sample data to obtain the target sample data can include:

[0099] Optionally, the mask data and the image data corresponding to the mask data can be merged to obtain the merged image data. The image data corresponding to the mask data refers to the image data having the first set of fitting relationship with the initial vector data of the initial binary vector data corresponding to the mask data.

[0100] Optionally, the merged image data can be processed according to the pre-obtained pixel mean value and the pixel standard deviation to obtain the target sample data. The pre-obtained pixel mean value and the pixel standard deviation can be pre-calculated according to the image data in the initial sample data and other image data similar to the image data.

[0101] Specifically, the pixel value of the merged image data can be subtracted by the pixel mean value and then divided by the pixel standard deviation to standardize the merged image data, so that the target sample data can be obtained.

[0102] Figure 3 A flowchart of another vector image alignment model training method provided by an embodiment of the present application is shown in FIG. 6. Figure 3 As shown in S103, the target sample data can be input into the initial training model for iterative training to obtain the target training model, which can include:

[0103] S301, input the target sample data into the initial training model, and perform feature extraction and target detection by the multi-scale convolution module and the mask attention mechanism module in the initial training model to obtain the output result of the initial training model.

[0104] The multi-scale convolution module can use, for example, an InterImage multi-scale convolution pixel decoder, and the mask attention mechanism module can use, for example, a Transformer decoder. During the target detection process, a target query framework needs to be combined to obtain the output result of the initial training model.

[0105] S302, modify the initial training model according to the output result of the initial training model, and iterate until the modified initial training model meets the preset iteration end condition, and the initial training model that meets the iteration end condition is taken as the target training model.

[0106] In this embodiment, the multi-scale convolution module and the mask attention mechanism module in the initial training model are used for feature extraction and target detection, which can extract multi-scale feature maps to solve the problem of inaccurate feature extraction caused by large differences in building offset. In addition, the mask attention mechanism module is used for decoding in combination with the target query framework, which can independently predict each building in the target sample data, thereby improving the prediction accuracy of the target training model.

[0107] Figure 4 A flowchart of another vector image alignment model training method provided by an embodiment of the present application is shown in FIG. 6. Figure 4As shown, the target sample data and the mask data are input into the initial training model in S301, and the multi-scale convolution module and the mask attention mechanism module in the initial training model are used for feature extraction and target detection to obtain the output result of the initial training model, which can include:

[0108] S401, feature extraction is performed on the target sample data by the multi-scale convolution module to obtain a plurality of feature maps of different scales.

[0109] Specifically, as shown in Figure 5 , Figure 5 A flowchart for training an initial training model is provided in the embodiments of the present application. The target sample data is input into the InterImage backbone network for feature extraction, and a plurality of feature maps of different scales can be obtained, for example Figure 5 four feature maps of different scales can be obtained, for example, 192 W / 4 H / 4, 384 W / 8 H / 8, 768 W / 16 H / 16, 1536 W / 32 H / 32four scales of feature maps.

[0110] S402, the plurality of feature maps of different scales are input into the mask attention mechanism module, and the mask attention mechanism module obtains the target result of each vector based on the target detection algorithm.

[0111] Optionally, as shown in Figure 5 , the feature maps of different scales are input into the Transformer decoder respectively, and the Transformer decoder updates each vector in the Object query based on the Object query target detection algorithm and the feature maps of different scales obtained in S401 to obtain the target result of each vector. Specifically, the Transformer decoder cross-multiplies each vector in the Object query with the feature maps of different scales to obtain a mask probability, and then performs cross-attention and self-attention calculation between vectors, wherein the cross-attention calculation is limited to the mask area predicted by the previous scale to extract local features, and the Transformer decoder is used for self-attention and cross-attention calculation between different network levels based on efficient multi-scale measurement, so as to obtain the target result of each vector. Wherein, the target result of each vector can refer to the result of each vector corresponding to a target building, and the levels of each vector are different, so that the target results of vectors of different levels can be obtained.

[0112] S403, predicting the target result by the multi-layer perceptron to obtain an output result of the initial training model.

[0113] Specifically, the multi-layer perceptron includes a plurality of MLPs, each of which can predict different results. Therefore, when the target results of vectors of different levels are obtained, one multi-layer perceptron (MLP) can be used to predict each target result for the target results of vectors of different levels, so that the predicted results of the predicted target results are taken as the output results of the initial training model.

[0114] In this embodiment, multi-scale feature extraction is used to obtain the target results of vectors of multiple levels, and multi-scale prediction is used to improve the speed and reliability of prediction. In addition, the framework based on the target query is combined with the mask attention mechanism to independently predict each building object, thereby improving the accuracy of the target training model prediction.

[0115] Optionally, the prediction of the target result by the multi-layer perceptron in S403 to obtain the output result of the initial training model can include:

[0116] Optionally, the multi-layer perceptron can be used to perform category prediction on the target result to obtain a category prediction result under different scales. Specifically, one MLP can be selected from the multi-layer perceptron to perform category prediction on the vector of each level.

[0117] Optionally, the multi-layer perceptron can be used to perform segmentation mask prediction on the target result to obtain a probability value of the target result being a building. Specifically, one MLP can be selected from the multi-layer perceptron to perform segmentation mask prediction on the vector of each level.

[0118] Optionally, the multi-layer perceptron can be used to predict the offset of the target result to obtain an offset result of the target result. Specifically, one MLP can be selected from the multi-layer perceptron to predict the offset of the vector of each level.

[0119] Optionally, the initial training model can be iteratively adjusted according to the mask data, the category prediction result, the probability value, and the offset result until the adjusted initial training model meets an iteration end condition, and the initial training model meeting the iteration end condition is taken as the target training model. Specifically, the category prediction result can be compared with the real category in the mask data to calculate a loss function, and the initial training model can be adjusted according to the calculated loss function; the probability value predicted by the initial training model can be compared with the real building in the mask data to calculate a loss function, and the initial training model can be adjusted according to the calculated loss function; and the offset result predicted by the initial training model can be compared with the real offset in the mask data to calculate a loss function, and the initial training model can be adjusted according to the calculated loss function.

[0120] Figure 6 A device schematic diagram of a vector image alignment model training method provided for an embodiment of the present application is shown in FIG. 1, which includes: Figure 6

[0121] An acquisition module 501 is configured to acquire initial sample data, wherein the initial sample data includes image data and initial vector data having a first set of fitting relationship with the image data.

[0122] An offset module 502 is configured to offset the initial sample data to obtain target sample data, wherein the target sample data includes the image data and offset vector data having a second set of fitting relationship with the image data, and the alignment degree of the second set of fitting relationship is lower than that of the first set of fitting relationship.

[0123] A training module 503 is configured to input the target sample data into an initial training model for iterative training to obtain a target training model.

[0124] Optionally, the offset module 502 is specifically configured to:

[0125] slice processing is performed on the initial sample data to obtain a plurality of slice sample data;

[0126] binary processing is performed on the initial vector data in each of the slice sample data to obtain initial binary vector data.

[0127] Optionally, the offset module 502 is specifically configured to:

[0128] offset processing is performed on the initial binary vector data in each of the slice sample data to obtain mask data corresponding to the initial binary vector data;

[0129] the mask data and the image data in the slice sample data are merged to obtain target sample data.

[0130] Optionally, the offset module 502 is specifically configured to:

[0131] the mask data and the image data corresponding to the mask data are merged to obtain merged image data;

[0132] the merged image data is processed according to a pre-obtained pixel mean value and a pixel standard deviation to obtain the target sample data.

[0133] Optionally, the training module 503 is specifically configured to:

[0134] ​inputting the target sample data and the mask data into the initial training model, performing feature extraction and target detection on the target sample data by a multi-scale convolution module and a mask attention mechanism module in the initial training model, and obtaining an output result of the initial training model;

[0135] modifying the initial training model according to the output result of the initial training model, and iteratively performing the modification until the modified initial training model meets a preset iteration end condition, and taking the initial training model meeting the iteration end condition as the target training model.

[0136] Optionally, the training module 503 is specifically configured to:

[0137] performing feature extraction on the target sample data by the multi-scale convolution module, and obtaining a plurality of feature maps of different scales;

[0138] inputting the plurality of feature maps of different scales into the mask attention mechanism module, obtaining a target result of each vector based on a target detection algorithm by the mask attention mechanism module;

[0139] performing prediction on the target result by the multi-layer perceptron, and obtaining an output result of the initial training model.

[0140] Optionally, the training module 503 is specifically configured to:

[0141] performing category prediction on the target result by the multi-layer perceptron, and obtaining a category prediction result under different scales;

[0142] performing segmentation mask prediction on the target result by the multi-layer perceptron, and obtaining a probability value of the target result being a building;

[0143] performing offset prediction on the target result by the multi-layer perceptron, and obtaining an offset result of the target result.

[0144] Figure 7 A structural block diagram of an electronic device 400 is provided for the embodiments of the present application. The electronic device may, for example, be used for training of the vector image alignment model as described in the foregoing embodiments. As shown in the structural block diagram, the electronic device can include a processor 401 and a memory 402. Figure 7

[0145] Optionally, a bus 403 can also be included, wherein the memory 402 is configured to store machine-readable instructions executable by the processor 401 (for example, a computer program). Figure 4 ​The processor 401 and the storage 402 store the execution instructions of the acquisition module, the calling module, and the comparison module in the device in the method embodiment, and the processor 401 communicates with the storage 402 through the bus 403 when the electronic device 400 is running, and the machine readable instructions are executed by the processor 401 to execute the method steps in the method embodiment.

[0146] The computer readable storage medium stores the computer program, and the computer program is executed by the processor to execute the method steps in the vector image alignment model training method embodiment.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, which will not be described in detail in the present application. In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some communication interface, device or module, which can be electrical, mechanical or other forms.

[0148] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products, which are stored in a storage medium and include a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0149] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application.

Claims

1. A training method for a vector image alignment model, characterized in that, The method comprises: obtaining initial sample data, the initial sample data comprising image data and initial vector data having a first set relationship with the image data, the initial sample data comprising a plurality of building image data and initial vector data having a first set relationship with the image data of each building; offsetting the initial sample data to obtain target sample data, the target sample data comprising the image data and offset vector data having a second set relationship with the image data, the alignment degree of the second set relationship being lower than the alignment degree of the first set relationship; inputting the target sample data into an initial training model for iterative training to obtain a target training model, the target training model being used to predict the offset between image data and vector data; before the offsetting the initial sample data, comprising: slicing the initial sample data to obtain a plurality of slice sample data; binarizing the initial vector data in each slice sample data to obtain initial binary vector data; the inputting the target sample data into an initial training model for iterative training to obtain a target training model, comprising: inputting the target sample data into the initial training model, and performing feature extraction and target detection by a multi-scale convolution module and a mask attention mechanism module in the initial training model to obtain an output result of the initial training model; modifying the initial training model according to the output result of the initial training model, and iterating until the modified initial training model meets a preset iteration end condition, and taking the initial training model meeting the iteration end condition as the target training model; the inputting the target sample data into an initial training model, and performing feature extraction and target detection by a multi-scale convolution module and a mask attention mechanism module in the initial training model to obtain an output result of the initial training model, comprising: performing feature extraction on the target sample data by the multi-scale convolution module to obtain a plurality of feature maps of different scales; inputting the plurality of feature maps of different scales into the mask attention mechanism module to obtain a target result of each vector based on a target detection algorithm, the target result of each vector referring to a result of each vector corresponding to a target building; performing prediction on the target result by a multilayer perceptron to obtain an output result of the initial training model; the performing prediction on the target result by a multilayer perceptron to obtain an output result of the initial training model, comprising: performing category prediction on the target result by the multilayer perceptron to obtain a category prediction result under different scales; performing segmentation mask prediction on the target result by the multilayer perceptron to obtain a probability value of the target result being a building; performing offset prediction on the target result by the multilayer perceptron to obtain an offset result of the target result. 2.The method of claim 1, wherein, the offsetting the initial sample data to obtain target sample data, comprising: Offset the initial binary vector data in each of the slice sample data to obtain mask data corresponding to the initial binary vector data; Merge the mask data and image data in the slice sample data to obtain target sample data, wherein the mask data is the initial binary vector data after offsetting, and the image data serves as a reference benchmark. 3.The method of claim 2, wherein, Merging the mask data and image data corresponding to the mask data to obtain target sample data, comprising: Merging the mask data and image data corresponding to the mask data to obtain merged image data; Processing the merged image data according to the pre-obtained pixel mean and pixel standard deviation to obtain the target sample data. 4.The method of claim 2, wherein, The output result of the initial training model is modified, and the iteration is performed until the modified initial training model meets the preset iteration end condition, and the initial training model meeting the iteration end condition is taken as the target training model, comprising: The output result of the initial training model is modified, and the iteration is performed until the modified initial training model meets the preset iteration end condition, and the initial training model meeting the iteration end condition is taken as the target training model, comprising:

5. A training device for a vector image alignment model, characterized in that, The output result of the initial training model is modified, and the iteration is performed until the modified initial training model meets the preset iteration end condition, and the initial training model meeting the iteration end condition is taken as the target training model, comprising: Including: The obtaining module is configured to obtain initial sample data, wherein the initial sample data includes image data and initial vector data having a first set relationship with the image data, and the initial sample data includes a plurality of building image data and initial vector data having a first set relationship with the image data of each building; The offset module is configured to offset the initial sample data to obtain target sample data, wherein the target sample data includes the image data and offset vector data having a second set relationship with the image data, and the alignment degree of the second set relationship is lower than that of the first set relationship; The training module is configured to input the target sample data into an initial training model for iterative training to obtain a target training model, wherein the target training model is used to predict the offset between image data and vector data; The offset module is specifically configured to: Slice the initial sample data to obtain a plurality of slice sample data; Binaryzation process the initial vector data in each of the slice sample data to obtain initial binary vector data; The training module is specifically configured to: inputting the target sample data into the initial training model, performing feature extraction and target detection by a multi-scale convolution module and a mask attention mechanism module in the initial training model, and obtaining an output result of the initial training model; modifying the initial training model according to the output result of the initial training model, and iteratively performing until the modified initial training model meets a preset iteration end condition, taking the initial training model meeting the iteration end condition as the target training model; the training module is specifically configured to: performing feature extraction on the target sample data by the multi-scale convolution module, and obtaining a plurality of feature maps of different scales; inputting the plurality of feature maps of different scales into the mask attention mechanism module, obtaining a target result of each vector based on a target detection algorithm by the mask attention mechanism module, and the target result of each vector refers to a result of each vector corresponding to a target building; performing prediction on the target result by the multilayer perceptron, and obtaining the output result of the initial training model; the training module is specifically configured to: performing category prediction on the target result by the multilayer perceptron, and obtaining a category prediction result under different scales; performing segmentation mask prediction on the target result by the multilayer perceptron, and obtaining a probability value of the target result being a building; performing offset prediction on the target result by the multilayer perceptron, and obtaining an offset result of the target result.

6. An electronic device, comprising: The memory stores a computer program executable by the processor, and the processor implements the steps of the vector image alignment model training method according to any one of claims 1-4 when executing the computer program.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is run by the processor to execute the steps of the vector image alignment model training method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Remote sensing image and building vector registration method and system under multi-task CNN model

    CN110415280A

  • Image registration method and device, model training method and device, equipment, server and medium

    CN113538537A