Remote sensing image processing method, device and server
The image processing model trained through metric learning rules and preprocessing technology solves the detection and recognition problems in complex scenes in remote sensing images and achieves efficient and accurate target object detection.
Patent Information
- Application Number
- CN202110902079.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-06
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-08-06
AI Technical Summary
Existing technologies have low efficiency and poor accuracy when training image processing models, making them difficult to adapt to the detection and recognition of physical objects in complex scenes, resulting in frequent errors in remote sensing image processing.
The image processing model is trained using preset metric learning rules. By constructing a target loss function based on Mahalanobis distance, the distance between pixels of the same type is shortened and the distance between pixels of different types is increased. The high-pass filter and principal component analysis matrix are combined for preprocessing to improve the model accuracy and efficiency.
It achieves efficient and accurate remote sensing image processing in complex scenes, improves the accuracy and processing efficiency of target object detection, and reduces errors.
Smart Images

Figure CN113609994B_ABST
Abstract
Description
Technical Field
[0001] This specification belongs to the field of artificial intelligence technology, and in particular to remote sensing image processing methods, devices, and servers. Background Art
[0002] Usually, when it is necessary to detect and identify the physical objects of interest to the user in a remote sensing image, it is often necessary to first train an image processing model; then, the remote sensing image is processed using the image processing model to detect and identify whether the above-mentioned physical objects exist in the remote sensing image.
[0003] However, existing methods often suffer from low training efficiency, poor model accuracy, and inadequacy in detecting and recognizing physical objects in complex scenes (e.g., scenes where the background environment and physical objects are closely integrated). This can lead to errors when these image processing models are subsequently used to process remote sensing images for physical object detection and recognition.
[0004] To address the above issues, no effective solutions have been proposed so far. Summary of the Invention
[0005] This specification provides a remote sensing image processing method, device and server, which can quickly train a preset image processing model with high model accuracy and suitable for processing remote sensing images with a high degree of fusion between the target object and the background environment of the target area. Then, by utilizing the above-mentioned preset image processing model, it can be efficiently and accurately determined whether there is a target object in the target area.
[0006] The embodiments of this specification provide a remote sensing image processing method, including:
[0007] Acquire target remote sensing images of the target area;
[0008] Preprocessing the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction;
[0009] Calling a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule;
[0010] According to the target processing result, it is determined whether there is a target object in the target area.
[0011] In some embodiments, the method further comprises:
[0012] Obtain sample image data;
[0013] Setting corresponding labels for the pixels in the sample image data to obtain labeled sample data;
[0014] According to the preset metric learning rules, the initial image processing model and the target loss function based on metric learning are constructed;
[0015] Based on the target loss function, the initial image processing model is trained using the labeled sample data to obtain a preset image processing model that meets the requirements.
[0016] In some embodiments, according to a preset metric learning rule, constructing a target loss function based on metric learning includes:
[0017] According to a preset metric learning rule, a first penalty term and a second penalty term are constructed for the distance between two labeled sample data; wherein the first penalty term is used to shorten the preset distance between two labeled sample data carrying the same label; and the second penalty term is used to increase the preset distance between two labeled sample data carrying different labels;
[0018] The first penalty term and the second penalty term are combined to obtain the target loss function.
[0019] In some embodiments, constructing a first penalty term between two labeled sample data according to a preset metric learning rule includes:
[0020] Construct the first penalty term according to the following formula:
[0021]
[0022] Among them, ε pull (L) represents the first penalty parameter, Represents the labeled sample data numbered i, represents the labeled sample data numbered j, and Carrying the same label, L represents the operation on the preset distance between samples.
[0023] In some embodiments, constructing a second penalty term between two labeled sample data according to a preset metric learning rule includes:
[0024] Construct the second penalty term according to the following formula:
[0025]
[0026] Among them, ε push (L) represents the second penalty parameter, Represents the labeled sample data numbered i, with label yi , Represents the labeled sample data numbered j, with label y j , Represents the labeled sample data numbered s, with label y s , and Carrying the same label, and Carrying different labels, L represents the operation of the preset distance between samples, y is Represents the penalty coefficient, and the subscript + indicates that the calculation result is non-negative.
[0027] In some embodiments, combining the first penalty term and the second penalty term to obtain the target loss function includes:
[0028] According to the following formula, the target loss function is obtained by combination:
[0029] ε(L)=(1-μ)ε pull (L)+με push (L)
[0030] Among them, ε(L) represents the loss value of the target loss function, ε pull (L) represents the first penalty parameter, ε push represents the second penalty parameter, and μ represents the preset coefficient.
[0031] In some embodiments, the predetermined distance comprises a Mahalanobis distance.
[0032] In some embodiments, combining the first penalty term and the second penalty term to obtain the target loss function includes:
[0033] According to the following formula, the target loss function is obtained by combination:
[0034]
[0035] Among them, ε(L) represents the loss value of the target loss function, M represents the operation on the Mahalanobis distance, and D M represents the generalized Mahalanobis metric.
[0036] In some embodiments, the target object includes a physical object whose color is similar to the background environment in the target area above a preset similarity threshold.
[0037] The present embodiment also provides a method for training a preset image model, including:
[0038] Obtain sample image data;
[0039] Setting corresponding labels for the pixels in the sample image data to obtain labeled sample data;
[0040] According to the preset metric learning rules, the initial image processing model and the target loss function based on metric learning are constructed;
[0041] Based on the target loss function, the initial image processing model is trained using the labeled sample data to obtain a preset image processing model that meets the requirements.
[0042] The embodiments of this specification also provide a remote sensing image processing device, including:
[0043] An acquisition module, used for acquiring a target remote sensing image of a target area;
[0044] A preprocessing module is used to preprocess the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction;
[0045] A calling module is used to call a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule;
[0046] The determination module is used to determine whether there is a target object in the target area according to the target processing result.
[0047] An embodiment of the present specification also provides a server, comprising a processor and a memory for storing processor executable instructions, wherein the processor implements the following steps when executing the instructions: acquiring a target remote sensing image for a target area; preprocessing the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction; calling a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule; and determining whether a target object exists in the target area according to the target processing result.
[0048] The embodiments of this specification also provide a computer-readable storage medium having computer instructions stored thereon, which, when executed by a computer device, implement the following: acquiring a target remote sensing image of a target area; preprocessing the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction; calling a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule; and determining whether a target object exists in the target area according to the target processing result.
[0049] The remote sensing image processing method, device and server provided in this specification can be specifically trained before implementation. The method can first be based on a preset metric learning rule and utilize the metric learning idea to specifically train a model that can automatically shorten the preset distance between pixels of the same type and increase the preset distance between pixels of different types. This allows for rapid training to obtain a preset image processing model with high model accuracy and suitable for processing remote sensing images with a high degree of fusion between the target object and the background environment of the target area. During specific implementation, the target remote sensing image obtained for the target area can be preprocessed according to the preset preprocessing rule to obtain a target remote sensing image with a relatively small data volume and good effect after dimensionality reduction. The preset image processing model can then be called to process the target remote sensing image after dimensionality reduction to efficiently and accurately detect whether the target object exists in the target area. This can effectively improve the processing efficiency of remote sensing images, as well as the detection accuracy of detecting target objects from target areas with a high degree of fusion based on remote sensing images, and reduce detection errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of this specification, the following is a brief introduction to the drawings required for use in the embodiments. The drawings described below are only some of the embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0051] Figure 1 This is a flowchart of a remote sensing image processing method provided by an embodiment of this specification;
[0052] Figure 2 is a flowchart of a method for training a preset image model provided by an embodiment of this specification;
[0053] Figure 3 This is a schematic diagram of the structure of a server provided by an embodiment of this specification;
[0054] Figure 4 This is a schematic diagram of the structure of a remote sensing image processing device provided by one embodiment of this specification;
[0055] Figure 5 This is a schematic diagram of an embodiment of a remote sensing image processing method provided by an embodiment of this specification, in a scenario example. DETAILED DESCRIPTION
[0056] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.
[0057] See Figure 1 The embodiments of this specification provide a method for processing remote sensing images. Specifically, the method is applied to a server. When implemented, the method may include the following:
[0058] S101: Acquire a target remote sensing image of a target area;
[0059] S102: Preprocessing the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction;
[0060] S103: calling a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule;
[0061] S104: Determine whether there is a target object in the target area according to the target processing result.
[0062] Through the above embodiments, it is possible to pre-train a model that can automatically shorten the preset distance between pixels of the same type and increase the preset distance between pixels of different types according to preset metric learning rules and based on the idea of metric learning, using the preset distance between sample data. This allows for rapid training to obtain a preset image processing model that has high model accuracy and is suitable for processing remote sensing images with a high degree of fusion between the target object and the background environment of the target area. Furthermore, the above preset image processing model can be used to efficiently and accurately detect and identify the corresponding target object from the target area with a high degree of fusion by processing the target remote sensing image after dimensionality reduction, thereby effectively improving the processing efficiency of remote sensing images and the detection accuracy of detecting and identifying target objects from the target area based on remote sensing images.
[0063] In some embodiments, the above-mentioned remote sensing image processing method can be specifically applied to a server responsible for processing remote sensing images to detect target objects in a target area. The server can specifically include a background server applied to a data processing system side, capable of realizing functions such as data transmission and data processing. Specifically, the server can be, for example, an electronic device with data calculation, storage and network interaction functions. Alternatively, the server can also be a software program running in the electronic device to provide support for data processing, storage and network interaction. In this embodiment, the number of the servers is not specifically limited. The server can specifically be one server, or several servers, or a server cluster formed by several servers.
[0064] In some embodiments, the target object can be understood as a physical object to be detected that the user is interested in. Specifically, the target object can be a building to be detected, a mountain or lake to be detected, or a large device or equipment to be detected.
[0065] In some embodiments, the target object may include a physical object that is highly integrated with the background environment in the target area and is difficult to distinguish and identify. The target object may include a physical object whose color is similar to the background environment in the target area and is higher than a preset similarity threshold.
[0066] Specifically, for example, the target area may include a white snow area; correspondingly, the target object may include a white building, such as a white wind power station, a white factory building, a white vegetable greenhouse, and the like.
[0067] Of course, it should be noted that the target areas and target buildings listed above are merely illustrative. In practice, depending on the specific application scenario and processing requirements, the target areas may also include yellow desert areas, green grassland areas, and so on; and correspondingly, the target objects may include yellow buildings, green buildings, and so on. This specification does not impose any limitations on this.
[0068] Through the above embodiments, the remote sensing image processing method provided in this specification can be applied to perform targeted detection processing on target remote sensing images containing target objects that are difficult to identify and have a high degree of integration with the background environment in the target area, so as to accurately utilize the information in the remote sensing image to detect and identify the target object of interest from the target area.
[0069] In some embodiments, the target remote sensing image can be specifically understood as a remote sensing image collected for a wide target area. Typically, the target remote sensing image has the characteristics of high spectrum, high resolution, high data dimension, and large data volume.
[0070] In some embodiments, the acquisition of target remote sensing images of the target area may include acquiring target remote sensing images of the target area provided by the satellite at predetermined time intervals (e.g., one week). Each target remote sensing image corresponds to a time period and is used to reflect the specific conditions of the target objects in the target area during the corresponding time period. This allows subsequent determination of changes in the target objects in the target area over a longer time period based on multiple consecutive target remote sensing images. For example, the construction progress of a wind power station in a snowy area can be determined based on the target remote sensing images of the previous time period and the current time period.
[0071] In some embodiments, the above-mentioned preprocessing of the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction may include the following contents: calling a preset high-pass filter to process the target remote sensing image to obtain a noise covariance matrix; wherein the preset high-pass filter is established based on the spectral information of the target object in the remote sensing image and the spectral information of the background environment; performing a minimum noise separation transformation according to the noise covariance matrix to obtain a principal component analysis matrix of the target remote sensing image; and using the principal component analysis matrix to process the target remote sensing image to obtain a processed target remote sensing image as the target remote sensing image after dimensionality reduction.
[0072] Through the above embodiments, the high-spectral and high-resolution characteristics of remote sensing images can be fully utilized. By using a preset high-pass filter established based on spectral information to perform a minimum noise separation transformation, background noise can be effectively removed, and the interference of background environments with similar colors on target object detection and recognition can be reduced; at the same time, by using the principal component analysis matrix to process the target remote sensing image, data dimensionality reduction can be achieved for the target remote sensing image with a large data volume, and a target remote sensing image with a relatively small data volume and a reduced dimensionality suitable for subsequent model processing can be obtained.
[0073] In some embodiments, the preset high-pass filter can be pre-established in the following manner: a remote sensing image targeting the target area and containing the target object is collected as a test image; a first image area where the target object is located and a second image area where the background environment is located are determined in the test image; spectral information statistics are performed on the first image area to obtain spectral information statistics of the target object; spectral information statistics are performed on the second image area to obtain spectral information statistics of the background environment; and the preset high-pass filter is constructed based on the spectral information statistics of the target object and the spectral information statistics of the background environment.
[0074] Through the above embodiments, the hyperspectral characteristics of remote sensing images can be fully utilized, and a preset high-pass filter that can effectively filter background environmental noise and has good effects can be constructed based on the test image.
[0075] In some embodiments, during specific implementation, the target image can be filtered using the preset high-pass filter to filter the background noise using the hyperspectral characteristics of the remote sensing image to obtain the corresponding noise covariance matrix. The noise covariance matrix can be specifically recorded as C N .
[0076] In some embodiments, the above-mentioned minimum noise separation transformation is performed according to the noise covariance matrix to obtain the principal component analysis matrix of the target remote sensing image. When specifically implemented, it may include the following contents: constructing a first transformation matrix according to the noise covariance matrix; using the first transformation matrix to perform a first transformation processing on the noise covariance matrix to obtain a transformed data matrix; constructing a second transformation matrix according to the transformed data matrix; constructing a minimum noise separation transformation matrix according to the first transformation matrix and the second transformation matrix; using the minimum noise separation transformation matrix to process the target remote sensing image to obtain the principal component analysis matrix of the target remote sensing image.
[0077] Through the above embodiment, a minimum noise separation transform can be performed on the target remote sensing image by constructing and utilizing a noise covariance matrix to largely remove background noise, resulting in a vector in which the elements are mutually uncorrelated while retaining the principal components of the target remote sensing image. This reduces the image data dimension and arranges the principal component analysis matrix of the target remote sensing image in descending order of signal-to-noise ratio. This effectively reduces the impact of background noise on image quality and produces a relatively pure and effective principal component analysis matrix.
[0078] In some embodiments, when constructing the first transformation matrix, the server may transform C N The eigenvalues of are arranged in descending order to obtain the corresponding diagonal matrix D N ; Determine the orthogonal matrix U constructed based on the eigenvector; and according to the diagonal matrix D N And the orthogonal matrix U constructs the corresponding first transformation matrix according to the following formula:
[0079] In some implementation examples, when performing the first transformation process, the server may use the first transformation matrix to transform the noise covariance matrix C according to the following formula: N Perform the first transformation: C D-adj =P T C NP; perform standard principal component transformation on the noise data, project the noise data into a new feature space, and obtain the transformed data matrix C D-adj This makes the noise data have unit variance and no longer correlated across the bands, making it easier to remove them later.
[0080] In some embodiments, when constructing the second transformation matrix, the server may determine the diagonal matrix D with eigenvalues arranged in descending order based on the transformed data matrix. D-adj ; Based on the transformed data matrix and the diagonal matrix, the second transformation matrix V is constructed according to the following formula: D D-adj =V T C D-adj V.
[0081] In some embodiments, when constructing the minimum noise separation transformation matrix, the server may construct the corresponding minimum noise separation transformation matrix using the first transformation matrix and the second transformation matrix according to the following formula: T=PV.
[0082] In some embodiments, the above-mentioned use of the principal component analysis matrix to process the target remote sensing image to obtain the processed target remote sensing image may include the following contents during specific implementation: determining the principal component bands in the target remote sensing image according to the principal component analysis matrix; extracting corresponding spectral information from the target remote sensing image according to the principal component bands to generate a corresponding RGB pseudo-color image to obtain the processed target remote sensing image as the target remote sensing image after dimensionality reduction.
[0083] Through the above embodiments, the hyperspectral characteristics of remote sensing images can be utilized and the principal component analysis matrix can be used to perform corresponding processing on the target remote sensing images to achieve data dimensionality reduction of the image, thereby obtaining a target remote sensing image with relatively low dimension, relatively small data volume, and more suitable for subsequent model processing after dimensionality reduction.
[0084] In some embodiments, the above-mentioned calling of a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result may include the following contents during specific implementation: according to a preset cutting rule, the target remote sensing image after dimensionality reduction is cut into multiple sub-image blocks; wherein, there is an overlapping area of a preset range between two adjacent sub-image blocks among the multiple sub-image blocks; calling a preset image processing model to process the multiple sub-image blocks to obtain a corresponding target processing result.
[0085] In some embodiments, the above-mentioned preset image processing model can be specifically understood as a processing model that is pre-trained according to preset metric learning rules and based on the distance between sample data based on metric learning ideas.
[0086] In practice, multiple sub-image blocks can be packaged and combined, replacing the complete, relatively large, reduced-dimensionality target remote sensing image, and then fed into a pre-set image processing model. The model then runs. When the pre-set image processing model runs, it calculates the distance between the pixels in each sub-image block and the sample data to find the pixels belonging to the target object, obtain the corresponding target processing results, and output the model.
[0087] Through the above embodiment, the target remote sensing image after dimensionality reduction can be further divided into multiple sub-image blocks with relatively smaller data volume and more suitable for subsequent model processing. Then, the above multiple sub-image blocks can be input into the preset image processing model instead of the complete processed target remote sensing image for specific processing to improve the efficiency of model processing.
[0088] In some embodiments, during specific implementation, the target remote sensing image after dimensionality reduction may be directly input into a preset image processing model, and the model may be run to obtain the corresponding target processing result.
[0089] In some embodiments, before implementation, the method may further include the following:
[0090] S1: Obtain sample image data;
[0091] S2: setting corresponding labels for the pixels in the sample image data to obtain labeled sample data;
[0092] S3: According to the preset metric learning rules, the initial image processing model and the target loss function based on metric learning are constructed;
[0093] S4: Based on the target loss function, the labeled sample data is used to train an initial image processing model to obtain a preset image processing model that meets the requirements.
[0094] Through the above embodiments, the idea of metric learning can be introduced and utilized. According to the preset metric learning rules, by learning the preset distance between two sample data with the same label and the preset distance between two sample data with different labels, a preset image processing model with high model accuracy and suitable for processing remote sensing images with a high degree of fusion between the target object and the background environment of the target area can be quickly trained.
[0095] In some embodiments, the sample image data may be a historically acquired remote sensing image containing a target area and a target object. Of course, the sample image data may also be a remote sensing image containing an area similar to the target area and / or a physical object similar to the target object.
[0096] In some embodiments, during specific implementation, each pixel in the sample image data can be labeled according to a preset labeling rule, and a corresponding label (e.g., label) can be set. Specifically, according to the preset labeling rule, a first type of label can be set on the pixel determined to belong to the target object, for example, a label with a value of "1" can be set; and a second type of label can be set on the pixel determined not to belong to the target object, for example, a label with a value of "0". In this way, labeled sample data can be obtained. The above-mentioned labeled sample data can be specifically understood as pixels carrying labels.
[0097] In some embodiments, the aforementioned preset metric learning rule can be specifically understood as a model training rule based on the idea of metric learning. Specifically, metric learning can be understood as a method of learning a distance metric function so that, in a new transformation space, multiple neighboring objects of an input data object all belong to the same category (carry the same label), while intrusion objects of different categories (carrying different labels) maintain a greater distance from the input data object. The model trained based on metric learning can effectively generalize the aforementioned distribution characteristics of the data, and based on the aforementioned distribution characteristics, reduce the error rate during judgment, thereby achieving higher model accuracy.
[0098] According to the preset metric learning rules and based on the metric learning idea, it is believed that: there will be a virtual boundary (which can be recorded as Margin) between any two different sample data; sample data of the same type (or sample data carrying the same label) should be pulled into the boundary; on the contrary, sample data of different types (or sample data carrying different labels) should be pushed out of the boundary.
[0099] Specifically, for example, two sample data: If the labels are the same: y i =y j , then it is believed that for The neighboring samples of In contrast, the two sample data: If the labels are different: y i ≠y s , then it is believed that for Intrusion samples; accordingly, we should introduce Outside the boundary. Reflected in the distance between samples, it is manifested as: shortening and The distance between them; at the same time, the growth and The distance between them.
[0100] Furthermore, based on the idea of metric learning, combined with the correlation between the distance between sample data and neighboring samples, and the distance between sample data and intrusion samples, it can be determined that the two distances should satisfy the following relationship:
[0101]
[0102] in, Represents the labeled sample data numbered i, represents the labeled sample data numbered j, Represents the labeled sample data numbered s, and Carrying the same label, and Carrying different labels, L represents the operation on the preset distance between two sample data.
[0103] Regarding the above relationship, it's important to note that, based on the principle of metric learning, the goal is to transform a metric learning problem into a convex optimization problem. By finding the optimal solution to this convex optimization problem, the model's classification capabilities are enhanced, resulting in a better model. The distance metric calculation involved is a QP (quadratic process) problem. Therefore, the above relationship is constructed as a constraint to ensure that the problem is feasible and bounded.
[0104] Based on the idea of metric learning and combined with the relationship between the above two distances, in order to train the model to specifically pull sample data carrying the same label into the boundary, a penalty item for shortening the preset distance between two labeled sample data carrying the same label can be configured as the first penalty item; at the same time, in order to train the model to specifically push sample data carrying different labels out of the boundary, a penalty item for increasing the preset distance between two labeled sample data carrying different labels can be configured as the second penalty item.
[0105] In some embodiments, the target loss function based on metric learning is constructed according to the preset metric learning rules. When implemented, the following contents may be included:
[0106] S1: Constructing a first penalty term and a second penalty term for the distance between two labeled sample data according to a preset metric learning rule; wherein the first penalty term is used to shorten a preset distance between two labeled sample data carrying the same label; and the second penalty term is used to increase a preset distance between two labeled sample data carrying different labels;
[0107] S2: Combine the first penalty term and the second penalty term to obtain the target loss function.
[0108] Through the above embodiments, based on the idea of metric learning and utilizing the preset distance between sample data, a target loss function can be constructed that can automatically guide the shortening of the preset distance between two labeled sample data carrying the same label to pull in neighboring samples carrying the same label, while increasing the preset distance between two labeled sample data carrying different labels to push away intrusion samples carrying different labels; and then, based on the above target loss function, corresponding model training can be performed to quickly train a preset image processing model that meets the requirements.
[0109] In some embodiments, the above-mentioned first penalty term between two labeled sample data is constructed according to the preset metric learning rule. When implemented, it may include the following:
[0110] Construct the first penalty term according to the following formula:
[0111]
[0112] Among them, ε pull (L) represents the first penalty parameter, Represents the labeled sample data numbered i, represents the labeled sample data numbered j, and Carrying the same label, L represents the operation on the preset distance between samples.
[0113] Through the above embodiments, the characteristics of the preset distance between sample data can be utilized to construct a first penalty item that can guide the model to automatically and specifically shorten the preset distance between sample data carrying the same label to pull in neighboring samples carrying the same label.
[0114] In some embodiments, the second penalty term between two labeled sample data is constructed according to the preset metric learning rule. When implemented, the following may be included:
[0115] Construct the second penalty term according to the following formula:
[0116]
[0117] Among them, ε push (L) represents the second penalty parameter, Represents the labeled sample data numbered i, with label y i , Represents the labeled sample data numbered j, with label y j , Represents the labeled sample data numbered s, with label y s , and Carrying the same label, and Carrying different labels, L represents the operation of the preset distance between samples, y is Represents the penalty coefficient, and the subscript + indicates that the calculation result is non-negative.
[0118] Through the above embodiments, the characteristics of the preset distance between sample data can be utilized to construct a second penalty item that can guide the model to automatically and specifically increase the preset distance between sample data carrying different labels to push away intrusion samples carrying different labels.
[0119] In some embodiments, the combination of the first penalty term and the second penalty term to obtain the target loss function may include the following when specifically implemented:
[0120] According to the following formula, the target loss function is obtained by combination:
[0121] ε(L)=(1-μ)ε pull (L)+με push (L)
[0122] Among them, ε(L) represents the loss value of the target loss function, ε pull (L) represents the first penalty parameter, ε push represents the second penalty parameter, and μ represents the preset coefficient.
[0123] Through the above embodiment, the first penalty term and the second penalty term can be used in combination to construct a target loss function that can guide the model to automatically and specifically pull in neighboring samples based on the boundaries of sample data, while deriving intrusion samples.
[0124] In some embodiments, the preset distance may specifically include Mahalanobis distance.
[0125] The Mahalanobis distance can be specifically understood as a distance used to represent the distance between a point and a distribution.
[0126] It should be noted that, in this embodiment, the Mahalanobis distance is selected instead of the Euclidean distance (or Euclidean distance) as the preset distance for distance measurement. This is because based on the Euclidean distance, it is often assumed that each feature dimension of the sample data has the same weight, and no distinction is made between different feature dimensions, which is bound to ignore certain feature statistical information. The target remote sensing image usually has characteristics such as high spectrum and high resolution, which leads to the fact that the feature dimensions obtained based on the target remote sensing image are often relatively high. In this case, it is necessary to distinguish the different feature dimensions obtained, and give greater weights to the main features with higher importance in a targeted manner, so as to enhance the recognition ability of the model and reduce recognition errors. The Mahalanobis distance can be used to measure the distance between a point and a distribution, and can also be used to measure the distance between two points under the same distribution. Compared with the Euclidean distance, the Mahalanobis distance increases the consideration of the covariance matrix.
[0127] Therefore, by using Mahalanobis distance instead of Euclidean distance, the model training process can automatically distinguish different feature dimensions, determine and assign relatively higher weights to feature dimensions with higher importance and greater impact on classification. This allows the model to be more targeted and directional during training, effectively improving model training efficiency, accuracy, and generalization.
[0128] In some embodiments, when the Mahalanobis distance is used as the preset distance, the combination of the first penalty term and the second penalty term to obtain the target loss function may include the following when specifically implemented:
[0129] According to the following formula, the target loss function is obtained by combination:
[0130]
[0131] Among them, ε(L) represents the loss value of the target loss function, M represents the operation on the Mahalanobis distance, and D M represents the generalized Mahalanobis metric.
[0132] Through the above embodiments, the Mahalanobis distance can be introduced and used as the preset distance to construct a target loss function with relatively better effect and stronger pertinence.
[0133] In some embodiments, the above-mentioned target loss function is based on, and the initial image processing model is trained using the labeled sample data to obtain a preset image processing model that meets the requirements. When implemented specifically, it may include the following: converting the model training into an optimal solution to the target loss function under constraints; by using the standardized sample data, the model parameters of the initial image processing model are iteratively solved multiple times to find the model parameters that can minimize the loss value of the target formula function as the final preset image processing model.
[0134] In some embodiments, specifically, the optimal solution to the target loss function can be converted into a convex optimization problem (semidefinite programming, SDP) based on a semidefinite matrix constraint.
[0135] Furthermore, in order to complete the above iterative solution more accurately and efficiently, a non-negative slack variable ξ can be introduced into the objective loss function ijs , to obtain the modified target loss function. Then, the preset image processing model can be determined by solving the optimal solution of the modified target loss function.
[0136] In some embodiments, during specific implementation, the optimal solution of the modified objective loss function can be solved according to the following formula to quickly obtain model parameters that meet the requirements as the preset image processing model:
[0137] Minimize:
[0138] Subject to:
[0139] Through the above embodiments, a preset image processing model that meets the requirements and has high accuracy can be quickly determined by solving the optimal solution of the target loss function.
[0140] In some embodiments, during implementation, a preset proportion of the labeled sample data can be randomly extracted from the labeled sample data as a training set, and the remaining labeled sample data can be used as a test set. Furthermore, the initial image processing model can be trained using the training set according to the target loss function to obtain an intermediate model; the intermediate model can then be tested using the test set, and the model parameters of the intermediate model can be refined and adjusted based on the test results to obtain the preset image processing model.
[0141] In some embodiments, during specific implementation, the presence of a target object in the target area can be determined based on the target processing result. Furthermore, the number of target objects in the target area and the location coordinates of the target objects can be further determined based on the target processing result.
[0142] In some embodiments, during specific implementation, it is also possible to determine the change status and change trend of the target object in multiple continuous different time periods based on the target processing results corresponding to multiple continuous different time periods determined based on remote sensing images of multiple continuous different time periods, and then predict the future changes of the target object.
[0143] As can be seen from the above, based on the remote sensing image processing method provided by the embodiment of this specification, before specific implementation, a model that can automatically shorten the preset distance between pixels of the same type and increase the preset distance between pixels of different types can be trained in advance based on the preset metric learning rules and the idea of metric learning, so that a preset image processing model with high model accuracy and suitable for processing remote sensing images with a high degree of fusion between the target object and the background environment of the target area can be quickly trained; during specific implementation, the target remote sensing image obtained for the target area can be preprocessed according to the preset preprocessing rules to obtain a target remote sensing image with a relatively small data volume and good effect after dimensionality reduction; then the above-mentioned preset image processing model is called to process the target remote sensing image after dimensionality reduction to efficiently and accurately determine whether the target object exists in the target area. This can effectively improve the processing efficiency of remote sensing images and the detection accuracy of target objects in target areas with a high degree of fusion based on remote sensing images in complex scenes.
[0144] See Figure 2 As shown, the embodiment of this specification also provides a method for training a preset image model. The specific implementation of this method may include the following:
[0145] S201: Acquire sample image data;
[0146] S202: setting corresponding labels for the pixels in the sample image data to obtain labeled sample data;
[0147] S203: constructing an initial image processing model and a target loss function based on metric learning according to a preset metric learning rule;
[0148] S204: Based on the target loss function, the labeled sample data is used to train an initial image processing model to obtain a preset image processing model that meets the requirements.
[0149] As can be seen from the above, the training method of the preset image model provided in the embodiment of this specification can, based on the preset metric learning rules and the idea of metric learning, train a model that can automatically and specifically shorten the preset distance between pixels of the same type to pull in neighboring samples, while increasing the preset distance between pixels of different types to push away intrusion samples, thereby quickly training a preset image processing model with high model accuracy and suitable for processing remote sensing images with a high degree of fusion between the target object and the background environment of the target area.
[0150] An embodiment of this specification also provides a server, including a processor and a memory for storing processor executable instructions. When the processor is implemented, it can perform the following steps according to the instructions: obtain a target remote sensing image of a target area; preprocess the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction; call a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule; and determine whether a target object exists in the target area according to the target processing result.
[0151] In order to complete the above instructions more accurately, refer to Figure 3 As shown, the embodiment of this specification also provides another specific server, wherein the server includes a network communication port 301, a processor 302 and a memory 303, and the above structures are connected through internal cables so that each structure can perform specific data interaction.
[0152] The network communication port 301 can be used to obtain a target remote sensing image of a target area.
[0153] The processor 302 can be specifically used to preprocess the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction; call a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule; and determine whether there is a target object in the target area based on the target processing result.
[0154] The memory 303 may be specifically used to store corresponding instruction programs.
[0155] In this embodiment, the network communication port 301 can be a virtual port that is bound to different communication protocols, thereby being capable of sending or receiving different data. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. Furthermore, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM or CDMA; it can also be a Wi-Fi chip; or it can be a Bluetooth chip.
[0156] In this embodiment, the processor 302 can be implemented in any suitable manner. For example, the processor can take the form of a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, an embedded microcontroller, etc. This specification is not limited to this.
[0157] In this embodiment, the memory 303 may include multiple levels. In a digital system, anything that can store binary data can be a memory. In an integrated circuit, a circuit with a storage function that does not have a physical form is also called a memory, such as RAM, FIFO, etc. In a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.
[0158] An embodiment of this specification also provides a computer-readable storage medium based on the above-mentioned remote sensing image processing method, wherein the computer-readable storage medium stores computer program instructions, which, when executed, implement the following: acquiring a target remote sensing image for a target area; preprocessing the target remote sensing image according to preset preprocessing rules to obtain a target remote sensing image after dimensionality reduction; calling a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule; and determining whether a target object exists in the target area according to the target processing result.
[0159] In this embodiment, the storage medium includes, but is not limited to, random access memory (RAM), read-only memory (ROM), cache, hard disk drive (HDD), or memory card. The memory can be used to store computer program instructions. The network communication unit can be an interface configured in accordance with the standards specified by the communication protocol for network connection communication.
[0160] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer-readable storage medium can be explained in comparison with other implementations and will not be repeated here.
[0161] See Figure 4 As shown, at the software level, the embodiments of this specification further provide a remote sensing image processing device, which may specifically include the following structural modules:
[0162] The acquisition module 401 may be used to acquire a target remote sensing image of a target area;
[0163] The preprocessing module 402 may be specifically configured to preprocess the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction;
[0164] The calling module 403 may be specifically configured to call a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule;
[0165] The determination module 404 may be specifically configured to determine whether a target object exists in the target area according to the target processing result.
[0166] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described in terms of functions and are divided into various modules and described separately. Of course, when implementing this specification, the functions of each module can be implemented in the same or multiple software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0167] As can be seen from the above, the remote sensing image processing device provided in the embodiments of this specification can effectively improve the processing efficiency of remote sensing images, as well as the detection accuracy of target objects in target areas with a high degree of fusion based on remote sensing images in complex scenes.
[0168] In a specific scenario example, the remote sensing image processing method provided in the embodiments of this specification can be applied to achieve target detection.
[0169] In this scenario, consider first applying the minimum noise separation matrix T to the input hyperspectral remote sensing image X (e.g., a target remote sensing image), then performing dimensionality reduction in the projected space and disentangling the target from the background noise in the projected space. Subsequently, a metric learning algorithm can be used to learn a distance metric function based on the band information of the typical target and the indistinguishable background area selected by the user. This algorithm automatically finds support vectors that have a strong ability to distinguish between classifications, thereby constructing a suitable classifier (e.g., a preset image processing model) that minimizes the distance between similar classes while maximizing the distance between different classes, thereby achieving good generalization and high classification accuracy.
[0170] For the specific implementation process, see Figure 5 As shown, the following contents may be included.
[0171] In this scenario example, the remote sensing images input into the system can be images regularly taken and uploaded by professional satellite companies using satellites. These images have the characteristics of large memory usage, high spectrum, and high resolution. A remote sensing image reading module is required to read them and save the hyperspectral information.
[0172] In this scenario, after initially reading and acquiring image information, the user can create a polygonal selection to identify the area of interest and the background. After selecting the typical target and background regions, the system will calculate the spectral information corresponding to the pixels within the selected regions. The user can choose to save these target and background band statistics for automatic loading during the next inspection.
[0173] In this scenario, based on the band information of typical target and background areas, the system generates a high-pass filter template (e.g., a preset high-pass filter). After the entire image X is filtered through the filter, image pixel blocks with similar spectral properties can be filtered to generate the noise covariance matrix C. N , and then diagonalize it:
[0174] D N =U T C N U.
[0175] Among them, U is an orthogonal matrix composed of eigenvectors, and the obtained matrix D N is the noise covariance matrix C N The diagonal matrix of eigenvalues arranged in descending order. Further transformation yields:
[0176]
[0177] I=P T C N P.
[0178] Where I is the identity matrix. After projecting the original image X into the new feature space using the transformation matrix P, the noise in the generated projection data has unit variance and is therefore band-independent.
[0179] Next, the noise data can be transformed by the standard principal component transformation to obtain the matrix C after the transformation matrix P D-adj , and further diagonalize:
[0180] C D-adj =P T C N P
[0181] D D-adj =V T C D-adj V.
[0182] Among them, D D-adj C D-adj The diagonal matrix obtained by arranging the eigenvalues of C in descending order, V is D-adj is an orthogonal matrix composed of the eigenvectors of .
[0183] Finally, the minimum noise separation transformation matrix T is the dot product of P and V:
[0184] T=PV.
[0185] In this way, the original image is transformed through the principal component analysis matrix T of two overlapping processes. The elements in the vector obtained after transformation are independent of each other. The retained principal components greatly reduce the dimension of the original image, and the information is arranged from large to small according to the signal-to-noise ratio, thereby overcoming the influence of noise on image quality.
[0186] In this scenario, the original hyperspectral image can be converted into a dimensionality-reduced image X' based on the retained principal component bands. Based on the idea of metric learning, the model requires a convex optimization objective function in which two penalty terms are defined: one for penalizing the distance between adjacent samples of the same category (e.g., the first penalty term), and the other for penalizing the distance between adjacent samples of different categories (e.g., the person penalty term).
[0187] Assume that during the training process, there should be a virtual "Margin" boundary for each sample pair. Samples of the same category can "enter" this Margin, while samples of different categories should "stay away" from this Margin. During the training process, we can focus on intrusion into the margin defined by the unit Margin and The target neighbors are within the boundary and have intrusion vectors with different labels. As the "support vector" in training. Assume that for any sample ( y i ), and Samples with the same label are called neighboring samples. and There are different labels, namely y i ≠y s , is called an intrusion sample. Then this intrusion sample satisfies the following relationship:
[0188]
[0189] When defining the loss function, we need to consider that samples of different categories that invade the "margin" want to be "pushed" outside the "margin", while neighboring samples belonging to the same category want to be "pulled" into the "margin". Therefore, the loss function corresponding to the action "pull" (the first penalty term) is:
[0190]
[0191] The loss function corresponding to the action "push" (the second penalty term):
[0192]
[0193] The combined loss function is:
[0194] ε(L)=(1-μ)ε pull (L)+με push (L).
[0195] Substituting the Mahalanobis distance into the linear transformation L in the loss function, we have:
[0196]
[0197] Solving the loss function is a convex optimization problem based on semidefinite matrix constraints (semidefinite programming SDP). Because sometimes the above conditions may not be strictly met, a non-negative slack variable ξ is introduced ijs , the convex optimization problem to be solved can be written as:
[0198] Minimize:
[0199] Subject to:
[0200] Finally, using the test sample Category y t It can be obtained according to the following equation:
[0201]
[0202] The remote sensing image can then be fed into the trained classifier, returning a classified image. Targets of interest are marked with different colors, providing an objective basis for monitoring construction progress.
[0203] Furthermore, you can also collect pictures with classification errors and input them into the classifier for model optimization to continuously improve the classification accuracy of the classifier.
[0204] In this scenario example, the relevant definitions of metrics and distances used in the specific calculation, as well as the specific calculation and derivation process, can be found in the following content.
[0205] Among them, Metric is a The mapping satisfies the following properties:
[0206] 1) Triangle inequality:
[0207] 2) Non-negativity:
[0208] 3) Symmetry:
[0209] 4) Reflexivity:
[0210] Typically, the input vector can be transformed linearly:
[0211]
[0212] You can then use Euclidean distance as the distance metric:
[0213]
[0214] However, the Euclidean distance typically assumes that each feature dimension of a sample has the same weight, which ignores certain feature statistics. In remote sensing target detection tasks, due to the hyperspectral and high-resolution characteristics of remote sensing images, feature dimensions are often high. Therefore, it is necessary to give greater weight to key features to enhance the classifier's recognition ability. Therefore, in this scenario, the Mahalanobis distance is primarily used as the metric to be trained.
[0215] The Mahalanobis distance can be used to measure the distance between a point and a distribution, or it can be used to measure the distance between two points under the same distribution. It mainly adds the consideration of the covariance matrix on the basis of the Euclidean distance. Suppose a distribution X contains m samples, each sample has n feature dimensions:
[0216]
[0217] Among them, the column vector Represents m samples, row vector represents the distribution vector of n features. Then the mean vector of m samples is:
[0218]
[0219] At this time, the corresponding calculation of the covariance matrix S is as follows:
[0220]
[0221] The covariance term is calculated as:
[0222]
[0223] Then for a mean Multivariate vector sample with covariance matrix S Its Mahalanobis distance is:
[0224]
[0225] When two vector samples both belong to this distribution, the Mahalanobis distance between them is:
[0226]
[0227] Through the above scenario examples, it is verified that the remote sensing image processing method provided in the embodiments of this specification can make full use of the high-spectral and high-resolution characteristics of remote sensing images, design a remote sensing image preprocessing module, and disentangle the target of interest from the difficult-to-distinguish background in the projection space; and also through the metric learning algorithm, maximize the distance between different classes and minimize the distance between the same class, so that the trained model can detect small targets in complex backgrounds with high detection accuracy.
[0228] Although this specification provides the method operation steps as described in the embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. Words such as first and second are used to represent names and do not represent any particular order.
[0229] Those skilled in the art will also appreciate that, in addition to implementing the controller in pure computer-readable program code, it is entirely possible to implement the same functionality by logically programming the method steps in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, and the like. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered structures within the hardware component. Alternatively, the devices for implementing various functions can be considered both software modules implementing the method and structures within the hardware component.
[0230] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer-readable storage media, including storage devices.
[0231] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that this specification can be implemented by means of software plus the necessary general hardware platform. Based on this understanding, the technical solution of this specification can essentially be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of this specification.
[0232] The various embodiments in this specification are described in a progressive manner. References to the common or similar parts of the various embodiments are sufficient. Each embodiment focuses on the differences from the other embodiments. This specification can be used in a variety of general-purpose or specialized computer system environments or configurations. For example, personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.
[0233] Although the present specification has been described through embodiments, those skilled in the art will appreciate that there are many modifications and variations to the present specification without departing from the spirit of the present specification. It is intended that the appended claims include these modifications and variations without departing from the spirit of the present specification.
Claims
1. A remote sensing image processing method, characterized in that: include: Acquire a target remote sensing image of the target area; wherein the target remote sensing image is a remote sensing image in which the target object to be detected and the background environment of the target area are highly integrated; Preprocessing the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction; Calling a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; comprising: cutting the target remote sensing image after dimensionality reduction into a plurality of sub-image blocks according to a preset cutting rule; wherein there is an overlapping area within a preset range between two adjacent sub-image blocks of the plurality of sub-image blocks; packaging and combining the plurality of sub-image blocks, replacing the complete, large-data-volume target remote sensing image after dimensionality reduction, inputting the sub-image blocks into a preset image processing model, and running the model to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule; Determining whether a target object exists in a target area according to the target processing result; The method comprises the steps of: preprocessing the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction, calling a preset high-pass filter to process the target remote sensing image to obtain a noise covariance matrix; wherein the preset high-pass filter is established based on spectral information of the target object and spectral information of the background environment in the remote sensing image; performing a minimum noise separation transformation according to the noise covariance matrix to obtain a principal component analysis matrix of the target remote sensing image; and processing the target remote sensing image using the principal component analysis matrix to obtain a processed target remote sensing image as the target remote sensing image after dimensionality reduction. The preset image processing model is trained in the following manner: obtaining sample image data; setting corresponding labels for pixels in the sample image data to obtain labeled sample data; constructing an initial image processing model and a target loss function based on metric learning according to a preset metric learning rule; and training the initial image processing model using the labeled sample data based on the target loss function to obtain a preset image processing model that meets the requirements; Wherein, based on the target loss function, the initial image processing model is trained using the labeled sample data, including: converting the model training into solving the optimal solution of the target loss function under constraints; converting the optimal solution of the target loss function into a convex optimization problem based on semi-positive matrix constraints; and introducing a non-negative slack variable into the target loss function to obtain a modified target loss function; by using the labeled sample data, the model parameters of the initial image processing model are iteratively solved multiple times to find the model parameters that can minimize the loss value of the modified target loss function, so as to obtain a preset image processing model; In addition, the method also includes: determining the change status and change trend of the target object in multiple continuous different time periods based on the target processing results corresponding to multiple continuous different time periods determined based on the remote sensing images of multiple continuous different time periods, so as to predict the future changes of the target object.
2. The method according to claim 1, characterized in that According to the preset metric learning rules, the target loss function based on metric learning is constructed, including: According to a preset metric learning rule, a first penalty term and a second penalty term are constructed for the distance between two labeled sample data; wherein the first penalty term is used to shorten the preset distance between two labeled sample data carrying the same label; and the second penalty term is used to increase the preset distance between two labeled sample data carrying different labels; The first penalty term and the second penalty term are combined to obtain the target loss function.
3. The method according to claim 2, characterized in that According to the preset metric learning rules, the first penalty term between two labeled sample data is constructed, including: Construct the first penalty term according to the following formula: Among them, ε pull (L) represents the first penalty parameter, Represents the labeled sample data numbered i, represents the labeled sample data numbered j, and Carrying the same label, L represents the operation on the preset distance between samples.
4. The method according to claim 2, characterized in that According to the preset metric learning rules, a second penalty term is constructed for the difference between the two labeled sample data, including: Construct the second penalty term according to the following formula: Among them, ε push (L) represents the second penalty parameter, Represents the labeled sample data numbered i, with label y i , Represents the labeled sample data numbered j, with label y j , Represents the labeled sample data numbered s, with label y s , and Carrying the same label, and Carrying different labels, L represents the operation of the preset distance between samples, y is Represents the penalty coefficient, and the subscript + indicates that the calculation result is non-negative.
5. The method according to claim 2, characterized in that Combining the first penalty term and the second penalty term to obtain the target loss function includes: According to the following formula, the target loss function is obtained by combination: ε(L)=(1-μ)ε pull (L)+with push (L) Among them, ε(L) represents the loss value of the target loss function, ε pull (L) represents the first penalty parameter, ε push represents the second penalty parameter, and μ represents the preset coefficient.
6. The method according to claim 2, characterized in that The preset distance includes the Mahalanobis distance.
7. The method according to claim 6, characterized in that Combining the first penalty term and the second penalty term to obtain the target loss function includes: According to the following formula, the target loss function is obtained by combination: Among them, ε(L) represents the loss value of the target loss function, M represents the operation on the Mahalanobis distance, and D M represents the generalized Mahalanobis metric.
8. The method according to claim 1, characterized in that The target object includes a physical object whose color is similar to the background environment in the target area and is higher than a preset similarity threshold.
9. A remote sensing image processing device, characterized in that: include: An acquisition module is used to acquire a target remote sensing image of a target area; wherein the target remote sensing image is a remote sensing image in which the target object to be detected and the background environment of the target area are highly integrated; A preprocessing module is used to preprocess the target remote sensing image according to a preset preprocessing rule to obtain a target remote sensing image after dimensionality reduction; A calling module is configured to call a preset image processing model to process the target remote sensing image after dimensionality reduction to obtain a corresponding target processing result; wherein the preset image processing model is a model pre-trained according to a preset metric learning rule; the calling module is specifically configured to cut the target remote sensing image after dimensionality reduction into a plurality of sub-image blocks according to a preset cutting rule; wherein there is an overlapping area within a preset range between two adjacent sub-image blocks in the plurality of sub-image blocks; the plurality of sub-image blocks are packaged and combined, and input into the preset image processing model instead of the complete, large-data-volume target remote sensing image after dimensionality reduction, and the model is run to obtain a corresponding target processing result; A determination module, configured to determine whether a target object exists in a target area according to the target processing result; The preprocessing module is specifically configured to: call a preset high-pass filter to process the target remote sensing image to obtain a noise covariance matrix; wherein the preset high-pass filter is established based on the spectral information of the target object and the spectral information of the background environment in the remote sensing image; perform a minimum noise separation transformation according to the noise covariance matrix to obtain a principal component analysis matrix of the target remote sensing image; and process the target remote sensing image using the principal component analysis matrix to obtain a processed target remote sensing image as the target remote sensing image after dimensionality reduction; The preset image processing model is trained in the following manner: obtaining sample image data; setting corresponding labels for pixels in the sample image data to obtain labeled sample data; constructing an initial image processing model and a target loss function based on metric learning according to a preset metric learning rule; and training the initial image processing model using the labeled sample data based on the target loss function to obtain a preset image processing model that meets the requirements; Wherein, based on the target loss function, the initial image processing model is trained using the labeled sample data, including: converting the model training into solving the optimal solution of the target loss function under constraints; converting the optimal solution of the target loss function into a convex optimization problem based on semi-positive matrix constraints; and introducing a non-negative slack variable into the target loss function to obtain a modified target loss function; by using the labeled sample data, the model parameters of the initial image processing model are iteratively solved multiple times to find the model parameters that can minimize the loss value of the modified target loss function, so as to obtain a preset image processing model; In addition, the device is also used to: determine the change status and change trend of the target object in multiple continuous different time periods based on the target processing results corresponding to multiple continuous different time periods determined based on remote sensing images of multiple continuous different time periods, so as to predict the future changes of the target object.
10. A server, characterized in that: The method comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 8 when executing the instructions.
11. A computer-readable storage medium, characterized in that Computer instructions are stored thereon, and when the instructions are executed by a computer device, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Coal gangue identification method and device based on hyperspectral image
CN112990027A