Dam surface image restoration method, device and equipment and storage medium

By constructing an initial generative adversarial network and conducting iterative training, the GAN model is optimized, which solves the problem of GAN difficulty in converging during dam surface image repair, achieves high-quality image repair effects, and provides support for dam maintenance.

CN118822909AActive Publication Date: 2024-10-22CHINA THREE GORGES CORPORATION

Patent Information

Application Number
CN202410940896.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-22
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

In the existing technology, the adversarial neural network model GAN ​​is difficult to converge and unstable, resulting in poor surface image repair effects on the dam.

Method used

By constructing an initial generative adversarial network and using historical visible light image sets and sonar image sets for iterative training, the optimized target generator and discriminator are obtained, achieving a balance point between the generator and the discriminator, and solving the problem that GAN is difficult to converge. , and repair the dam surface image through the optimized target generation adversarial network.

Benefits of technology

It generates a complete and high-quality dam surface image, restores the parts blocked by debris, provides support for dam maintenance, and solves the problem of GAN instability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118822909A_ABST
    Figure CN118822909A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, and discloses a dam surface image restoration method, device and equipment and a storage medium, and the method comprises the steps: firstly constructing an initial generative adversarial network comprising a generator and two discriminators; the visible light image and the sonar image are fused into the initial generative adversarial network for game playing and reach the balance point to obtain the optimized target generative adversarial network, and the problems that the generative adversarial network is difficult to converge and unstable are solved. And finally, the dam surface image is restored through the optimized target generative adversarial network, the part, shielded by sundries, of the dam surface is restored, the complete high-quality dam surface image is generated, and support is provided for dam maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method, device, equipment and storage medium for repairing a dam surface image. Background Art

[0002] At present, due to environmental factors, underwater image collection on the dam surface is blocked by debris such as water plants, and the collected images are incomplete and unclear. The adversarial neural network model GAN ​​can be used to process the image and restore it.

[0003] GAN consists of two important parts: Generator (G) and Discriminator (D).

[0004] Generator: Generates data through a machine, with the goal of "cheating" the discriminator as much as possible. The generated data is recorded as G(z);

[0005] Discriminator: Determines whether the data is real data or data generated by the "generator". The purpose is to find out the "fake data" created by the "generator" as much as possible. Its input parameter is x, x represents the data, and the output D(x) represents the probability that x is real data. If it is 1, it means that it is 100% real data, and if the output is 0, it means that it cannot be real data.

[0006] G and D form a dynamic confrontation (or game process). As the training (confrontation) progresses, the data generated by G becomes closer and closer to the real data, and the level of data identification by D becomes higher and higher. In an ideal state, G can generate data that is "indistinguishable from the real"; but for D, it is difficult to determine whether the data generated by the generator is real, so D(G(z)) = 0.5. After the training is completed, a generative model G can be obtained, which can be used to generate data that is indistinguishable from the real.

[0007] However, in the existing technology, the adversarial neural network model GAN ​​is difficult to converge and unstable. The generator and the discriminator need to be well synchronized, but in actual training, it is easy for D to converge and G to diverge. Summary of the invention

[0008] In view of this, the present invention provides a dam surface image restoration method, device, equipment and storage medium to solve the problem of difficulty in convergence and instability of the adversarial neural network model GAN ​​in the prior art.

[0009] In a first aspect, the present invention provides a method for repairing a dam surface image, the method comprising:

[0010] Obtain a set of historical visible light images and a set of historical sonar images of the dam surface; construct an initial generative adversarial network, which includes an initial generator, a first initial discriminator, and a second initial discriminator; use the historical visible light image set and the historical sonar image set to iteratively train the initial generator, the first initial discriminator, and the second initial discriminator to obtain a target generator, a first target discriminator, and a second target discriminator; determine a target generative adversarial network based on the target generator, the first target discriminator, and the second target discriminator; obtain a set of visible light images and a set of sonar images of the surface of the dam to be repaired, and input the visible light image set and the sonar image set into the target generative adversarial network for processing to obtain an image of the repaired dam surface.

