Super-resolution reconstruction method and device for infrared image and computer program product
By combining the generative adversarial network model with edge detection technology, super-resolution reconstruction of infrared images is achieved, which solves the problem of poor visual effects of infrared images in the existing technology and improves the ability of substation equipment status monitoring and fault diagnosis.
Patent Information
- Application Number
- CN202410748153.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-10
AI Technical Summary
The visual effect of infrared reconstructed images in the existing technology is poor, and it is difficult to meet the needs for equipment status monitoring and fault diagnosis during substation inspections.
Using a method that combines the generative network model and the adversarial network model, by obtaining the infrared images and edge images of the substation equipment, low-resolution processing and edge detection are performed, and the generative adversarial network is used to achieve super-resolution reconstruction of the infrared image and improve the visual quality of the image. Effect.
It significantly improves the visual effect of infrared images, enhances the ability to monitor the status of electrical equipment and diagnose faults, and improves the efficiency and accuracy of inspections.
Smart Images

Figure CN118628351A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image reconstruction, and in particular to a super-resolution reconstruction method of an infrared image, a super-resolution reconstruction device of an infrared image, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the continuous development and expansion of the power system, substations, as important nodes of the power system, play the functions of conversion, distribution and protection. In order to ensure the safe operation of substations and reduce the risk of failure, regular inspection and maintenance work is essential. Traditional inspection methods mainly rely on manual labor, but there are problems such as low work efficiency, high labor costs and high skill requirements for inspection personnel. With the development of robot technology, inspection robots are gradually used in the field of substation inspection. Inspection robots can walk autonomously, carry various sensors and perform inspection tasks, among which the application of infrared sensors is particularly important. Infrared imaging technology can reflect the temperature distribution and hot spots of the equipment in real time by detecting infrared radiation on the surface of the equipment, thereby realizing the monitoring of equipment status and fault diagnosis.
[0003] Therefore, how to improve the visual effect of infrared reconstructed images is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The main purpose of the present application is to provide a super-resolution reconstruction method of an infrared image, a super-resolution reconstruction device of an infrared image, a computer-readable storage medium and a computer program product, so as to at least solve the problem of improving the visual effect of infrared reconstructed images in the prior art.
[0005] According to one aspect of the present application, a super-resolution reconstruction method for infrared images is provided, comprising: acquiring infrared images of a plurality of substation equipment and edge images corresponding to the infrared images to obtain a first data set, wherein the edge images are images located in the edge area of the infrared images, and the first data set comprises a plurality of first image pairs, one of the first image pairs comprises an infrared image and the edge image corresponding to the infrared image, and a portion of the plurality of first image pairs is first test data, and another portion is first test data; performing low-resolution processing on the plurality of infrared images respectively to obtain a second data set, wherein the second data set comprises a plurality of second image pairs, one of the second image pairs comprises two infrared images processed at a low resolution, the resolutions of the low-resolution processing of the two infrared images are different, and a portion of the plurality of second image pairs is The first test data is sequentially input into a generative network model to obtain a plurality of generated images, wherein the generative network model is trained by machine learning using a plurality of sets of first historical data, and each of the plurality of sets of the first historical data includes the first test data, and the generative network model at least includes an edge detection unit for performing edge detection on an input image of the generative network model; the generated image and the second test data are input into an adversarial network model to determine whether the generated image is correct, wherein the adversarial network model is trained by machine learning using a plurality of sets of second historical data, and each of the plurality of sets of the second historical data includes the second training data; when the loss function of the adversarial network model converges, the generated image is determined to be a super-resolution reconstructed image.
[0006] Optionally, low-resolution processing is performed on the multiple infrared images respectively to obtain a second data set, including: performing first low-resolution processing on some of the multiple infrared images to obtain multiple first processed images, wherein the first processed images are the infrared images after the first low-resolution processing; performing second low-resolution processing on another part of the edge images to obtain multiple second processed images, wherein the resolution of the second low-resolution processing is smaller than the resolution of the first low-resolution processing, the second processed images are the infrared images after the second low-resolution processing, one first processed image and one second processed image form a second image pair, and multiple second image pairs form the second data set.
[0007] Optionally, the generative network model includes a first convolution unit, a feature extraction unit, a second convolution unit, a first splicing unit, a first upsampling convolution unit, the edge detection unit, the second splicing unit, the second upsampling convolution unit, the third splicing unit and the third convolution unit connected in sequence, and the first test data is sequentially input into the generative network model to obtain a plurality of generated images, including: inputting the first test data into the first convolution unit to perform convolution processing on the first test data to obtain a first feature map; inputting the first feature map into the feature extraction unit to perform multiple feature extractions on the first feature map to obtain a second feature map; inputting the first feature map and the second feature map into the first splicing unit to splice the first feature map and the second feature map to obtain a third feature map; inputting the third feature map into the first upsampling convolution unit to perform upsampling operations and convolution processing on the third feature map in sequence to obtain an eighth feature map. Figure; inputting the first test data into the edge detection unit to perform edge detection on the first test data to obtain an edge detection image; inputting the edge detection image into the second convolution unit to perform convolution processing on the edge detection image to obtain a fourth feature map; inputting the fourth feature map into the feature extraction unit to perform multiple feature extractions on the fourth feature map to obtain a fifth feature map; inputting the fourth feature map and the fifth feature map into the second splicing unit to splice the fourth feature map and the fifth feature map to obtain a sixth feature map; inputting the sixth feature map into the second upsampling convolution unit to obtain a seventh feature map; inputting the seventh feature map and the eighth feature map into the third splicing unit to splice the seventh feature map and the eighth feature map to obtain a ninth feature map; inputting the ninth feature map into the third convolution unit to perform convolution processing on the ninth feature map to obtain the generated image.
[0008] Optionally, the feature extraction unit includes a plurality of feature extraction subunits, a first convolution subunit and a second convolution subunit connected in sequence, one of the feature extraction subunits includes a feature extraction module, a splicing module, a convolution module and a residual module connected in sequence, the first feature map is input into the feature extraction unit to perform multiple feature extractions on the first feature map to obtain a second feature map, the fourth feature map is input into the feature extraction unit to perform multiple feature extractions on the fourth feature map to obtain a fifth feature map, including: a first input step, inputting the first feature map into one of the feature extraction modules to perform feature extraction on the first feature map to obtain a first sub-feature map; a second input step, inputting the first sub-feature map and the fourth feature map into the splicing module to perform splicing processing on the fourth feature map and the first sub-feature map to obtain a second sub-feature map; a third input step, inputting the second sub-feature map into the convolution module to perform convolution processing on the second sub-feature map to obtain a third sub-feature map; a fourth input step, an input step, inputting the third sub-feature map into the residual module to perform residual processing on the third sub-feature map to obtain a fourth sub-feature map; a first repetition step, sequentially repeating the first input step, the second input step, the third input step and the fourth input step at least once, and updating the fourth feature map in the first input step to the fourth sub-feature map in the fourth input step obtained in the previous repetition process during the repetition process until a first predetermined number of times is reached, wherein the first predetermined number of times is the number of feature extraction subunits in the feature extraction unit; a fifth input step, inputting the first sub-feature map in the first input step when the first predetermined number of times is reached to the first convolution subunit to perform convolution processing on the first sub-feature map to obtain the second feature map; a sixth input step, inputting the fourth sub-feature map in the fourth input step when the first predetermined number of times is reached to the second convolution subunit to perform convolution processing on the fourth sub-feature map to obtain the fifth feature map.
[0009] Optionally, the feature extraction module includes a first convolution submodule, multiple second convolution submodules, a first splicing submodule, an activation function calculation submodule, a third convolution submodule and a second splicing submodule connected in sequence, one of the second convolution submodules includes a hole convolution layer and a splicing layer, and the first input step includes: a seventh input step, inputting the first feature map into the first convolution submodule to perform convolution processing on the first feature map to obtain a fifth sub-feature map; an eighth input step, inputting the fifth sub-feature map into the hole convolution layer to perform convolution processing on the fifth sub-feature map to obtain a sixth sub-feature map; a ninth input step, inputting the two sixth sub-feature maps output by the two adjacent hole convolution layers into the The splicing layer is used to splice the two sixth sub-feature maps to obtain a seventh sub-feature map; a second repetition step is to repeat the ninth input step at least once, and in the repetition process, one of the two seventh feature maps is updated to the seventh sub-feature map obtained in the previous repetition process until a second predetermined number of times is reached, and the second predetermined number of times is the number of the second convolution sub-modules in the feature extraction module; a tenth input step is to input the sixth sub-feature map obtained in the eighth input step and the multiple seventh sub-feature maps obtained in the second repetition step into the first splicing sub-module, the activation function calculation sub-module, the third convolution sub-module and the second splicing sub-module in sequence to obtain the first sub-feature map.
[0010] Optionally, the edge detection unit includes a sequentially connected mixing module, multiple downsampling mixing modules, multiple upsampling mixing modules, an upsampling module, multiple mixing modules and a fourth convolution module, the mixing module includes a sequentially connected convolution layer, a conditional batch normalization layer and an activation function layer, one of the downsampling mixing modules includes a sequentially connected maximum pooling layer and multiple mixing modules, one of the upsampling mixing modules includes a sequentially connected bilinear interpolation layer and multiple mixing modules, the first test data is input into the edge detection unit to perform edge detection on the first test data to obtain an edge detection image, including: inputting the first test data into the mixing module to perform edge detection on the first test data A mixing operation is performed on the first and second test data to obtain a tenth feature map; the tenth feature map is sequentially input into a plurality of the down-sampling mixing modules to perform down-sampling operations and mixing operations on the tenth feature map to obtain an eleventh feature map; the eleventh feature map is sequentially input into a plurality of the up-sampling mixing modules to perform up-sampling operations and mixing operations on the eleventh feature map to obtain a twelfth feature map; the twelfth feature map is input into the up-sampling module to perform up-sampling operations on the twelfth feature map to obtain a thirteenth feature map; the thirteenth feature map is sequentially input into the plurality of mixing modules and the fourth convolution module to perform mixing operations and convolution processing on the thirteenth feature map to obtain the edge detection image.
[0011] Optionally, the adversarial network model is a convolutional neural network including an attention module and a U-net.
[0012] According to another aspect of the present application, a super-resolution reconstruction device for infrared images is provided, comprising: an acquisition unit, used to acquire infrared images of multiple substation equipment and edge images corresponding to the infrared images, to obtain a first data set, wherein the edge image is an image located in the edge area of the infrared image, and the first data set includes multiple first image pairs, one of the first image pairs includes one of the infrared images and the edge image corresponding to the infrared image, and a part of the multiple first image pairs is first test data, and another part is first test data; a processing unit, used to perform low-resolution processing on the multiple infrared images respectively, to obtain a second data set, wherein the second data set includes multiple second image pairs, one of the second image pairs includes two infrared images processed with low resolution, the resolutions of the low-resolution processing of the two infrared images are different, and a part of the multiple second image pairs is second test data. The first part is a super-resolution reconstructed image, and the other part is a second training data; a first input unit is used to input the first test data into the generative network model in sequence to obtain a plurality of generated images, wherein the generative network model is trained by machine learning using multiple groups of first historical data, and each of the multiple groups of the first historical data includes the first test data, and the generative network model at least includes an edge detection unit for performing edge detection on the input image of the generative network model; a second input unit is used to input the generated image and the second test data into an adversarial network model to determine whether the generated image is correct, wherein the adversarial network model is trained by machine learning using multiple groups of second historical data, and each of the multiple groups of the second historical data includes the second training data; a determination unit is used to determine that the generated image is a super-resolution reconstructed image when the loss function of the adversarial network model converges.
[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.
[0014] According to another aspect of the present application, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any one of the methods described are implemented.
[0015] Applying the technical solution of the present application, in the super-resolution reconstruction method of infrared images, first, infrared images of multiple substation equipment and edge images corresponding to the infrared images are obtained to obtain a first data set, where the edge image is an image located in the edge area of the infrared image; then, low-resolution processing is performed on the multiple infrared images respectively to obtain a second data set; then, the first test data is sequentially input into the generative network model to obtain multiple generated images; then, the generated images and the second test data are input into the adversarial network model to determine whether the generated images are correct; finally, when the loss function of the adversarial network model converges, the generated image is determined to be a super-resolution reconstructed image. Since the edge detection unit in the generative network model in the present solution can realize edge detection of the infrared image of the electrical equipment, an image containing only the edge features of the image is obtained, the interference of other non-edge information in the original image is suppressed, and the visual effect of the generated image obtained by the generative network model is improved, and further the generative network model and the adversarial network model are combined to realize super-resolution image reconstruction by using the generative adversarial network model, thereby improving the visual effect of the reconstructed infrared image, and solving the technical problem of how to improve the visual effect of the infrared reconstructed image in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a mobile terminal for performing a super-resolution reconstruction method of an infrared image provided in an embodiment of the present application is shown;
[0018] Figure 2 A schematic flow chart of a super-resolution reconstruction method for infrared images provided according to an embodiment of the present application is shown;
[0019] Figure 3 A schematic diagram of the internal structure of a generated network model provided according to an embodiment of the present application is shown;
[0020] Figure 4 A schematic diagram of the internal structure of a feature extraction module provided in an embodiment of the present application is shown;
[0021] Figure 5 A schematic diagram of the internal structure of an edge detection unit provided according to an embodiment of the present application is shown;
[0022] Figure 6 A schematic diagram of the internal structure of an adversarial network model provided according to an embodiment of the present application is shown;
[0023] Figure 7A schematic diagram of the internal structure of an attention module provided in an embodiment of the present application is shown;
[0024] Figure 8 A schematic diagram showing a specific process of a super-resolution reconstruction method for an infrared image provided in an embodiment of the present application is shown;
[0025] Fig. 9 A structural block diagram of a super-resolution reconstruction device for infrared images provided according to an embodiment of the present application is shown.
[0026] The above drawings include the following reference numerals:
[0027] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0028] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] As introduced in the background technology, the visual effect of infrared reconstructed images in the prior art is poor. To solve the above problem, the embodiments of the present application provide a super-resolution reconstruction method of infrared images, a super-resolution reconstruction device of infrared images, a computer-readable storage medium and a computer program product.
[0032] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0033] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for super-resolution reconstruction of infrared images according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the super-resolution reconstruction method of infrared images in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] In this embodiment, a super-resolution reconstruction method for infrared images running on a mobile terminal, a computer terminal or a similar computing device 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 may be executed in an order different from that shown here.
[0036] Figure 2 FIG. 1 is a flow chart of a super-resolution reconstruction method for infrared images according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0037] Step S201, acquiring infrared images of a plurality of substation equipment and edge images corresponding to the infrared images to obtain a first data set, wherein the edge image is an image located in an edge area of the infrared image, the first data set includes a plurality of first image pairs, one of the first image pairs includes an infrared image and the edge image corresponding to the infrared image, a portion of the plurality of first image pairs is first test data, and another portion is first test data;
[0038] Specifically, the infrared image of the above-mentioned substation equipment and the edge image corresponding to the above-mentioned infrared image can be obtained by the infrared sensor carried by the inspection robot. Furthermore, the low-resolution infrared camera of the substation inspection robot is replaced with a high-resolution infrared camera, and the substation inspection robot carrying the high-resolution infrared camera is used to collect infrared images of the equipment in the substation to obtain a high-definition infrared image of the substation equipment.
[0039] Step S202, performing low-resolution processing on the plurality of infrared images respectively to obtain a second data set, wherein the second data set includes a plurality of second image pairs, one of the second image pairs includes two infrared images processed with low resolution, the resolutions of the low-resolution processing of the two infrared images are different, part of the plurality of second image pairs is second test data, and the other part is second training data;
[0040] Specifically, by performing low-resolution processing on historical images, low-resolution images are obtained, which form image pairs with original high-resolution images, which is beneficial to the construction of the training set of the model.
[0041] Step S203, inputting the first test data into the generative network model in sequence to obtain a plurality of generated images, wherein the generative network model is trained by machine learning using a plurality of sets of first historical data, each set of data in the plurality of sets of first historical data includes the first test data, and the generative network model at least includes an edge detection unit for performing edge detection on an input image of the generative network model;
[0042] Specifically, the above-mentioned generative network model is a generator, and the goal of the generator is to produce realistic data that is statistically indistinguishable from real data sets. The generator is a deep neural network that can generate data starting from random noise or vectors in the latent space. The network structure of the generator can be a convolutional neural network, a recurrent neural network, or other types of networks, depending on the type of generated data.
[0043] Step S204, inputting the generated image and the second test data into an adversarial network model to determine whether the generated image is correct, wherein the adversarial network model is trained by machine learning using multiple sets of second historical data, and each set of the multiple sets of second historical data includes the second training data;
[0044] Specifically, the above adversarial network model is the discriminator, whose task is to distinguish the fake data generated by the generator from the real data in the real data set. The discriminator is also a deep neural network with similar complexity to the generator. The input of the discriminator is a pair of data: one from the real data set and the other from the generator. The goal of the discriminator is to correctly classify the two inputs, that is, to identify which is real and which is fake.
[0045] Step S205, when the loss function of the adversarial network model converges, determining that the generated image is a super-resolution reconstructed image.
[0046] Specifically, when the loss function of the adversarial network model converges, it indicates that the generative adversarial network has been trained. The low-resolution infrared images of power equipment in the substation taken by the substation inspection robot during the inspection process are input into the trained generative network model to generate high-resolution infrared images with better visual effects.
[0047] Through this embodiment, in the super-resolution reconstruction method of infrared images, first, infrared images of multiple substation equipment and edge images corresponding to the infrared images are obtained to obtain a first data set, where the edge image is an image located in the edge area of the infrared image; then, low-resolution processing is performed on the multiple infrared images to obtain a second data set; then, the first test data is sequentially input into the generative network model to obtain multiple generated images; then, the generated image and the second test data are input into the adversarial network model to determine whether the generated image is correct; finally, when the loss function of the adversarial network model converges, the generated image is determined to be a super-resolution reconstructed image. Since the edge detection unit in the generative network model in this scheme can realize edge detection of the infrared image of the electrical equipment, an image containing only the edge features of the image is obtained, the interference of other non-edge information in the original image is suppressed, and the visual effect of the generated image obtained by the generative network model is improved, and further the generative network model and the adversarial network model are combined to realize super-resolution image reconstruction by using the generative adversarial network model, thereby improving the visual effect of the reconstructed infrared image, and solving the technical problem of how to improve the visual effect of the infrared reconstructed image in the prior art.
[0048] In the specific implementation process, the above step S202 can be implemented by the following steps: step S2021, performing a first low-resolution processing on some of the above infrared images among the multiple infrared images to obtain multiple first processed images, wherein the above first processed images are the above infrared images after the first low-resolution processing; step S2022, performing a second low-resolution processing on another part of the above edge images to obtain multiple second processed images, wherein the resolution of the above second low-resolution processing is less than the resolution of the above first low-resolution processing, the above second processed images are the above infrared images after the second low-resolution processing, one of the above first processed images and one of the above second processed images form one of the above second image pairs, and multiple of the above second image pairs form the above second data set. This method can further quickly implement low-resolution processing of the above infrared images and edge images.
[0049] Specifically, the first low-resolution processing may reduce the resolution to 1 / 2 of the original resolution, and the second low-resolution processing may reduce the resolution to 1 / 4 of the original resolution.
[0050] In order to further refine the above generation network model, Figure 3As shown, the above-mentioned generation network model includes a first convolution unit, a feature extraction unit, a second convolution unit, a first splicing unit, a first upsampling convolution unit, the above-mentioned edge detection unit, a second splicing unit, a second upsampling convolution unit, a third splicing unit and a third convolution unit connected in sequence. The above-mentioned step S203 of the present application can be implemented by the following steps: step S2031, inputting the above-mentioned first test data into the above-mentioned first convolution unit to perform convolution processing on the above-mentioned first test data to obtain a first feature map F1; step S2032, inputting the above-mentioned first feature map F1 into the above-mentioned feature The extraction unit performs multiple feature extractions on the first feature map F1 to obtain a second feature map F2; step S2033, inputs the first feature map F1 and the second feature map F2 to the first splicing unit to splice the first feature map F1 and the second feature map F2 to obtain a third feature map F3; step S2034, inputs the third feature map F3 to the first up-sampling convolution unit to sequentially perform up-sampling operations and convolution processing on the third feature map F3 to obtain an eighth feature map F8; step S2035, inputs the first test data to the edge detection unit to perform up-sampling operations and convolution processing on the third feature map F3 to obtain an eighth feature map F8; step S2036, inputs the first test data to the edge detection unit to perform up-sampling operations and convolution processing on the third feature map F3 to obtain an eighth feature map F8; step S2037, inputs the first test data to the edge detection unit to perform up-sampling operations and convolution processing on the third feature map F3 to obtain an eighth feature map F8; step S2038, inputs the first test data to the edge detection unit to perform up-sampling operations and convolution processing on the third feature map F3 to obtain an eighth feature map F8; step S2039, inputs the first test data to the edge detection unit to perform up-sampling operations and convolution processing on the third feature map F3 to obtain an eighth feature map F8; step S2040, inputs the first test data to the edge detection unit to perform up-sampling operations and convolution processing on the third feature map F3 to obtain an eighth feature map F8; step S2041 The detection unit performs edge detection on the first test data to obtain an edge detection image D1; step S2036, inputs the edge detection image D1 to the second convolution unit to perform convolution processing on the edge detection image D1 to obtain a fourth feature map F4; step S2037, inputs the fourth feature map F4 to the feature extraction unit to perform multiple feature extractions on the fourth feature map F4 to obtain a fifth feature map F5; step S2038, inputs the fourth feature map F4 and the fifth feature map F5 to the second splicing unit to perform multiple feature extractions on the fourth feature map F4 and the fifth feature map F5 The fifth feature map F5 is spliced to obtain the sixth feature map F6; in step S2039, the sixth feature map F6 is input into the second upsampling convolution unit to obtain the seventh feature map F7; in step S20310, the seventh feature map F7 and the eighth feature map F8 are input into the third splicing unit to perform splicing processing on the seventh feature map F7 and the eighth feature map F8 to obtain the ninth feature map F9; in step S20311, the ninth feature map F9 is input into the third convolution unit to perform convolution processing on the ninth feature map F9 to obtain the generated image.
[0051] Specifically, Figure 3 As shown, the first convolution unit and the second convolution unit are the 3×3 convolution layer, and the third convolution unit is the 1×1 convolution layer, the 3×3 convolution layer and the 3×3 convolution layer connected in sequence. The first upsampling convolution unit includes an upsampling layer, a 3×3 convolution layer and a 3×3 convolution layer connected in sequence, and the second upsampling convolution unit includes an upsampling layer, a 3×3 convolution layer and a 3×3 convolution layer connected in sequence.
[0052] like Figure 3 As shown, the feature extraction unit includes a plurality of feature extraction subunits, a first convolution subunit and a second convolution subunit connected in sequence, and one of the feature extraction subunits includes a feature extraction module, a splicing module, a convolution module and a residual module connected in sequence. The steps S2032 and S2037 can also be implemented in other ways, for example: step S20321, a first input step, inputting the first feature map F1 into one of the feature extraction modules to extract features from the first feature map F1 to obtain a first sub-feature map F11; step S20 322, a second input step, inputting the first sub-feature map F11 and the fourth feature map F4 into the splicing module to splice the fourth feature map F4 and the first sub-feature map F11 to obtain a second sub-feature map F12; step S20323, a third input step, inputting the second sub-feature map F12 into the convolution module to convolve the second sub-feature map F12 to obtain a third sub-feature map F13; step S20324, a fourth input step, inputting the third sub-feature map F13 into the residual module to convolve the third sub-feature map F13. The third sub-feature map F13 is subjected to residual processing to obtain a fourth sub-feature map F14; step S20325, a first repetition step, the first input step, the second input step, the third input step and the fourth input step are sequentially repeated at least once, and in the repetition process, the fourth feature map F4 in the first input step is updated to the fourth sub-feature map F14 in the fourth input step obtained in the previous repetition process, until a first predetermined number of times is reached, wherein the first predetermined number of times is the number of the feature extraction sub-units in the feature extraction unit; step S20326, a fifth input step, the first sub-feature map F11 in the first input step when the first predetermined number of times is reached is input to the first convolution sub-unit to perform convolution processing on the first sub-feature map F11 to obtain the second feature map F2; step S20327, a sixth input step, the fourth sub-feature map F14 in the fourth input step when the first predetermined number of times is reached is input to the second convolution sub-unit to perform convolution processing on the fourth sub-feature map F14 to obtain the fifth feature map F5. This method can further refine the generation process of the second feature map and the fifth feature map.
[0053] Specifically, the first convolution subunit and the second convolution subunit are both 3×3 convolution layers. The feature extraction module is a hierarchical feature extraction module, the convolution module is a 1×1 convolution layer, and the residual module is a residual in residual dense block (RRDB module for short).
[0054] like Figure 4As shown, the feature extraction module includes a first convolution submodule, multiple second convolution submodules, a first splicing submodule, an activation function calculation submodule, a third convolution submodule and a second splicing submodule connected in sequence, one of the second convolution submodules includes a hole convolution layer and a splicing layer, and step S20321 can be implemented by the following steps: step S203211, the seventh input step, inputting the first feature map F1 into the first convolution submodule to perform convolution processing on the first feature map F1 to obtain a fifth sub-feature map F15; step S203212, the eighth input step, inputting the fifth sub-feature map F15 into the hole convolution layer to perform convolution processing on the fifth sub-feature map F15 to obtain a sixth sub-feature map F16; step S203213, the ninth input step, inputting the two sixth sub-feature maps output by the two adjacent hole convolution layers The feature map F16 is input to the above-mentioned splicing layer to splice the two above-mentioned sixth sub-feature maps F16 to obtain the seventh sub-feature map F17; step S203214, the second repetition step, repeating the above-mentioned ninth input step at least once, and in the repetition process, updating one of the two above-mentioned seventh feature maps to the above-mentioned seventh sub-feature map F17 obtained in the previous repetition process until reaching the second predetermined number of times, and the above-mentioned second predetermined number of times is the number of the above-mentioned second convolution submodules in the above-mentioned feature extraction module; step S203215, the tenth input step, the sixth sub-feature map F16 obtained in the above-mentioned eighth input step and the multiple above-mentioned seventh sub-feature maps F17 obtained in the above-mentioned second repetition step are sequentially input to the above-mentioned first splicing submodule, the above-mentioned activation function calculation submodule, the above-mentioned third convolution submodule and the above-mentioned second splicing submodule to obtain the above-mentioned first sub-feature map F11. This method can further refine the process of generating the above-mentioned first sub-feature map.
[0055] Specifically, Figure 4 As shown, the first convolution submodule is a 3×3 convolution layer, the activation function calculation submodule is a ReLU activation function layer, the third convolution submodule is a 1×1 convolution layer, and the hole convolution layer is a 3×3 hole convolution layer.
[0056] In some embodiments, such as Figure 5As shown, the edge detection unit includes a sequentially connected mixing module, multiple downsampling mixing modules, multiple upsampling mixing modules, an upsampling module, multiple mixing modules and a fourth convolution module, the mixing module includes a sequentially connected convolution layer, a conditional batch normalization layer and an activation function layer, one of the downsampling mixing modules includes a sequentially connected maximum pooling layer and multiple of the mixing modules, one of the upsampling mixing modules includes a sequentially connected bilinear interpolation layer and multiple of the mixing modules, and the step S2035 can be specifically implemented by the following steps: step S20351, inputting the first test data into the mixing module to perform a mixing operation on the first test data to obtain the tenth feature map F10; step S20352, sequentially inputting the tenth feature map F10 into to the plurality of down-sampling and mixing modules to perform down-sampling and mixing operations on the tenth feature map F10 to obtain the eleventh feature map F21; step S20353, the eleventh feature map F21 is sequentially input to the plurality of up-sampling and mixing modules to perform up-sampling and mixing operations on the eleventh feature map F21 to obtain the twelfth feature map F22; step S20354, the twelfth feature map F22 is input to the up-sampling module to perform up-sampling operations on the twelfth feature map F22 to obtain the thirteenth feature map F23; step S20355, the thirteenth feature map F23 is sequentially input to the plurality of mixing modules and the fourth convolution module to perform mixing operations and convolution processing on the thirteenth feature map F23 to obtain the edge detection image D1. This method can further refine the process of the edge detection unit generating the edge detection image.
[0057] Specifically, Figure 5 As shown, the fourth convolution module is 1×1Conv, the above-mentioned hybrid module includes a convolution layer (3×3Conv), a conditional batch normalization layer (Cross-Iteration Batch Normalization, referred to as CBN) and an activation function layer (D-ReLU) connected in sequence, one of the above-mentioned downsampling hybrid modules includes a maximum pooling layer (2×2MaxPool) connected in sequence and multiple of the above-mentioned hybrid modules, and one of the above-mentioned upsampling hybrid modules includes a bilinear interpolation layer (Bilinear Interpolate) connected in sequence and multiple of the above-mentioned hybrid modules. Figure 5 The 128, 256, and 512 in the figure represent the number of channels, and H×W is used to represent the size of the feature map.
[0058] The above step S204 includes: the above adversarial network model is a convolutional neural network including an attention module and a U-net. The method can further refine the internal structure of the above adversarial network model.
[0059] Specifically, Figure 6 As shown in the figure, the adversarial network model performs three downsampling and three upsampling; the input image undergoes a 3×3 convolution operation and a DY-ReLU activation function to obtain a feature map P1, P1 is the input feature map of the first downsampling, the output feature map after the first downsampling undergoes a 3×3 convolution operation, spectral normalization and DY-ReLU activation function for further feature extraction to obtain a feature map P2, feature map P2 is the input feature map of the second downsampling, the output feature map after the second downsampling undergoes a 3×3 convolution operation, spectral normalization and DY-ReLU activation function for further feature extraction to obtain a feature map P3, feature map P3 is the input feature map of the third downsampling, the output feature map after the third downsampling undergoes a 3×3 convolution operation, spectral normalization and DY-ReLU activation function for further feature extraction to obtain a feature map P4; feature map P4 is upsampled to obtain feature map P5, feature map P5 and feature map P3 are two input feature maps of the third attention module, feature map P5 undergoes a 3×3 convolution operation The spectral normalization and DY-ReLU activation function are added to the output features of the third attention module to obtain the feature map PP1. After upsampling, the feature map PP1 is obtained to obtain the feature map P6. The feature maps P2 and P6 are the two input feature maps of the second attention module. The feature map P6 is subjected to a 3×3 convolution operation. The spectral normalization and DY-ReLU activation function are added to the output features of the second attention module to obtain the feature map PP2. After upsampling, the feature map PP2 is obtained to obtain the feature map P7. The feature maps P1 and P7 are the two input feature maps of the first attention module. The feature map P7 is subjected to a 3×3 convolution operation. The spectral normalization and DY-ReLU activation function are added to the output features of the first attention module to obtain the feature map PP3. The feature map PP3 is subjected to a 3×3 convolution operation, spectral normalization, DY-ReLU activation function, 3×3 convolution operation, spectral normalization, DY-ReLU activation function and 3×3 convolution operation to obtain the image judgment result. Among them, the attention module is as follows Figure 7 shown.
[0060] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the super-resolution reconstruction method of infrared images of the present application will be described in detail below in conjunction with specific embodiments.
[0061] This embodiment relates to a specific super-resolution reconstruction method for infrared images, such as Figure 8 As shown, the following steps are included:
[0062] Step S1: replacing the low-resolution infrared camera of the substation inspection robot with a high-resolution infrared camera, and using the substation inspection robot carrying the high-resolution infrared camera to collect infrared images of the equipment in the substation to obtain high-definition infrared images of the substation equipment;
[0063] Step S2: annotating the high-definition infrared image of the substation equipment in step S1 to construct a training data set for edge detection of infrared images of the substation equipment;
[0064] Step S3: low-resolution processing is performed on the high-definition infrared image of the substation equipment in step S1, and the resolution is reduced to 1 / 2 and 1 / 4 of the original resolution respectively, and the low-resolution image and the corresponding high-resolution image are combined into an image pair, and the image pair is used to construct a model training data set;
[0065] Step S4: constructing a generative network model for realizing super-resolution reconstruction of infrared images of substation equipment;
[0066] Step S5: constructing an adversarial network model to determine whether the input image is a real clear infrared image or a clear infrared image generated by the generative network, and assisting the generative network to improve the super-resolution reconstruction capability of the infrared image;
[0067] Step S6: construct a loss function to measure the performance of the generative network in step S4 and the adversarial network in step S5;
[0068] Step S7: Model training, first use the substation infrared image edge detection training data set in step S2 to train the infrared image edge detection module in the generative network model in step S4 to obtain an optimized infrared image edge detection module; then use the training data set in step S2 to train the generative network model in step S4 and the adversarial network model in step S5 to obtain a trained generative network model and an adversarial network model;
[0069] Step S8: Model application, inputting the low-resolution infrared images of power equipment in the substation taken by the substation inspection robot during the inspection process into the trained generation network model to obtain high-resolution infrared images with better visual effects.
[0070] The embodiment of the present application also provides a super-resolution reconstruction device for infrared images. It should be noted that the super-resolution reconstruction device for infrared images in the embodiment of the present application can be used to execute the super-resolution reconstruction method for infrared images provided in the embodiment of the present application. The device 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 for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0071] The following is an introduction to the super-resolution reconstruction device of infrared images provided in an embodiment of the present application.
[0072] Fig. 9 Schematic diagram of a super-resolution reconstruction device for infrared images according to an embodiment of the present application. Fig. 9 As shown, the device comprises:
[0073] The acquisition unit 10 is used to acquire infrared images of a plurality of substation equipment and edge images corresponding to the infrared images to obtain a first data set, wherein the edge image is an image located in an edge area of the infrared image, the first data set includes a plurality of first image pairs, one of the first image pairs includes an infrared image and the edge image corresponding to the infrared image, a part of the plurality of first image pairs is the first test data, and another part is the first test data;
[0074] Specifically, the infrared image of the above-mentioned substation equipment and the edge image corresponding to the above-mentioned infrared image can be obtained by the infrared sensor carried by the inspection robot. Furthermore, the low-resolution infrared camera of the substation inspection robot is replaced with a high-resolution infrared camera, and the substation inspection robot carrying the high-resolution infrared camera is used to collect infrared images of the equipment in the substation to obtain a high-definition infrared image of the substation equipment.
[0075] The processing unit 20 is used to perform low-resolution processing on the plurality of infrared images to obtain a second data set, wherein the second data set includes a plurality of second image pairs, one of the second image pairs includes two infrared images processed with low resolution, the resolutions of the low-resolution processing of the two infrared images are different, part of the plurality of second image pairs is second test data, and the other part is second training data;
[0076] Specifically, by performing low-resolution processing on historical images, low-resolution images are obtained, which form image pairs with original high-resolution images, which is beneficial to the construction of the training set of the model.
[0077] A first input unit 30 is used to input the first test data into the generative network model in sequence to obtain a plurality of generated images, wherein the generative network model is trained by machine learning using a plurality of sets of first historical data, each set of data in the plurality of sets of first historical data includes the first test data, and the generative network model at least includes an edge detection unit for performing edge detection on an input image of the generative network model;
[0078] Specifically, the above-mentioned generative network model is a generator, and the goal of the generator is to produce realistic data that is statistically indistinguishable from real data sets. The generator is a deep neural network that can generate data starting from random noise or vectors in the latent space. The network structure of the generator can be a convolutional neural network, a recurrent neural network, or other types of networks, depending on the type of generated data.
[0079] A second input unit 40 is used to input the generated image and the second test data into the adversarial network model to determine whether the generated image is correct, wherein the adversarial network model is trained by machine learning using multiple sets of second historical data, and each set of the multiple sets of second historical data includes the second training data;
[0080] Specifically, the above adversarial network model is the discriminator, whose task is to distinguish the fake data generated by the generator from the real data in the real data set. The discriminator is also a deep neural network with similar complexity to the generator. The input of the discriminator is a pair of data: one from the real data set and the other from the generator. The goal of the discriminator is to correctly classify the two inputs, that is, to identify which is real and which is fake.
[0081] The determination unit 50 is used to determine that the generated image is a super-resolution reconstructed image when the loss function of the adversarial network model converges.
[0082] Specifically, when the loss function of the adversarial network model converges, it indicates that the generative adversarial network has been trained. The low-resolution infrared images of power equipment in the substation taken by the substation inspection robot during the inspection process are input into the trained generative network model to generate high-resolution infrared images with better visual effects.
[0083] Through this embodiment, in the super-resolution reconstruction device of infrared images, the acquisition unit acquires infrared images of multiple substation equipment and edge images corresponding to the infrared images to obtain a first data set, where the edge image is an image located in the edge area of the infrared image; the processing unit performs low-resolution processing on the multiple infrared images respectively to obtain a second data set; the first input unit inputs the first test data into the generative network model in sequence to obtain multiple generated images; the second input unit inputs the generated image and the second test data into the adversarial network model to determine whether the generated image is correct; the determination unit determines that the generated image is a super-resolution reconstructed image when the loss function of the adversarial network model converges. Since the edge detection unit in the generative network model in this scheme can realize edge detection of the infrared image of the electrical equipment, an image containing only the edge features of the image is obtained, the interference of other non-edge information in the original image is suppressed, and the visual effect of the generated image obtained by the generative network model is improved. The generative network model and the adversarial network model are further combined, and the generative adversarial network model is used to realize super-resolution image reconstruction, thereby improving the visual effect of the reconstructed infrared image, solving the technical problem of how to improve the visual effect of the infrared reconstructed image in the prior art.
[0084] In the specific implementation process, the processing unit includes a first processing module and a second processing module, wherein the first processing module is used to perform a first low-resolution processing on a part of the infrared images among the plurality of infrared images to obtain a plurality of first processed images, wherein the first processed images are the infrared images after the first low-resolution processing; the second processing module is used to perform a second low-resolution processing on another part of the edge images to obtain a plurality of second processed images, wherein the resolution of the second low-resolution processing is less than the resolution of the first low-resolution processing, the second processed images are the infrared images after the second low-resolution processing, one first processed image and one second processed image form a second image pair, and a plurality of second image pairs form the second data set. The device can further quickly realize the low-resolution processing of the infrared images and edge images.
[0085] Specifically, the first low-resolution processing may reduce the resolution to 1 / 2 of the original resolution, and the second low-resolution processing may reduce the resolution to 1 / 4 of the original resolution.
[0086] In order to further refine the above generation network model, Figure 3As shown, the above-mentioned generation network model includes a first convolution unit, a feature extraction unit, a second convolution unit, a first splicing unit, a first upsampling convolution unit, the edge detection unit, the second splicing unit, the second upsampling convolution unit, the third splicing unit and the third convolution unit connected in sequence. The above-mentioned first input unit of the present application includes a first input module, a second input module, a third input module, a fourth input module, a fifth input module, a sixth input module, a seventh input module, an eighth input module, a ninth input module, a tenth input module and an eleventh input module, wherein the first input module is used to input the above-mentioned first test data into the above-mentioned first convolution unit. The convolution unit performs convolution processing on the first test data to obtain a first feature map F1; the second input module is used to input the first feature map F1 to the feature extraction unit to perform multiple feature extractions on the first feature map F1 to obtain a second feature map F2; the third input module is used to input the first feature map F1 and the second feature map F2 to the first splicing unit to splice the first feature map F1 and the second feature map F2 to obtain a third feature map F3; the fourth input module is used to input the third feature map F3 to the first up-sampling convolution unit to perform up-sampling operations and convolution processing on the third feature map F3 in sequence. The fifth input module is used to input the first test data into the edge detection unit to perform edge detection on the first test data to obtain an edge detection image D1; the sixth input module is used to input the edge detection image D1 into the second convolution unit to perform convolution processing on the edge detection image D1 to obtain a fourth feature map F4; the seventh input module is used to input the fourth feature map F4 into the feature extraction unit to perform multiple feature extractions on the fourth feature map F4 to obtain a fifth feature map F5; the eighth input module is used to input the fourth feature map F4 and the fifth feature map F5 into the above-mentioned feature extraction unit. The second splicing unit is used to splice the fourth feature map F4 and the fifth feature map F5 to obtain the sixth feature map F6; the ninth input module is used to input the sixth feature map F6 to the second upsampling convolution unit to obtain the seventh feature map F7; the tenth input module is used to input the seventh feature map F7 and the eighth feature map F8 to the third splicing unit to splice the seventh feature map F7 and the eighth feature map F8 to obtain the ninth feature map F9; the eleventh input module is used to input the ninth feature map F9 to the third convolution unit to perform convolution processing on the ninth feature map F9 to obtain the above-mentioned generated image.
[0087] Specifically, Figure 3As shown, the first convolution unit and the second convolution unit are the 3×3 convolution layer, and the third convolution unit is the 1×1 convolution layer, the 3×3 convolution layer and the 3×3 convolution layer connected in sequence. The first upsampling convolution unit includes an upsampling layer, a 3×3 convolution layer and a 3×3 convolution layer connected in sequence, and the second upsampling convolution unit includes an upsampling layer, a 3×3 convolution layer and a 3×3 convolution layer connected in sequence.
[0088] like Figure 3As shown, the feature extraction unit includes a plurality of feature extraction subunits, a first convolution subunit and a second convolution subunit connected in sequence, one of the feature extraction subunits includes a feature extraction module, a splicing module, a convolution module and a residual module connected in sequence, the second input module and the seventh input module include a first input submodule, a second input submodule, a third input submodule, a fourth input submodule, a first repetition submodule, a fifth input submodule and a sixth input submodule, wherein the first input submodule is used for the first input step, inputting the first feature map F1 into one of the feature extraction modules The first feature map F1 is subjected to feature extraction to obtain a first sub-feature map F11; the second input submodule is used for the second input step, the first sub-feature map F11 and the fourth feature map F4 are input into the splicing module to splice the fourth feature map F4 and the first sub-feature map F11 to obtain a second sub-feature map F12; the third input submodule is used for the third input step, the second sub-feature map F12 is input into the convolution module to convolve the second sub-feature map F12 to obtain a third sub-feature map F13; the fourth input submodule is used for the fourth input step, The third sub-feature map F13 is input into the residual module to perform residual processing on the third sub-feature map F13 to obtain a fourth sub-feature map F14; the first repetition submodule is used for the first repetition step, repeating the first input step, the second input step, the third input step and the fourth input step at least once in sequence, and updating the fourth feature map F4 in the first input step to the fourth sub-feature map F14 in the fourth input step obtained in the previous repetition process during the repetition process until the first predetermined number of times is reached, wherein the first predetermined number of times is the number of times the feature extraction unit The number of the feature extraction subunits in the above-mentioned feature extraction subunits; the fifth input submodule is used for the fifth input step, inputting the first sub-feature map F11 in the above-mentioned first input step when the above-mentioned first predetermined number of times is reached to the above-mentioned first convolution subunit to perform convolution processing on the above-mentioned first sub-feature map F11, and obtaining the above-mentioned second feature map F2; the sixth input submodule is used for the sixth input step, inputting the above-mentioned fourth sub-feature map F14 in the above-mentioned fourth input step when the above-mentioned first predetermined number of times is reached to the above-mentioned second convolution subunit to perform convolution processing on the above-mentioned fourth sub-feature map F14, and obtaining the above-mentioned fifth feature map F5. The device can further refine the generation process of the above-mentioned second feature map and the fifth feature map.
[0089] Specifically, the first convolution subunit and the second convolution subunit are both 3×3 convolution layers. The feature extraction module is a hierarchical feature extraction module, the convolution module is a 1×1 convolution layer, and the residual module is a residual in residual dense block (RRDB module for short).
[0090] like Figure 4 As shown, the feature extraction module includes a first convolution submodule, multiple second convolution submodules, a first splicing submodule, an activation function calculation submodule, a third convolution submodule and a second splicing submodule connected in sequence, one of the second convolution submodules includes a hole convolution layer and a splicing layer, the first input submodule includes a seventh input submodule, an eighth input submodule, a ninth input submodule, a second repetition submodule and a tenth input submodule, wherein the seventh input submodule is used for the seventh input step, inputting the first feature map F1 into the first convolution submodule to perform convolution processing on the first feature map F1 to obtain a fifth sub-feature map F15; the eighth input submodule is used for the eighth input step, inputting the fifth sub-feature map F15 into the hole convolution layer to perform convolution processing on the fifth sub-feature map F15 to obtain a sixth sub-feature map F16; the ninth input submodule is used for the ninth input step, The two sixth sub-feature maps F16 output by the hole convolution layer are input to the splicing layer to splice the two sixth sub-feature maps F16 to obtain the seventh sub-feature map F17; the second repetition submodule is used for the second repetition step, repeating the ninth input step at least once, and updating one of the two seventh feature maps to the seventh sub-feature map F17 obtained in the last repetition process during the repetition process until the second predetermined number of times is reached, and the second predetermined number of times is the number of the second convolution submodules in the feature extraction module; the tenth input submodule is used for the tenth input step, inputting the sixth sub-feature map F16 obtained in the eighth input step and the plurality of the seventh sub-feature maps F17 obtained in the second repetition step into the first splicing submodule, the activation function calculation submodule, the third convolution submodule and the second splicing submodule in sequence to obtain the first sub-feature map F11. The device can further refine the process of generating the first sub-feature map.
[0091] Specifically, Figure 4 As shown, the first convolution submodule is a 3×3 convolution layer, the activation function calculation submodule is a ReLU activation function layer, the third convolution submodule is a 1×1 convolution layer, and the hole convolution layer is a 3×3 hole convolution layer.
[0092] In some embodiments, such as Figure 5As shown, the edge detection unit includes a mixing module, multiple downsampling mixing modules, multiple upsampling mixing modules, an upsampling module, multiple mixing modules and a fourth convolution module connected in sequence, the mixing module includes a convolution layer, a conditional batch normalization layer and an activation function layer connected in sequence, one of the downsampling mixing modules includes a maximum pooling layer and multiple of the mixing modules connected in sequence, one of the upsampling mixing modules includes a bilinear interpolation layer and multiple of the mixing modules connected in sequence, the fifth input module includes an eleventh input submodule, a twelfth input submodule, a thirteenth input submodule, a fourteenth input submodule and a fifteenth input submodule, wherein the eleventh input submodule is used to input the first test data into the mixing module to perform a mixing operation on the first test data to obtain a tenth feature map F10; the twelfth input submodule The block is used to sequentially input the tenth feature map F10 into the plurality of down-sampling mixing modules to perform down-sampling and mixing operations on the tenth feature map F10 to obtain the eleventh feature map F21; the thirteenth input submodule is used to sequentially input the eleventh feature map F21 into the plurality of up-sampling mixing modules to perform up-sampling and mixing operations on the eleventh feature map F21 to obtain the twelfth feature map F22; the fourteenth input submodule is used to input the twelfth feature map F22 into the up-sampling module to perform up-sampling operations on the twelfth feature map F22 to obtain the thirteenth feature map F23; the fifteenth input submodule is used to sequentially input the thirteenth feature map F23 into the plurality of mixing modules and the fourth convolution module to perform mixing and convolution processing on the thirteenth feature map F23 to obtain the edge detection image D1. The device can further refine the process of the edge detection unit generating the edge detection image.
[0093] Specifically, Figure 5 As shown, the fourth convolution module is 1×1Conv, the above-mentioned hybrid module includes a convolution layer (3×3Conv), a conditional batch normalization layer (Cross-Iteration Batch Normalization, referred to as CBN) and an activation function layer (D-ReLU) connected in sequence, one of the above-mentioned downsampling hybrid modules includes a maximum pooling layer (2×2MaxPool) connected in sequence and multiple of the above-mentioned hybrid modules, and one of the above-mentioned upsampling hybrid modules includes a bilinear interpolation layer (Bilinear Interpolate) connected in sequence and multiple of the above-mentioned hybrid modules. Figure 5 The 128, 256, and 512 in the figure represent the number of channels, and H×W is used to represent the size of the feature map.
[0094] The second input unit includes: the adversarial network model is a convolutional neural network including an attention module and a U-net. The device can further refine the internal structure of the adversarial network model.
[0095] Specifically, Figure 6 As shown in the figure, the adversarial network model performs three downsampling and three upsampling; the input image undergoes a 3×3 convolution operation and a DY-ReLU activation function to obtain a feature map P1, P1 is the input feature map of the first downsampling, the output feature map after the first downsampling undergoes a 3×3 convolution operation, spectral normalization and DY-ReLU activation function for further feature extraction to obtain a feature map P2, feature map P2 is the input feature map of the second downsampling, the output feature map after the second downsampling undergoes a 3×3 convolution operation, spectral normalization and DY-ReLU activation function for further feature extraction to obtain a feature map P3, feature map P3 is the input feature map of the third downsampling, the output feature map after the third downsampling undergoes a 3×3 convolution operation, spectral normalization and DY-ReLU activation function for further feature extraction to obtain a feature map P4; feature map P4 is upsampled to obtain feature map P5, feature map P5 and feature map P3 are two input feature maps of the third attention module, feature map P5 undergoes a 3×3 convolution operation The spectral normalization and DY-ReLU activation function are added to the output features of the third attention module to obtain the feature map PP1. After upsampling, the feature map PP1 is obtained to obtain the feature map P6. The feature maps P2 and P6 are the two input feature maps of the second attention module. The feature map P6 is subjected to a 3×3 convolution operation. The spectral normalization and DY-ReLU activation function are added to the output features of the second attention module to obtain the feature map PP2. After upsampling, the feature map PP2 is obtained to obtain the feature map P7. The feature maps P1 and P7 are the two input feature maps of the first attention module. The feature map P7 is subjected to a 3×3 convolution operation. The spectral normalization and DY-ReLU activation function are added to the output features of the first attention module to obtain the feature map PP3. The feature map PP3 is subjected to a 3×3 convolution operation, spectral normalization, DY-ReLU activation function, 3×3 convolution operation, spectral normalization, DY-ReLU activation function and 3×3 convolution operation to obtain the image judgment result. Among them, the attention module is as follows Figure 7 shown.
[0096] The above-mentioned super-resolution reconstruction device of infrared images includes a processor and a memory, and the above-mentioned acquisition unit, processing unit, first input unit, second input unit and determination unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are located in different processors in the form of any combination.
[0097] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the super-resolution reconstruction of infrared images can be performed by adjusting the kernel parameters.
[0098] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0099] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program is executed, the device where the computer-readable storage medium is located is controlled to execute the super-resolution reconstruction method of the infrared image.
[0100] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the super-resolution reconstruction method of the infrared image is executed when the program is run.
[0101] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, a super-resolution reconstruction method for infrared images is implemented.
[0102] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0103] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the steps of a super-resolution reconstruction method of at least an infrared image.
[0104] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0105] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0107] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0109] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0110] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0111] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0112] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0113] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A super-resolution reconstruction method for infrared images, characterized in that: include: Acquire infrared images of a plurality of substation equipment and edge images corresponding to the infrared images to obtain a first data set, wherein the edge image is an image located in an edge area of the infrared image, the first data set includes a plurality of first image pairs, one of the first image pairs includes an infrared image and the edge image corresponding to the infrared image, a portion of the plurality of first image pairs is first test data, and another portion is first test data; performing low-resolution processing on the plurality of infrared images respectively to obtain a second data set, wherein the second data set includes a plurality of second image pairs, one second image pair includes two infrared images processed at a low resolution, the resolutions of the low-resolution processing of the two infrared images are different, a part of the plurality of second image pairs is second test data, and another part is second training data; Inputting the first test data into a generative network model in sequence to obtain a plurality of generated images, wherein the generative network model is trained by machine learning using a plurality of sets of first historical data, each set of data in the plurality of sets of first historical data includes the first test data, and the generative network model at least includes an edge detection unit for performing edge detection on an input image of the generative network model; Inputting the generated image and the second test data into an adversarial network model to determine whether the generated image is correct, wherein the adversarial network model is trained by machine learning using multiple sets of second historical data, and each set of data in the multiple sets of second historical data includes the second training data; When the loss function of the adversarial network model converges, the generated image is determined to be a super-resolution reconstructed image.
2. The method according to claim 1, characterized in that The plurality of infrared images are processed at a low resolution to obtain a second data set, including: Performing a first low-resolution processing on some of the infrared images among the plurality of infrared images to obtain a plurality of first processed images, wherein the first processed images are the infrared images after the first low-resolution processing; Perform a second low-resolution processing on another part of the edge image to obtain multiple second processed images, wherein the resolution of the second low-resolution processing is smaller than the resolution of the first low-resolution processing, the second processed image is the infrared image after the second low-resolution processing, one first processed image and one second processed image form a second image pair, and multiple second image pairs form the second data set.
3. The method according to claim 1, characterized in that The generation network model includes a first convolution unit, a feature extraction unit, a second convolution unit, a first splicing unit, a first upsampling convolution unit, the edge detection unit, a second splicing unit, a second upsampling convolution unit, a third splicing unit and a third convolution unit connected in sequence. The first test data is sequentially input into the generation network model to obtain a plurality of generated images, including: Inputting the first test data into the first convolution unit to perform convolution processing on the first test data to obtain a first feature map; Inputting the first feature map into the feature extraction unit to perform multiple feature extractions on the first feature map to obtain a second feature map; Inputting the first feature map and the second feature map into the first concatenation unit to concatenate the first feature map and the second feature map to obtain a third feature map; Inputting the third feature map into the first upsampling convolution unit to sequentially perform upsampling operations and convolution processing on the third feature map to obtain an eighth feature map; Inputting the first test data into the edge detection unit to perform edge detection on the first test data to obtain an edge detection image; Inputting the edge detection image into the second convolution unit to perform convolution processing on the edge detection image to obtain a fourth feature map; Inputting the fourth feature map into the feature extraction unit to perform multiple feature extractions on the fourth feature map to obtain a fifth feature map; Inputting the fourth feature map and the fifth feature map into the second concatenation unit to concatenate the fourth feature map and the fifth feature map to obtain a sixth feature map; Inputting the sixth feature map into the second upsampling convolution unit to obtain a seventh feature map; Inputting the seventh feature map and the eighth feature map into the third splicing unit to splice the seventh feature map and the eighth feature map to obtain a ninth feature map; The ninth feature map is input into the third convolution unit to perform convolution processing on the ninth feature map to obtain the generated image.
4. The method according to claim 3, characterized in that The feature extraction unit includes a plurality of feature extraction subunits, a first convolution subunit, and a second convolution subunit connected in sequence, one of the feature extraction subunits includes a feature extraction module, a splicing module, a convolution module, and a residual module connected in sequence, the first feature map is input to the feature extraction unit to perform multiple feature extractions on the first feature map to obtain a second feature map, the fourth feature map is input to the feature extraction unit to perform multiple feature extractions on the fourth feature map to obtain a fifth feature map, including: A first input step, inputting the first feature map into a feature extraction module to extract features from the first feature map to obtain a first sub-feature map; A second input step, inputting the first sub-feature map and the fourth feature map into the splicing module to splice the fourth feature map and the first sub-feature map to obtain a second sub-feature map; A third input step, inputting the second sub-feature map into the convolution module to perform convolution processing on the second sub-feature map to obtain a third sub-feature map; a fourth input step of inputting the third sub-feature map into the residual module to perform residual processing on the third sub-feature map to obtain a fourth sub-feature map; A first repetition step, repeating the first input step, the second input step, the third input step and the fourth input step in sequence at least once, and updating the fourth feature map in the first input step to the fourth sub-feature map in the fourth input step obtained in the previous repetition process during the repetition process until a first predetermined number of times is reached, wherein the first predetermined number of times is the number of the feature extraction sub-units in the feature extraction unit; a fifth input step of inputting the first sub-feature map in the first input step when the first predetermined number of times is reached into the first convolution subunit to perform convolution processing on the first sub-feature map to obtain the second feature map; The sixth input step is to input the fourth sub-feature map in the fourth input step when the first predetermined number of times is reached into the second convolution subunit to perform convolution processing on the fourth sub-feature map to obtain the fifth feature map.
5. The method according to claim 4, characterized in that The feature extraction module includes a first convolution submodule, a plurality of second convolution submodules, a first splicing submodule, an activation function calculation submodule, a third convolution submodule and a second splicing submodule connected in sequence, one of the second convolution submodules includes a hole convolution layer and a splicing layer, and the first input step includes: A seventh input step of inputting the first feature map into the first convolution submodule to perform convolution processing on the first feature map to obtain a fifth sub-feature map; an eighth input step, inputting the fifth sub-feature map into the dilated convolution layer to perform convolution processing on the fifth sub-feature map to obtain a sixth sub-feature map; A ninth input step, inputting the two sixth sub-feature maps output by the two adjacent atrous convolutional layers into the concatenation layer to concatenate the two sixth sub-feature maps to obtain a seventh sub-feature map; A second repetition step, repeating the ninth input step at least once, and updating one of the two seventh feature maps to the seventh sub-feature map obtained in the previous repetition process during the repetition process until a second predetermined number of times is reached, where the second predetermined number of times is the number of the second convolution sub-modules in the feature extraction module; In the tenth input step, the sixth sub-feature map obtained in the eighth input step and the multiple seventh sub-feature maps obtained in the second repetition step are sequentially input into the first splicing submodule, the activation function calculation submodule, the third convolution submodule and the second splicing submodule to obtain the first sub-feature map.
6. The method according to claim 3, characterized in that The edge detection unit includes a sequentially connected mixing module, multiple downsampling mixing modules, multiple upsampling mixing modules, an upsampling module, multiple mixing modules and a fourth convolution module, the mixing module includes a sequentially connected convolution layer, a conditional batch normalization layer and an activation function layer, one of the downsampling mixing modules includes a sequentially connected maximum pooling layer and multiple mixing modules, one of the upsampling mixing modules includes a sequentially connected bilinear interpolation layer and multiple mixing modules, the first test data is input into the edge detection unit to perform edge detection on the first test data, and an edge detection image is obtained, including: Inputting the first test data into the mixing module to perform a mixing operation on the first test data to obtain a tenth feature map; Inputting the tenth feature map into the plurality of downsampling and mixing modules in sequence to perform downsampling and mixing operations on the tenth feature map to obtain an eleventh feature map; Inputting the eleventh feature map into the plurality of upsampling and mixing modules in sequence to perform upsampling and mixing operations on the eleventh feature map to obtain a twelfth feature map; Inputting the twelfth feature map into the upsampling module to perform an upsampling operation on the twelfth feature map to obtain a thirteenth feature map; The thirteenth feature map is sequentially input into the multiple mixing modules and the fourth convolution module to perform mixing operations and convolution processing on the thirteenth feature map to obtain the edge detection image.
7. The method according to claim 1, characterized in that The adversarial network model is a convolutional neural network including an attention module and a U-net.
8. A super-resolution reconstruction device for infrared images, characterized in that: include: an acquisition unit, configured to acquire infrared images of a plurality of substation equipment and edge images corresponding to the infrared images, to obtain a first data set, wherein the edge image is an image located in an edge region of the infrared image, the first data set comprises a plurality of first image pairs, one of the first image pairs comprises an infrared image and the edge image corresponding to the infrared image, a portion of the plurality of first image pairs is first test data, and another portion is first test data; a processing unit, configured to perform low-resolution processing on the plurality of infrared images respectively to obtain a second data set, wherein the second data set includes a plurality of second image pairs, one second image pair includes two infrared images processed with low resolution, the resolutions of the low-resolution processing of the two infrared images are different, a part of the plurality of second image pairs is second test data, and another part is second training data; A first input unit is used to input the first test data into a generative network model in sequence to obtain a plurality of generated images, wherein the generative network model is trained by machine learning using a plurality of sets of first historical data, each set of data in the plurality of sets of the first historical data includes the first test data, and the generative network model at least includes an edge detection unit for performing edge detection on an input image of the generative network model; A second input unit is used to input the generated image and the second test data into an adversarial network model to determine whether the generated image is correct, wherein the adversarial network model is trained by machine learning using multiple sets of second historical data, and each set of data in the multiple sets of second historical data includes the second training data; A determination unit is used to determine that the generated image is a super-resolution reconstructed image when the loss function of the adversarial network model converges.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
