Method and device for generating image change detection model and image change detection
By obtaining calibrated and aligned image pairs and predicting multiple weak change detection models, high-confidence change blocks are determined for supervised training, which solves the problem of low image change detection efficiency in the existing technology and achieves high efficiency and accuracy. Image change detection.
Patent Information
- Application Number
- CN202110322609.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-25
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-03-25
AI Technical Summary
Existing technologies are inefficient in image change detection, especially deep learning methods that require a large amount of manually annotated data to train the change detection model, resulting in high costs and time.
By obtaining calibrated and aligned image pairs and inputting them into a variety of weak change detection models, high-confidence change blocks are determined, and supervised training is performed to generate strong pre-training models, reducing human annotation costs and time.
It improves the efficiency and accuracy of image change detection, reduces the cost and time of manual annotation, and reduces the impact of annotation errors on the model.
Smart Images

Figure CN112990045B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, in particular to the field of computer vision and deep learning technology, and specifically to a method and apparatus for generating an image change detection model and image change detection. Background Art
[0002] Existing technologies usually use images to monitor environmental changes, especially through satellite remote sensing images to determine whether there are illegal buildings, illegal damage to forest land, monitoring of changes in water area, monitoring of forest fires, etc.
[0003] If we use manual methods to analyze image changes with the naked eye, the efficiency is too low. Even if we use deep learning methods to batch review a large number of images, we still need to manually and finely annotate a large number of images taken by different satellites in different scenes to train a change detection model. Summary of the invention
[0004] The present disclosure provides a method, apparatus, device, storage medium and software product for generating an image change detection model.
[0005] According to a first aspect of the present disclosure, a method for generating an image change detection model is provided, comprising: obtaining at least one calibrated and aligned image pair; obtaining at least two weak change detection models; for a target image pair in at least one image pair, inputting the target image pair into at least two weak change detection models respectively to obtain prediction results of at least two change blocks of the target image pair; for an image pair in at least one image pair, determining a high-confidence change block of the target image pair based on the prediction results of at least two change blocks of the target image pair; and using the high-confidence change blocks of the target image pair as samples for supervised training to obtain a strong pre-trained model.
[0006] According to a second aspect of the present disclosure, there is provided an image change detection method, comprising: obtaining an image group to be detected; inputting the image group into a strong pre-trained model generated by the method described in any one of the first aspects, and outputting an image change detection result.
[0007] According to a third aspect of the present disclosure, there is provided an apparatus for generating an image change detection model, comprising: an image acquisition unit configured to acquire at least one calibrated and aligned image pair; a model acquisition unit configured to acquire at least two weak change detection models; a detection unit configured to, for a target image pair in at least one image pair, input the target image pair into at least two weak change detection models respectively, and obtain prediction results of at least two change blocks of the target image pair; a determination unit configured to determine, for an image pair in at least one image pair, a high-confidence change block of the target image pair based on the prediction results of at least two change blocks of the target image pair; and a training unit configured to use the high-confidence change blocks of the target image pair as samples for supervised training, and obtain a strong pre-trained model.
[0008] According to a fourth aspect of the present disclosure, an image change detection device is provided, comprising: an acquisition unit, configured to acquire an image group to be detected; a detection unit, configured to input the image group into a strong pre-trained model generated by the device according to any one of the third aspects, and output an image change detection result.
[0009] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the methods of the first aspect or the second aspect.
[0010] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute a method according to any one of the first aspect or the second aspect.
[0011] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the method according to any one of the first aspect or the second aspect when executed by a processor.
[0012] The embodiments of the present disclosure provide a method and apparatus for generating an image change detection model and image change detection, which obtains effective information with high confidence from multiple weak change detection models, reduces the cost and time of manual labeling, and adopts the idea of partial supervised training to reduce the impact of labeling errors on the model.
[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0015] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0016] Figure 2 is a flow chart of an embodiment of a method for generating an image change detection model according to the present disclosure;
[0017] Figure 3 is a schematic diagram of an application scenario of the method for generating an image change detection model according to the present disclosure;
[0018] Figure 4 is a flowchart of another embodiment of a method for generating an image change detection model according to the present disclosure;
[0019] Figure 5 is a flow chart of an embodiment of a method for image change detection according to the present disclosure;
[0020] Figure 6 is a structural schematic diagram of an embodiment of an apparatus for generating an image change detection model according to the present disclosure;
[0021] Figure 7 is a structural schematic diagram of an embodiment of an image change detection device according to the present disclosure;
[0022] Figure 8 The present invention is a block diagram of an electronic device for implementing the method for generating an image change detection model according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0024] Figure 1 An exemplary system architecture 100 is shown to which the method and apparatus for generating an image change detection model and image change detection according to the embodiments of the present application can be applied.
[0025] like Figure 1As shown, the system architecture 100 may include terminals 101, 102, a network 103, a database server 104, and a server 105. The network 103 is used to provide a medium for communication links between the terminals 101, 102, the database server 104, and the server 105. The network 103 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0026] The user 110 can use the terminals 101 and 102 to interact with the server 105 through the network 103 to receive or send messages, etc. Various client applications can be installed on the terminals 101 and 102, such as model training applications, image recognition applications, shopping applications, payment applications, web browsers, and instant messaging tools.
[0027] The terminals 101 and 102 here can be hardware or software. When the terminals 101 and 102 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Dynamic Image Experts Compression Standard Audio Layer 3), laptops and desktop computers, etc. When the terminals 101 and 102 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0028] When the terminals 101 and 102 are hardware, an image acquisition device may be installed thereon. The image acquisition device may be any device capable of acquiring images, such as a camera, a sensor, a satellite, etc. The user 110 may use the image acquisition device on the terminals 101 and 102 to acquire images, and may also acquire remote sensing images through satellites.
[0029] The database server 104 may be a database server that provides various services. For example, a sample set may be stored in the database server. The sample set includes a large number of samples. The sample may include a sample image pair (two calibrated and aligned sample images) and annotation information corresponding to the sample image pair (which pixels are changed). In this way, the user 110 may also select a sample from the sample set stored in the database server 104 through the terminals 101 and 102.
[0030] The server 105 may also be a server that provides various services, such as a background server that provides support for various applications displayed on the terminals 101 and 102. The background server may train the weak change detection model using samples in the sample set sent by the terminals 101 and 102, and may send the training results (such as the generated strong pre-trained model) to the terminals 101 and 102. In this way, the user can apply the generated image change detection model to determine whether a pair of images have changed and the blocks that have changed.
[0031] The database server 104 and the server 105 here can also be hardware or software. When they are hardware, they can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When they are software, they can be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module. No specific limitation is made here.
[0032] It should be noted that the method for generating an image change detection model and image change detection provided in the embodiments of the present application is generally executed by the server 105. Accordingly, the apparatus for generating an image change detection model and image change detection is generally also disposed in the server 105.
[0033] It should be pointed out that, in the case where the server 105 can implement the related functions of the database server 104 , the database server 104 may not be provided in the system architecture 100 .
[0034] It should be understood that Figure 1 The number of terminals, networks, database servers and servers in the embodiment is only for illustration. Any number of terminals, networks, database servers and servers may be provided according to the implementation requirements.
[0035] Continue to see Figure 2 , which shows a process 200 of an embodiment of a method for generating an image change detection model according to the present application. The method for generating an image change detection model may include the following steps:
[0036] Step 201: Acquire at least one calibrated and aligned image pair.
[0037] In this embodiment, the execution body (eg, Figure 1 The server shown in the figure) can obtain at least one image pair for calibration alignment in a variety of ways. For example, the execution subject can obtain at least one image pair for calibration alignment from a database server (e.g. Figure 1 For another example, the execution subject may also receive a terminal (such as Figure 1The image pairs are collected by the terminals 101 and 102 shown in the figure) or other devices. One image pair includes two calibrated and aligned images. Pairs of calibrated and aligned images (raw data) of multiple satellites, multiple environments, and multiple resolutions can be prepared in advance and stored in the database server 104.
[0038] The raw data should be as diverse as possible so that it can be more generalized in more diverse test scenarios. It is best to include different satellite types (for example, Gaofen-1 and Jilin-1), different environments (such as images from different regions), and different resolutions (sub-meter, 1 meter, 2 meters, etc.).
[0039] The original data are paired images, that is, a pair of images contains images of the same area at two different times. The images need to be aligned. For example, the pixel deviation of the same geographic coordinates of two images cannot exceed 5 pixels.
[0040] Step 202: Obtain at least two weak change detection models.
[0041] In this embodiment, the weak change detection model is a neural network model used to detect whether a pair of images has changed. The input of the model is a pair of images, and the output is a predicted change block.
[0042] Precision labeling can be performed on some pixels of some image pairs in at least one image pair. There is no limit on the number of precision labels, but it is necessary to cover possible scenarios in the application as much as possible. For example, the application may use a resolution of 1 meter or 2 meters, so a part of the 1 meter and 2 meter resolutions need to be precisely labeled. The more scenarios covered by precision labels, the stronger the generalization ability; the more precision labels there are, the better the final model effect will be. The neural network model is trained using precision label data to obtain a weak change detection model (referred to as a weak model).
[0043] Step 203 : for a target image pair in at least one image pair, input the target image pair into at least two weak change detection models respectively to obtain prediction results of at least two change blocks of the target image pair.
[0044] In this embodiment, any number of image pairs in at least one image pair obtained in step 201 are taken as target image pairs, and are predicted respectively using the weak models obtained in step 202. Each model predicts a change detection segmentation result of the same size for each image pair, where the pixel value of the changed area is 1 and the pixel value of the unchanged area is 0. By solving the connected domain of the area with a pixel value of 1 and extracting the edge, the edge vector polygon of each changed area (hereinafter referred to as the changed block) can be obtained. That is, for any image pair, each weak model detects the target image pair and obtains a prediction result of one changed block.
[0045] Step 204 : determining a high-confidence changed block of the target image pair based on the prediction results of at least two changed blocks of the target image pair.
[0046] In this embodiment, a high-confidence change block can be determined based on the overlapping part of the prediction results of at least two change blocks. For each pixel on the image pair, if more than a predetermined number of models predict that it is a changed pixel, the pixel can be determined as a high-confidence change pixel. High-confidence change pixels constitute a high-confidence change block. The predetermined number is configurable and can be set according to the total number of weak models obtained in step 202. The higher the total number, the larger the predetermined number. For example, if there are currently 5 weak models, the predetermined number can be set to 3. If there are currently 3 weak models, the predetermined number can be set to 2.
[0047] Step 205 , using the high-confidence change blocks of the target image pair as samples for supervised training to obtain a strong pre-training model.
[0048] In this embodiment, the high-confidence change blocks of the target image pair in at least one image pair can be directly used as samples for supervised training to obtain a strong pre-trained model (referred to as a strong model). The high-confidence change blocks can also be manually corrected and used as samples for supervised training to obtain a strong pre-trained model.
[0049] The method and device for generating an image change detection model provided by the embodiments of the present disclosure obtain effective information with high confidence from multiple weak change detection models, reduce the cost and time of manual labeling, and adopt the idea of partial supervised training to reduce the impact of labeling errors on the model.
[0050] In some optional implementations of this embodiment, at least two weak change detection models (referred to as weak models) may be obtained by at least one of the following methods:
[0051] 1. Use public change detection datasets to train change detection models. Public change detection datasets often have relatively simple scenes and satellites, but they can also train change detection models with a certain degree of recognition and can be used as weak models.
[0052] 2. Obtain the annotation information of some pixels of at least one image pair, and train a weak change detection model based on the annotation information of some pixels of the image pair. The weak change detection model can be trained separately or combined for each scene to obtain a batch of weak models.
[0053] 3. Traditional change detection algorithm, uses traditional machine learning algorithms for change detection, and some models with better results can also be used as weak models.
[0054] 4. Other approaches, such as procuring change detection services from various sources, can also serve as weak models.
[0055] Weak change detection models are obtained from different sources, which can identify image pairs in different scenes, improving the generalization ability of the model and the performance of the final trained strong model.
[0056] In some optional implementations of the present embodiment, a high-confidence change block of the target image pair is determined based on the prediction results of at least two change blocks of the target image pair, including: voting for overlapping blocks based on the prediction results of at least two change blocks of the target image pair; and determining a change block with a number of votes higher than a predetermined vote threshold as a high-confidence change block of the target image pair.
[0057] There is a large gap between the changed blocks obtained in step 203 and the actual changed blocks, and some changed blocks with low confidence need to be filtered out through algorithm screening.
[0058] Here, a voting algorithm based on the IoU threshold can be used to filter out high-confidence change blocks. IoU is the result of dividing the overlapping part of two areas by the combined part of the two areas. The IoU calculation result is compared with the set threshold.
[0059] 1) The i-th change block B predicted by a model m mi , the IoU (B mi ,B nj ),m≠n.
[0060] 2) Define the support score of model n for model m
[0061] 3) The change block B can be obtained mi The number of votes received is Here α is an adjustable threshold, which can filter out some invalid votes.
[0062] 4) If V mi ≥k, then change block B mi is a high confidence block, otherwise it is a low confidence block. Where k is an adjustable threshold.
[0063] This method can quickly and accurately determine high-confidence blocks and low-confidence blocks from the prediction results of multiple weak models, thereby improving the training speed and accuracy of the model.
[0064] In some optional implementations of the present embodiment, the method further includes: obtaining precise labeled data of at least one image pair; fine-tuning the strong pre-trained model based on the precise labeled data at a predetermined learning rate and in a fully supervised manner to train a final image change detection model. The user can also perform interactive annotation to increase the number of samples. The strong pre-trained model is trained again using the expanded samples, and the learning rate used at this time is less than the learning rate used in step 205, which can be 1 / 10 or 1 / 100 of the learning rate of step 205. The performance of the strong model fine-tuned by the newly added labeled data is further improved.
[0065] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the method for generating an image change detection model according to this embodiment. Figure 3 In the application scenario, the server obtains at least one calibrated and aligned image pair, image 1 and image 1' are a pair, and other image pairs are omitted and not drawn. These image pairs are input into two weak change detection models (only two are schematically listed in the figure, and more types can actually be supported). Each weak change detection model obtains the prediction result of the changed block, and the changed pixels are represented by hollow circles in the figure. The different prediction results are voted to determine the high-confidence changed blocks (in this example, the pixels that are considered to be changed by the two weak models are determined as high-confidence pixels). Then, a strong pre-trained model is trained based on the high-confidence changed blocks determined by each image pair.
[0066] Further references Figure 4 , which shows a process 400 of another embodiment of a method for generating an image change detection model. The process 400 of the method for generating an image change detection model includes the following steps:
[0067] Step 401: Acquire at least one calibrated and aligned image pair.
[0068] Step 402: Obtain at least two weak change detection models.
[0069] Step 403 : for a target image pair in at least one image pair, input the target image pair into at least two weak change detection models respectively to obtain prediction results of at least two change blocks of the target image pair.
[0070] Step 404 : Determine a high-confidence changed block of the target image pair based on the prediction results of at least two types of changed blocks of the target image pair.
[0071] Step 405 , using the high-confidence change blocks of the target image pair as samples for supervised training to obtain a strong pre-training model.
[0072] Steps 401-405 are substantially the same as steps 201-205, and thus are not described in detail herein.
[0073] Step 406 : Obtain the type of each pixel annotation of the high-confidence block of the target image pair by the user.
[0074] In this embodiment, the changed blocks and unchanged blocks identified by the model may include high-confidence blocks and low-confidence blocks. High-confidence blocks may be manually screened and may be divided into three types: manually confirmed changed blocks, manually uncertain blocks, and manually confirmed background blocks. Manually confirmed changed blocks are pixels that the user can visually determine have changed from high-confidence changed blocks, and these pixels are marked to form manually confirmed changed blocks. Manually uncertain blocks are pixels that the user cannot visually determine have changed from high-confidence changed blocks and high-confidence unchanged blocks, and these pixels are marked to form manually uncertain blocks. Manually confirmed background blocks are pixels that the user can visually determine have not changed from high-confidence unchanged blocks, and these pixels are marked to form manually confirmed background blocks.
[0075] You can manually label these three types, or just label one or two. All labeled pixels can be used as training samples.
[0076] Step 407 : Determine a training sample based on the prediction results of at least two types of change blocks of the user-annotated type and the target image pair.
[0077] In this embodiment, the image pairs can be directly divided into positive samples (blocks with changes) and negative samples (blocks with no changes) according to the types marked by the user and the types recognized by the model (for example, blocks predicted by the model as changed blocks and blocks predicted by the model as unchanged blocks).
[0078] In some optional implementations of this embodiment, each region only belongs to the following types: manually confirmed as a change block, manually uncertain blocks, manually confirmed as background blocks, low confidence blocks, and areas predicted as background by all models. Since there are real change areas that have not been found, the entire training problem is a partial labeling segmentation problem. The above types can be divided into the following categories for model training:
[0079] 1. Positive samples: manually confirmed as changed blocks
[0080] 2. Negative samples: areas that are manually identified as background blocks and predicted as background by all models
[0081] 3. Suspicious samples: low confidence blocks
[0082] 4. Ignore samples: Artificially uncertain blocks
[0083] In this way, different weights can be set for different samples, which can improve the accuracy of the model, the efficiency of model training, and speed up the convergence of the model.
[0084] Step 408: Perform supervised training based on the training samples to obtain a strong pre-training model.
[0085] In this embodiment, when training the model, for positive samples and negative samples, a normal supervision method may be used, and it is hoped that the prediction result of the positive sample is 1 and the prediction result of the negative sample is 0.
[0086] In some optional implementations of this embodiment, for ignored samples, the loss value of the area corresponding to the ignored samples is not calculated during training, which can reduce the impact of ignored samples on model parameters, improve the accuracy of the model and speed up training.
[0087] In some optional implementations of this embodiment, for suspicious samples, the expected value of the average value of the probability inside the area corresponding to the suspicious samples is set to be less than a predetermined probability threshold. For suspicious samples, it is expected that the average value of the probability inside the area of this type is less than the threshold λ. This constraint is looser than the constraint of negative samples, so the model is allowed to predict a small proportion of positive samples in the area. This can reduce the impact of suspicious samples on model parameters, improve the accuracy of the model and speed up training.
[0088] In some optional implementations of the present embodiment, the method further includes: obtaining precise labeled data of at least one image pair; fine-tuning the strong pre-trained model based on the precise labeled data at a predetermined learning rate and in a fully supervised manner to train a final image change detection model. The user can also perform interactive annotation to increase the number of samples. The strong pre-trained model is trained again using the expanded samples, and the learning rate used at this time is less than the learning rate used in step 408, which can be 1 / 10 or 1 / 100 of the learning rate of step 408. The performance of the strong model fine-tuned by the newly added labeled data is further improved.
[0089] from Figure 4 It can be seen that Figure 2 Compared with the corresponding embodiment, the process 400 of the method for generating an image change detection model in this embodiment embodies the steps of manually screening and expanding training samples. Therefore, the solution described in this embodiment can expand samples at a relatively low cost and improve the accuracy and generalization ability of the model.
[0090] Continue to see Figure 5 , which shows a process 500 of an embodiment of an image change detection method according to the present application. The image change detection method may include the following steps:
[0091] Step 501: Obtain a group of images to be detected.
[0092] In this embodiment, the execution subject of the image change detection method (for example Figure 1 The server 105 shown in FIG. 104 may obtain the image group to be detected in a variety of ways, and the image group may include at least one pair of images. The image group may be a sample image for training an image change detection model. For example, the execution subject may obtain the image group from a database server (e.g., Figure 1 For example, a user may obtain an existing sample set stored in the database server 104 as shown in FIG. Figure 1 The sample images are collected by the terminals 101 and 102 shown in the figure. In this way, the execution subject can receive the sample images collected by the terminal and store these sample images locally. The image can also be an image sent by the terminal for detecting changes.
[0093] Step 502: input the image group into the image change detection model, and output the image change detection result.
[0094] In this embodiment, the image change detection model is an image change detection model trained according to the method of steps 201-205, and outputs an image change detection result, that is, whether the pair of images has changed. The image change detection result can be used as annotation data for training the image change detection model.
[0095] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for generating an image change detection model. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0096] like Figure 6 As shown, the apparatus 600 for generating an image change detection model of this embodiment includes: an image acquisition unit 601, a model acquisition unit 602, a detection unit 603, a determination unit 604, and a training unit 605. The image acquisition unit 601 is configured to acquire at least one calibrated and aligned image pair; the model acquisition unit 602 is configured to acquire at least two weak change detection models; the detection unit 603 is configured to input the target image pair in at least one image pair into at least two weak change detection models respectively, and obtain the prediction results of at least two change blocks of the target image pair; the determination unit 604 is configured to determine the high-confidence change block of the target image pair based on the prediction results of at least two change blocks of the target image pair; the training unit 605 is configured to use the high-confidence change block of the target image pair as a sample for supervised training to obtain a strong pre-training model.
[0097] In this embodiment, the specific processing of the image acquisition unit 601, the model acquisition unit 602, the detection unit 603, the determination unit 604, and the training unit 605 of the apparatus 600 for generating an image change detection model can be referred to. Figure 2 Corresponding to step 201, step 202, step 203, step 204 and step 205 in the embodiment.
[0098] In some optional implementations of the present embodiment, the model acquisition unit 602 is further configured to: acquire at least two weak change detection models by at least one of the following methods: train a weak change detection model using a public change detection data set; acquire annotation information of some pixels of at least one image pair, and train a weak change detection model based on the annotation information of some pixels of the image pair; perform change detection using a traditional machine learning algorithm, and use a model with better effect as a weak change detection model; use change detection services from various sources as weak change detection models.
[0099] In some optional implementations of the present embodiment, the determination unit 604 is further configured to: vote for overlapping blocks in the prediction results of at least two types of change blocks of the target image pair; and determine change blocks with a number of votes higher than a predetermined vote threshold as high-confidence change blocks of the target image pair.
[0100] In some optional implementations of the present embodiment, the training unit 605 is further configured to: obtain the type of each pixel annotation of the high-confidence block of the target image pair by the user; determine the training sample based on the type of user annotation and the prediction results of at least 2 types of changed blocks of the target image pair; perform supervised training based on the training sample to obtain a strong pre-training model.
[0101] In some optional implementations of this embodiment, the types include blocks manually confirmed as changed blocks, blocks manually uncertain, and blocks manually confirmed as background; and the training unit 605 is further configured to: determine positive samples, negative samples, suspicious samples, and ignored samples based on low-confidence blocks of the target image pair, blocks predicted as background by all weak change detection models, blocks manually confirmed as changed blocks, blocks manually uncertain, and blocks manually confirmed as background.
[0102] In some optional implementations of this embodiment, the training unit 605 is further configured to: for ignored samples, not calculate the loss value of the area corresponding to the ignored samples during training.
[0103] In some optional implementations of this embodiment, the training unit 605 is further configured to: for suspicious samples, set the expected value of the average value of the probability inside the area corresponding to the suspicious samples to be less than a predetermined probability threshold.
[0104] In some optional implementations of this embodiment, the training unit 605 is further configured to: obtain precise labeled data of at least one image pair; fine-tune the strong pre-trained model based on the precise labeled data with a predetermined learning rate and in a fully supervised manner to train the final image change detection model.
[0105] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an image change detection device. Figure 5 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0106] like Figure 7 As shown, the image change detection device 700 of this embodiment includes: an acquisition unit 701, configured to acquire an image group to be detected; a detection unit 702, configured to input the image group into a strong pre-trained model generated according to the method described in steps 201-205, and output an image change detection result.
[0107] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0108] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0109] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0110] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0111] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as methods for generating image change detection models. For example, in some embodiments, the method for generating an image change detection model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the method described above for generating an image change detection model may be executed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the method for generating an image change detection model in any other appropriate manner (eg, by means of firmware).
[0112] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0113] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0114] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0115] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0116] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0117] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server may be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The server may be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0118] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0119] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for generating an image change detection model, comprising: acquiring at least one image pair in calibration alignment; Obtain at least 2 weak change detection models; For a target image pair in the at least one image pair, inputting the target image pair into the at least two weak change detection models respectively to obtain prediction results of at least two change blocks of the target image pair; Determining a high-confidence change block of the target image pair based on the prediction results of at least two change blocks of the target image pair, comprising: determining the high-confidence change block based on an overlapping portion of the prediction results of at least two change blocks; Obtaining the type of each pixel annotation of the high-confidence block of the target image pair by the user, wherein the type includes a block manually confirmed as a changed block, a block manually uncertain, and a block manually confirmed as a background; Based on the low-confidence blocks of the target image pair, blocks predicted as background by all weak change detection models, blocks manually confirmed as changes, blocks manually uncertain, and blocks manually confirmed as background, positive samples, negative samples, suspicious samples, and ignored samples are determined; Supervised training is performed based on training samples to obtain a strong pre-training model.
2. The method according to claim 1, wherein: The obtaining of at least two weak change detection models includes: Obtain at least 2 weak change detection models by at least one of the following methods: We use a public change detection dataset to train a weak change detection model; Acquire annotation information of some pixels of the at least one image pair, and train a weak change detection model based on the annotation information of some pixels of the image pair; Use traditional machine learning algorithms for change detection, and use the models with better results as weak change detection models; Use change detection services from various sources as weak change detection models.
3. The method according to claim 1, wherein: The step of determining a high-confidence change block of the target image pair based on prediction results of at least two change blocks of the target image pair includes: Voting for overlapping blocks in the prediction results of at least two types of changed blocks of the target image pair; The change block with the vote count higher than a predetermined vote count threshold is determined as a high-confidence change block of the target image pair.
4. The method according to claim 1, wherein: The method further comprises: For the ignored samples, the loss value of the area corresponding to the ignored samples is not calculated during training.
5. The method according to claim 1, wherein: The method further comprises: For the suspicious sample, the expected value of the average value of the probability inside the area corresponding to the suspicious sample is set to be smaller than a predetermined probability threshold.
6. The method according to any one of claims 1 to 5, wherein: The method further comprises: Acquiring precise calibration data of the at least one image pair; The strong pre-training model is fine-tuned based on the precise labeled data with a predetermined learning rate and in a fully supervised manner to train a final image change detection model.
7. A method for detecting image changes, comprising: Obtaining an image group to be detected; The image group is input into a strong pre-trained model generated by the method according to any one of claims 1 to 6, and an image change detection result is output.
8. A device for generating an image change detection model, comprising: an image acquisition unit configured to acquire at least one image pair of calibration alignment; A model acquisition unit is configured to acquire at least two weak change detection models; a detection unit configured to input, for a target image pair in the at least one image pair, the target image pair into the at least two weak change detection models respectively, to obtain prediction results of at least two change blocks of the target image pair; A determination unit is configured to determine, for an image pair in the at least one image pair, a high-confidence change block of the target image pair based on prediction results of at least two change blocks of the target image pair, including: determining the high-confidence change block based on an overlapping portion of the prediction results of at least two change blocks; The training unit is configured to obtain the type of each pixel annotation of the high-confidence block of the target image pair by the user, wherein the type includes blocks manually confirmed as changed blocks, blocks manually uncertain, and blocks manually confirmed as background; determine positive samples, negative samples, suspicious samples, and ignored samples based on the low-confidence blocks of the target image pair, blocks predicted as background by all weak change detection models, blocks manually confirmed as changed blocks, blocks manually uncertain, and blocks manually confirmed as background; and perform supervised training based on the training samples to obtain a strong pre-training model.
9. The device according to claim 8, wherein: The model acquisition unit is further configured to: Obtain at least 2 weak change detection models by at least one of the following methods: We use a public change detection dataset to train a weak change detection model; Acquire annotation information of some pixels of the at least one image pair, and train a weak change detection model based on the annotation information of some pixels of the image pair; Use traditional machine learning algorithms for change detection, and use the models with better results as weak change detection models; Use change detection services from various sources as weak change detection models.
10. The device according to claim 8, wherein: The determining unit is further configured to: Voting for overlapping blocks in the prediction results of at least two types of changed blocks of the target image pair; The change block with the vote count higher than a predetermined vote count threshold is determined as a high-confidence change block of the target image pair.
11. The device according to claim 8, wherein: The training unit is further configured to: For the ignored samples, the loss value of the area corresponding to the ignored samples is not calculated during training.
12. The device according to claim 8, wherein: The training unit is further configured to: For the suspicious sample, the expected value of the average value of the probability inside the area corresponding to the suspicious sample is set to be smaller than a predetermined probability threshold.
13. The device according to any one of claims 8 to 12, wherein: The training unit is further configured to: Acquiring precise calibration data of the at least one image pair; The strong pre-training model is fine-tuned based on the precise labeled data with a predetermined learning rate and in a fully supervised manner to train a final image change detection model.
14. An image change detection device, comprising: An acquisition unit, configured to acquire a group of images to be detected; The detection unit is configured to input the image group into a strong pre-trained model generated by the device according to any one of claims 8-13, and output an image change detection result.
15. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