[0011] The dam surface image restoration method provided by the present invention first constructs an initial generative adversarial network including a generator and two discriminators. Further, by fusing the visible light image and the sonar image into the initial generative adversarial network to conduct a game and reach a balance point to obtain an optimized target generative adversarial network, the problem of the generative adversarial network being difficult to converge and unstable is solved. Finally, the dam surface image is restored by the optimized target generative adversarial network, the part of the dam surface blocked by debris is restored, and a complete high-quality dam surface image is generated, which provides support for the maintenance of the dam.

[0012] In an optional implementation, the initial generator, the first initial discriminator, and the second initial discriminator are iteratively trained using the historical visible light image set and the historical sonar image set to obtain the target generator, the first target discriminator, and the second target discriminator, including:

[0013] The historical visible light image set and the historical sonar image set are input into the initial generator to obtain a fused image set; the fused image set and the historical visible light image set are input into the first initial discriminator, and the fused image set and the historical sonar image set are input into the second initial discriminator; the target generator, the first target discriminator and the second target discriminator are obtained by continuously conducting adversarial training on the initial generator, the first initial discriminator and the second initial discriminator.

[0014] The dam surface image restoration method provided by the present invention firstly fuses a historical visible light image set and a historical sonar image set through an initial generator to obtain a fused image set; secondly, inputs the fused image set and the historical visible light image set into a first initial discriminator to discriminate the visible light image through the first initial discriminator; further, inputs the fused image set and the historical sonar image set into a second initial discriminator to discriminate the sonar image through the second initial discriminator; finally, the initial generator, the first initial discriminator and the second initial discriminator are continuously subjected to adversarial training until a trained target generator, a first target discriminator and a second target discriminator are obtained, thereby solving the problem that the generative adversarial network is difficult to converge and unstable, and providing support for subsequent restoration of the dam surface image.

[0015] In an optional implementation, the historical visible light image set and the historical sonar image set are input into the initial generator to obtain a fused image set, including:

[0016] Feature extraction is performed on the historical visible light image set and the historical sonar image set respectively to obtain a visible light image feature set and a sonar image feature set; the visible light image feature set and the sonar image feature set are fused to obtain a fused image feature set; and deconvolution reconstruction is performed on the fused image feature set to obtain a fused image set.

[0017] The dam surface image restoration method provided by the present invention first extracts features from the historical visible light image set and the historical sonar image set respectively. Secondly, the extracted visible light image feature set and the sonar image feature set are fused. Finally, the fused image feature set is deconvoluted and reconstructed to obtain the final fused image set, which provides support for the subsequent training of the initial generator.

[0018] In an optional implementation, the target generator, the first target discriminator and the second target discriminator are obtained by continuously performing adversarial training on the initial generator, the first initial discriminator and the second initial discriminator, including:

[0019] The initial generator, the first initial discriminator and the second initial discriminator are subjected to adversarial training, and a first probability output by the initial generator, a second probability output by the first initial discriminator and a third probability output by the second initial discriminator are obtained; a first difference value between the first probability and the second probability, and a second difference value between the first probability and the third probability are obtained; it is determined whether the first difference value and the second difference value reach a preset target; when the first difference value and the second difference value do not reach the preset target, the adversarial training of the initial generator, the first initial discriminator and the second initial discriminator is repeatedly iterated until the first difference value and the second difference value reach the preset target, and the training is stopped, and a target generator, a first target discriminator and a second target discriminator are obtained.

[0020] The dam surface image restoration method provided by the present invention can further determine whether to continue adversarial training by judging whether the first difference value between the first probability output by the initial generator and the second probability output by the first initial discriminator during adversarial training, and the third probability output by the second initial discriminator between the first probability output by the second initial discriminator and the third probability output by the second initial discriminator reach a preset target, thereby solving the problem that the generative adversarial network is difficult to converge and unstable.

[0021] In a second aspect, the present invention provides a dam surface image restoration device, the device comprising:

[0022] An acquisition module is used to acquire a set of historical visible light images and a set of historical sonar images of the dam surface; a construction module is used to construct an initial generative adversarial network, which includes an initial generator, a first initial discriminator, and a second initial discriminator; a training module is used to iteratively train the initial generator, the first initial discriminator, and the second initial discriminator using the historical visible light image set and the historical sonar image set to obtain a target generator, a first target discriminator, and a second target discriminator; a determination module is used to determine a target generative adversarial network based on the target generator, the first target discriminator, and the second target discriminator; an acquisition and processing module is used to acquire a set of visible light images and a set of sonar images of the surface of the dam to be repaired, and input the visible light image set and the sonar image set into the target generative adversarial network for processing to obtain an image of the repaired dam surface.

[0023] In an optional implementation, the training module includes:

[0024] The first input submodule is used to input the historical visible light image set and the historical sonar image set into the initial generator to obtain a fused image set; the second input submodule is used to input the fused image set and the historical visible light image set into the first initial discriminator, and input the fused image set and the historical sonar image set into the second initial discriminator; the training submodule is used to obtain the target generator, the first target discriminator and the second target discriminator by continuously conducting adversarial training on the initial generator, the first initial discriminator and the second initial discriminator.

[0025] In an optional implementation, the first input submodule includes:

[0026] The extraction unit is used to perform feature extraction on the historical visible light image set and the historical sonar image set respectively to obtain a visible light image feature set and a sonar image feature set; the fusion unit is used to fuse the visible light image feature set and the sonar image feature set to obtain a fused image feature set; the deconvolution reconstruction unit is used to perform deconvolution reconstruction on the fused image feature set to obtain a fused image set.

[0027] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the dam surface image repair method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0028] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the dam surface image restoration method of the first aspect or any corresponding embodiment thereof.

[0029] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the dam surface image restoration method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 is a schematic flow chart of a dam surface image restoration method according to an embodiment of the present invention;

[0032] Figure 2 is a flow chart of another dam surface image restoration method according to an embodiment of the present invention;

[0033] Figure 3 is a structural block diagram of a dam surface image restoration device according to an embodiment of the present invention;

[0034] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0036] At present, due to factors such as distance and environment, the dam surface images collected on site are blocked or cannot be fully photographed, so it is impossible to obtain a clear image. An embodiment of the present invention provides a dam surface image restoration method, which optimizes the generative adversarial network to achieve the effect of generating high-quality pictures.

[0037] According to an embodiment of the present invention, an embodiment of a dam surface image restoration method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] In this embodiment, a dam surface image restoration method is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 1 FIG. 4 is a flow chart of a dam surface image restoration method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0039] Step S101, obtaining a historical visible light image set and a historical sonar image set of the dam surface.

[0040] Specifically, the historical visible light image set and the historical sonar image set respectively include a plurality of visible light images and a plurality of sonar images of the dam surface acquired within a historical time period.

[0041] Step S102, constructing an initial generative adversarial network.

[0042] Specifically, the generative adversarial network (GAN) uses adversarial training to make the samples generated by the generative network conform to the real data distribution. In the generative adversarial network, there are two networks for adversarial training. One is the discriminant network, whose goal is to judge as accurately as possible whether a sample comes from real data or is generated by the generative network; the other is the generative network, whose goal is to generate samples whose sources cannot be distinguished by the discriminant network. These two networks with opposite goals are constantly trained alternately. When they finally converge, if the discriminant network can no longer determine the source of a sample, then it is equivalent to the generative network being able to generate samples that conform to the real data distribution.

[0043] The initial generative adversarial network constructed in this embodiment may include a first generator G and two discriminators, namely a first initial discriminator Da and a second initial discriminator Db.

[0044] Step S103, using the historical visible light image set and the historical sonar image set to iteratively train the initial generator, the first initial discriminator and the second initial discriminator to obtain the target generator, the first target discriminator and the second target discriminator.

[0045] Specifically, the historical visible light image set and the historical sonar image set are integrated into the initial generative adversarial network for game adversarial training until the equilibrium point is reached to obtain the optimized target generator, the first target discriminator and the second target discriminator.

[0046] Step S104, determining a target generative adversarial network according to the target generator, the first target discriminator and the second target discriminator.

[0047] Specifically, a corresponding target generation adversarial network can be formed by a target generator, a first target discriminator and a second target discriminator.

[0048] Step S105, obtaining a visible light image set and a sonar image set of the surface of the dam to be repaired, and inputting the visible light image set and the sonar image set into a target generative adversarial network for processing to obtain an image of the repaired dam surface.

[0049] Specifically, the currently collected visible light image set and sonar image set of the surface of the dam to be repaired are obtained.

[0050] Furthermore, the collected visible light image set and sonar image set are input into the optimized target generative adversarial network for processing, and the corresponding repaired dam surface image can be output.

[0051] The dam surface image restoration method provided in this embodiment first constructs an initial generative adversarial network including a generator and two discriminators. Further, by fusing the visible light image and the sonar image into the initial generative adversarial network to conduct a game and reach a balance point to obtain an optimized target generative adversarial network, the problem of the generative adversarial network being difficult to converge and unstable is solved. Finally, the dam surface image is restored by the optimized target generative adversarial network, the part of the dam surface blocked by debris is restored, and a complete high-quality dam surface image is generated, which provides support for the maintenance of the dam.

[0052] In this embodiment, a dam surface image restoration method is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 2 FIG. 4 is a flow chart of a dam surface image restoration method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0053] Step S201, obtain the historical visible light image set and historical sonar image set of the dam surface. Figure 1Step S101 of the illustrated embodiment will not be described in detail here.

[0054] Step S202: construct an initial generative adversarial network. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0055] Step S203, using the historical visible light image set and the historical sonar image set to iteratively train the initial generator, the first initial discriminator and the second initial discriminator to obtain the target generator, the first target discriminator and the second target discriminator.

[0056] Specifically, the above step S203 includes:

[0057] Step S2031, inputting the historical visible light image set and the historical sonar image set into the initial generator to obtain a fused image set.

[0058] Specifically, the generator is a network that can capture data distribution and generate new samples. It is generally composed of multiple layers of convolution, fully connected layers, etc., and uses upsampling to generate a picture of appropriate size through the received noise. The noise here is actually a random number that obeys a certain distribution. Generally, a normal distribution random number is selected. The random number forms a vector of length n, and each such vector will eventually generate a corresponding picture.

[0059] In this embodiment, by inputting the historical visible light image set and the historical sonar image set into the initial generator for processing, the historical visible light image set and the historical sonar image set can be fused to obtain a fused image set.

[0060] In some optional implementations, the above step S2031 includes:

[0061] Step a1, extracting features from the historical visible light image set and the historical sonar image set respectively to obtain a visible light image feature set and a sonar image feature set.

[0062] Step a2, fusing the visible light image feature set and the sonar image feature set to obtain a fused image feature set.

[0063] Step a3, performing deconvolution reconstruction on the fused image feature set to obtain a fused image set.

[0064] Specifically, the historical visible light image set and the historical sonar image set are input into the convolutional neural network CNN of the generator, and the features of the visible light images and sonar images are extracted through multiple convolution blocks to obtain the corresponding visible light image feature set and sonar image feature set.

[0065] Furthermore, the fusion of the visible light image feature set and the sonar image feature set output by the last convolutional layer can be achieved through simple concatenation, linear addition, multiplication and other transformation methods (such as factor analysis, principal component analysis PCA):

[0066] (1) Linear addition: The feature fusion method used by the upper and lower layers in ResNet or RIR is pixel-by-pixel addition. Addition does not change the gradient. The operation is also relatively simple and fast. Restrictions: First, the two inputs x1 and x2 should have the same or similar meanings, or the input and output should correspond. In ResNet, assume that one of the inputs may be 0, and the input may be one of the outputs. Direct addition also means that the two inputs need to have the same range and be of equal importance.

[0067] (2) Multiplication: Generally, a block is used to obtain the weight of the feature map, which is then multiplied by the feature map to obtain a weighted effect.

[0068] (3) Concatenation: The obtained feature maps are stacked up, and then other convolution operations are performed to combine things of different dimensions. The purpose here is to combine the features at different positions to generate new features. The main purpose is to preserve the previous low-dimensional features so as not to lose too much.

[0069] Finally, the fused image feature set is reconstructed through multiple deconvolution blocks to obtain the final fused image set.

[0070] Step S2032: input the fused image set and the historical visible light image set into a first initial discriminator, and input the fused image set and the historical sonar image set into a second initial discriminator.

[0071] Specifically, the fused image and the visible light image can be distinguished by the first initial discriminator.

[0072] Furthermore, the fused image and the sonar image can be distinguished by a second initial discriminator.

[0073] Step S2033, the target generator, the first target discriminator and the second target discriminator are obtained by continuously performing adversarial training on the initial generator, the first initial discriminator and the second initial discriminator.

[0074] Specifically, the optimized target generator, the first target discriminator and the second target discriminator are generated by continuously performing adversarial training on the initial generator, the first initial discriminator and the second initial discriminator until a balance is reached.

[0075] In some optional implementations, the above step S2033 includes:

[0076] Step b1, conduct adversarial training on the initial generator, the first initial discriminator and the second initial discriminator, and obtain a first probability output by the initial generator, a second probability output by the first initial discriminator and a third probability output by the second initial discriminator.

[0077] Step b2: obtaining a first difference value between the first probability and the second probability, and a second difference value between the first probability and the third probability.

[0078] Step b3, determining whether the first difference value and the second difference value reach a preset target.

[0079] Step b4, when the first difference value and the second difference value do not reach the preset target, the adversarial training of the initial generator, the first initial discriminator and the second initial discriminator is repeatedly iterated until the first difference value and the second difference value reach the preset target, the training is stopped, and the target generator, the first target discriminator and the second target discriminator are obtained.

[0080] Specifically, when the initial generator generates the fused image set f = G(a, b), for samples that obey the true distribution P data (x), the generator will be generated from samples {x1,x2,…,x m The probability distribution P of data The probability model P with learning parameters θ in (x) model (x; θ), the possibility of generating sample L is defined as shown in the following relationship (1):

[0081]

[0082] Furthermore, by performing the maximum likelihood estimation shown in the following relation (2), P data (x) and P model The variance between (x;θ) is minimal:

[0083]

[0084] Furthermore, the generator is a network that can capture data distribution and generate new samples. It is generally composed of multiple layers of convolution, fully connected layers, etc., and uses upsampling to generate a picture of appropriate size through the received noise. The noise here is actually a random number that obeys a certain distribution. Generally, a normal distribution random number is selected. The random number forms a vector of length n, and each such vector will eventually generate a corresponding picture.

[0085] If the input is sampled from the latent space z, it will generate a sample x = G(z). With the help of the neural network, the probability distribution P formed by the samples generated by the generator G (x), the generator training goal is to make P G (x) and Pdata (x) is close, and the optimization formula is shown in the following relation (3):

[0086]

[0087] Here, DIV represents the difference between two distributions.

[0088] Furthermore, the objective function of the judgement device D is shown in the following relation (4):

[0089]

[0090] Furthermore, the objective function of the generator and the judger combined is shown in the following equation (5):

[0091]

[0092] Furthermore, this example includes an initial generator and two discriminators. Therefore, the corresponding objective function is shown in the following equation (6):

[0093]

[0094] Furthermore, through an initial generator G, a first initial discriminator Da, and a second initial discriminator Db and a confrontation process, P G and two actual distributions P a and P b The difference between them becomes smaller at the same time.

[0095] Furthermore, the training objective of the initial generator G is to minimize the above relationship (6), and the training objective of the first initial discriminator Da and the second initial discriminator Db is to maximize the above relationship (6).

[0096] Furthermore, when the difference is minimized and reaches a balance point, that is, the first difference value and the second difference value reach a balance point, the optimized target generator, the first target discriminator and the second target discriminator are obtained.

[0097] Step S204: Determine a target generative adversarial network based on the target generator, the first target discriminator, and the second target discriminator. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0098] Step S205, obtain a visible light image set and a sonar image set of the surface of the dam to be repaired, and input the visible light image set and the sonar image set into the target generative adversarial network for processing to obtain the surface image of the repaired dam. Figure 1 Step S105 of the illustrated embodiment will not be described in detail here.

[0099] The dam surface image restoration method provided in this embodiment first extracts features from the historical visible light image set and the historical sonar image set respectively. Secondly, the extracted visible light image feature set and the sonar image feature set are fused. Finally, the fused image feature set is deconvoluted and reconstructed to obtain the final fused image set. Further, the fused image set and the historical visible light image set are input into the first initial discriminator to discriminate the visible light image through the first initial discriminator, and then the fused image set and the historical sonar image set are input into the second initial discriminator to discriminate the sonar image through the second initial discriminator. Finally, by continuously conducting adversarial training on the initial generator, the first initial discriminator and the second initial discriminator, and by judging whether the first difference value between the first probability output by the initial generator and the second probability output by the first initial discriminator during the adversarial training process and the third probability output by the second initial discriminator of the first probability and the third probability output by the second initial discriminator reach the preset target, it can be further judged whether to continue the adversarial training. Finally, the dam surface image was repaired through the optimized target generative adversarial network, the part of the dam surface obscured by debris was restored, and a complete and high-quality dam surface image was generated, providing support for the maintenance of the dam.

[0100] In this embodiment, a dam surface image restoration device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0101] This embodiment provides a dam surface image restoration device, such as Figure 3 As shown, including:

[0102] The acquisition module 301 is used to acquire a historical visible light image set and a historical sonar image set of the dam surface.

[0103] The construction module 302 is used to construct an initial generative adversarial network, where the initial generative adversarial network includes an initial generator, a first initial discriminator, and a second initial discriminator.

[0104] The training module 303 is used to iteratively train the initial generator, the first initial discriminator and the second initial discriminator using the historical visible light image set and the historical sonar image set to obtain the target generator, the first target discriminator and the second target discriminator.

[0105] The determination module 304 is used to determine a target generative adversarial network according to the target generator, the first target discriminator and the second target discriminator.

[0106] The acquisition and processing module 305 is used to acquire a visible light image set and a sonar image set of the surface of the dam to be repaired, and input the visible light image set and the sonar image set into the target generative adversarial network for processing to obtain the surface image of the repaired dam.

[0107] In some optional implementations, the training module 303 includes:

[0108] The first input submodule is used to input the historical visible light image set and the historical sonar image set into the initial generator to obtain a fused image set.

[0109] The second input submodule is used to input the fused image set and the historical visible light image set into the first initial discriminator, and input the fused image set and the historical sonar image set into the second initial discriminator.

[0110] The training submodule is used to obtain the target generator, the first target discriminator and the second target discriminator by continuously performing adversarial training on the initial generator, the first initial discriminator and the second initial discriminator.

[0111] In some optional embodiments, the first input submodule includes:

[0112] The extraction unit is used to extract features from the historical visible light image set and the historical sonar image set respectively to obtain a visible light image feature set and a sonar image feature set.

[0113] The fusion unit is used to fuse the visible light image feature set and the sonar image feature set to obtain a fused image feature set.

[0114] The deconvolution reconstruction unit is used to perform deconvolution reconstruction on the fused image feature set to obtain a fused image set.

[0115] In some optional embodiments, the training submodule includes:

[0116] A training and acquisition unit, used to perform adversarial training on the initial generator, the first initial discriminator, and the second initial discriminator, and to acquire a first probability output by the initial generator, a second probability output by the first initial discriminator, and a third probability output by the second initial discriminator;

[0117] an acquiring unit, configured to acquire a first difference value between the first probability and the second probability, and a second difference value between the first probability and the third probability;

[0118] A judging unit, used to judge whether the first difference value and the second difference value reach a preset target;

[0119] An iterative unit is used to repeatedly iterate the adversarial training of the initial generator, the first initial discriminator and the second initial discriminator when the first difference value and the second difference value do not reach the preset target, stop the training until the first difference value and the second difference value reach the preset target, and obtain the target generator, the first target discriminator and the second target discriminator.

[0120] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0121] The dam surface image restoration device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0122] The embodiment of the present invention also provides a computer device having the above Figure 3 The dam surface image restoration device is shown.

[0123] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.

[0124] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0125] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0126] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0127] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0128] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0129] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0130] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0131] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A dam surface image restoration method, characterized in that: The method comprises: Obtain historical visible light image sets and historical sonar image sets of the dam surface; Constructing an initial generative adversarial network, wherein the initial generative adversarial network includes an initial generator, a first initial discriminator, and a second initial discriminator; Iteratively training the initial generator, the first initial discriminator, and the second initial discriminator using the historical visible light image set and the historical sonar image set to obtain a target generator, a first target discriminator, and a second target discriminator; Determining a target generative adversarial network according to the target generator, the first target discriminator, and the second target discriminator; A visible light image set and a sonar image set of the surface of the dam to be repaired are obtained, and the visible light image set and the sonar image set are input into the target generative adversarial network for processing to obtain a surface image of the repaired dam.

2. The method according to claim 1, characterized in that The method uses the historical visible light image set and the historical sonar image set to iteratively train the initial generator, the first initial discriminator, and the second initial discriminator to obtain a target generator, a first target discriminator, and a second target discriminator, including: Inputting the historical visible light image set and the historical sonar image set into the initial generator to obtain a fused image set; Inputting the fused image set and the historical visible light image set into the first initial discriminator, and inputting the fused image set and the historical sonar image set into the second initial discriminator; The target generator, the first target discriminator and the second target discriminator are obtained by continuously performing adversarial training on the initial generator, the first initial discriminator and the second initial discriminator.

3. The method according to claim 2, characterized in that Inputting the historical visible light image set and the historical sonar image set into the initial generator to obtain a fused image set, including: Extracting features from the historical visible light image set and the historical sonar image set respectively to obtain a visible light image feature set and a sonar image feature set; Fusing the visible light image feature set and the sonar image feature set to obtain a fused image feature set; Deconvolution is performed on the fused image feature set to obtain the fused image set.

4. The method according to claim 2, characterized in that: The target generator, the first target discriminator and the second target discriminator are obtained by continuously performing adversarial training on the initial generator, the first initial discriminator and the second initial discriminator, including: Performing adversarial training on the initial generator, the first initial discriminator, and the second initial discriminator, and obtaining a first probability output by the initial generator, a second probability output by the first initial discriminator, and a third probability output by the second initial discriminator; Obtaining a first difference value between the first probability and the second probability, and a second difference value between the first probability and the third probability; Determining whether the first difference value and the second difference value reach a preset target; When the first difference value and the second difference value do not reach the preset target, the adversarial training of the initial generator, the first initial discriminator and the second initial discriminator is repeatedly iterated until the first difference value and the second difference value reach the preset target, and the training is stopped to obtain the target generator, the first target discriminator and the second target discriminator.

5. A dam surface image restoration device, characterized in that: The device comprises: An acquisition module, used for acquiring a historical visible light image set and a historical sonar image set of the dam surface; A construction module, used to construct an initial generative adversarial network, wherein the initial generative adversarial network includes an initial generator, a first initial discriminator, and a second initial discriminator; A training module, used for iteratively training the initial generator, the first initial discriminator and the second initial discriminator using the historical visible light image set and the historical sonar image set to obtain a target generator, a first target discriminator and a second target discriminator; A determination module, configured to determine a target generative adversarial network according to the target generator, the first target discriminator, and the second target discriminator; The acquisition and processing module is used to acquire a visible light image set and a sonar image set of the surface of the dam to be repaired, and input the visible light image set and the sonar image set into the target generation adversarial network for processing to obtain the surface image of the repaired dam.

6. The device according to claim 5, characterized in that The training module comprises: A first input submodule, used for inputting the historical visible light image set and the historical sonar image set into the initial generator to obtain a fused image set; A second input submodule, configured to input the fused image set and the historical visible light image set into the first initial discriminator, and input the fused image set and the historical sonar image set into the second initial discriminator; The training submodule is used to obtain the target generator, the first target discriminator and the second target discriminator by continuously performing adversarial training on the initial generator, the first initial discriminator and the second initial discriminator.

7. The device according to claim 6, characterized in that The first input submodule comprises: An extraction unit, used to perform feature extraction on the historical visible light image set and the historical sonar image set respectively to obtain a visible light image feature set and a sonar image feature set; A fusion unit, used for fusing the visible light image feature set and the sonar image feature set to obtain a fused image feature set; The deconvolution reconstruction unit is used to perform deconvolution reconstruction on the fused image feature set to obtain the fused image set.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the dam surface image restoration method according to any one of claims 1 to 4 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the dam surface image repair method according to any one of claims 1 to 4.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the dam surface image repair method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Generative adversarial network-based remote sensing image fusion method, system and terminal

    CN110211046A

  • Underwater image acquisition method and system

    CN112198516A

  • Generation and Use of Coaching Score

    US20230230502A1

Cited By

  • Method for optimizing visual image of surface crack gap

    CN120725925A