Depth compression and reconstruction method and device for electrical equipment image, and medium
By combining cloud-edge collaboration and convolutional neural network, real-time compression and high-quality reconstruction of power equipment images are achieved, solving the problem between real-time reconstruction and efficient compression of traditional algorithms, and improving patrol efficiency and system robustness.
Patent Information
- Application Number
- CN202411558344.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-21
AI Technical Summary
Traditional image reconstruction algorithms are difficult to realize real-time reconstruction, and the image signal does not fully meet the sparsity conditions, resulting in low reconstruction quality and it is difficult to find a balance between maintaining image quality and achieving efficient compression.
By combining cloud-edge collaboration and convolutional neural networks, real-time compression and high-quality reconstruction of power equipment images are achieved. Specific steps include collecting image data, building a compression model, deeply compressing the image, transmitting compressed files, decompressing and reconstructing at the receiving end.
Real-time compression and high-quality reconstruction of images are realized, which reduces waiting time during inspection, improves the efficiency of overall inspection work, reduces data transmission and equipment energy consumption, and improves the robustness of the system in complex environments. sex.
Smart Images

Figure CN119496896A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method, device and medium for deep compression and reconstruction of an image of electric power equipment. Background Art
[0002] Transmission line equipment plays a vital role in the power system. Its main function is to transmit electricity from power plants to distribution networks and then distribute it to end users. Transmission line equipment includes various components and technologies to ensure efficient, safe and reliable transmission of electricity. Therefore, in order to ensure the safe and reliable operation of the power system, regular inspection of power equipment has become a necessary measure.
[0003] In the early days of power transmission line inspection, image compression technology has not been widely used. Images of power equipment are collected by drones and other equipment, and then transmitted offline through storage media such as memory cards or transmitted to the background main station through wired methods (such as Ethernet), which causes data transmission delay and a large storage space. With the rise of communication technology and artificial intelligence, photos and videos of drone inspections can be transmitted online. However, since the photos taken by drones often have high resolution and image quality, if the uncompressed original photos are directly transmitted, a large amount of network bandwidth and storage resources will be occupied. With the development of deep learning technology, researchers have begun to explore image compression methods based on neural networks. CNN is a special neural network whose structure is suitable for processing image data. In recent years, deep learning technology has made breakthrough progress, especially the application of CNN. In the field of image processing, CNN has been widely used in tasks such as image classification, target detection, and face recognition. The success of these applications shows that CNN can effectively extract image features, which provides new ideas for image compression. In CNN, each neuron is connected to a local area of the input image, which is called a convolution kernel. Through convolution operations, CNN can capture local features in the image. In addition, CNN also has characteristics such as sparsity and translation invariance, which give CNN a great advantage in image compression. Edge devices can compress images and then transmit them through the network, significantly improving transmission efficiency, reducing storage costs, and being able to adapt to different network environments.
[0004] While pursuing high compression rates to reduce storage space and transmission bandwidth requirements, existing image compression algorithms inevitably encounter the problem of image quality degradation. These algorithms often have difficulty finding a perfect balance between maintaining image quality and achieving efficient compression. To complicate matters further, the characteristics and complexity of images present diverse characteristics under different power equipment and environmental conditions, which poses a severe challenge to existing image compression methods. Due to the limited adaptability and generalization capabilities of these methods, they may not perform well in all situations, especially in certain specific scenarios, such as extreme weather conditions, complex lighting environments, or high-resolution image processing, where the compression effect may be greatly reduced, resulting in problems such as loss of image information, blurred details, or color distortion, thus affecting subsequent analysis and judgment. Summary of the invention
[0005] The technical problem to be solved by the present invention is that it is difficult to achieve real-time reconstruction with traditional reconstruction algorithms, the image signal does not fully meet the sparsity condition, and the reconstruction quality is low. The purpose is to provide a method, device and medium for deep compression and reconstruction of power equipment images. Through the combination of cloud-edge collaboration and convolutional neural networks, real-time compression and high-quality reconstruction of images are achieved, the waiting time during the inspection process is reduced, and the efficiency of the overall inspection work is improved; the energy consumption of data transmission is reduced, and image compression on edge devices such as drones also reduces the energy consumption of the equipment itself; through the improved compression model, not only the key areas of the power equipment image are supplemented with details, but also the high-quality reconstruction of the power equipment image can be completed at the receiving end, retaining the original characteristics of the data set. And through end-to-end optimization, the entire image compression and reconstruction process is made more stable and reliable, enhancing the robustness of the entire power inspection system and its ability to cope with complex environments.
[0006] The present invention is achieved through the following technical solutions:
[0007] A first aspect of the present invention provides a method for deep compression and reconstruction of an electric power equipment image, comprising the following specific steps:
[0008] Collect power equipment image datasets;
[0009] Constructing a compression model, and training the compression model according to the image data set to obtain a trained compression model;
[0010] Within the power equipment image compression quality threshold range, the trained compression model is used to compress the target compressed image data with feature data to generate a compressed file;
[0011] The compressed file is transmitted, and the compressed file obtained at the receiving end is subjected to intermediate layer noise elimination;
[0012] The trained compression model is used to decompress the compressed file with noise eliminated to generate a reconstructed image of the power equipment.
[0013] Furthermore, the compressing operation on the target compressed image data with the characteristic data specifically includes:
[0014] Get the compressed image and extract the image vector;
[0015] Perform analytical transformation on the image vector, and convert the image vector into a latent variable by vectorization prior;
[0016] Multiple codebooks are used to cascade quantize latent variables and generate compressed files.
[0017] Furthermore, the decompression operation of the compressed file after noise elimination specifically includes:
[0018] Get the compressed file and use multiple codebooks to dequantize the latent variables in each cascade;
[0019] The inverse quantized variables are sequentially cascaded and synthesized to obtain the fusion features of the original image;
[0020] Target feature information of power equipment is extracted from compressed images based on fusion features.
[0021] Furthermore, the use of multiple codebooks to perform cascade quantization on latent variables specifically includes:
[0022] At each cascade quantization stage, a codeword is randomly selected;
[0023] Get the probability distribution of the predicted output of the cascade layer;
[0024] A sample value is extracted according to the probability distribution, a codeword index is picked up according to the sample value, and the codeword index is converted into a binary stream for transmission.
[0025] Furthermore, the specific calculation of using multiple codebooks to perform cascade quantization on latent variables includes:
[0026]
[0027] Among them, represents the codebook of the lth cascade layer, Represents the compressed information after level l quantization, Represents the compressed information after l+1 level quantization, Represents the predicted output of layer l The probability distribution of k Represents the classification distribution of the kth codeword in all codewords in the multi-codebook.
[0028] Furthermore, the step of obtaining the classification distribution of the kth codeword in all codewords in the multi-codebook includes:
[0029]
[0030] in, represents the probability distribution of sample n given the latent variable y and codebook C, ζ is the Softmax function, φ k is the negative Euclidean distance between y and the codeword, k represents the kth codeword in the codebook, K represents the number of codewords in the codebook, {η=C k} is the characteristic function, when η is equal to the codeword C k , the function's value is 1, otherwise it is 0.
[0031] Furthermore, the use of multiple codebooks to dequantize the latent variables in each cascade specifically includes:
[0032] Get the codeword index converted to binary stream;
[0033] At the decompression end, the same codeword is retrieved and picked up to obtain the selected sample value, and the quantized data is restored.
[0034] Furthermore, the synthetic transformation specifically includes: defining the vector value parameter transformation as a combination of linear transformations, and the specific calculation steps include:
[0035]
[0036] Among them, y represents the latent variable, θ represents the total parameter vector, θ is composed of vectors β and ε and matrices H, α and γ, a total of 2N+3N 2 parameters, N represents the dimension of the input space, β i represents the elements of the vector β, γ ij represents the elements of the matrix γ, ε i represents the element of the vector ε, z = Hx means z is obtained by transforming the input x through the matrix H, z j represents the element of z, α ij Represents an exponent.
[0037] A second aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for deep compression and reconstruction of an image of an electric power equipment is implemented.
[0038] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for deep compression and reconstruction of an image of electric power equipment.
[0039] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0040] The end-to-end compression algorithm is deployed to the edge device. After the drone collects the power equipment images, these images are compressed in real time and the compressed data is uploaded to the cloud. Then, the appropriate network protocol is selected to adapt to the communication requirements of the drone and the cloud-edge collaborative system. After the terminal receives it, the high-quality reconstruction of the power equipment image is completed. At the same time, the compression algorithm is improved to address the image compression quality problem, so as to achieve the detailed supplement of the power equipment image and retain the original features of the image as much as possible. First, the generalized division normalization (GDN) is used to replace the original BN layer in the encoding segment and decoding end of the network, and the vector value parameter transformation of the middle layer is defined as a combination of linear transformations to eliminate the noise introduced in the middle processing layer. In addition, the large separable kernel attention is added to perform a weighted transformation on the input image data, so that the model pays more attention to the area of the power equipment in the image, thereby ignoring the background information, improving the feature expression ability of the model, and further improving the performance of image processing. The attention mechanism is combined with the encoding segment and decoding end framework to achieve end-to-end optimization of the algorithm, thereby achieving high-quality reconstruction of the power equipment image. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0042] Figure 1 is an overall workflow diagram in an embodiment of the present invention;
[0043] Figure 2 is a model structure diagram in an embodiment of the present invention;
[0044] Figure 3 4 is a flow chart of a multi-codebook quantization mechanism in an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0046] As a possible implementation, Figure 1 As shown, this embodiment provides a method for deep compression and reconstruction of power equipment images.
[0047] Step 1: Collect power equipment image datasets through edge devices such as drones;
[0048] Step 2: Using the collected data set to train the improved algorithm, the compression model can fully learn the power equipment information and background information in the image, so that in the subsequent compression process, the detailed information of the power equipment can be captured;
[0049] Step 3: Deploy the compression algorithm to the edge, and use the improved algorithm to deeply compress the data set while retaining the power equipment image to the greatest extent;
[0050] Step 4: The drone transmits the compressed file to the cloud, and then quickly transmits the compressed file through the wireless communication network;
[0051] Step 5: The terminal server receives the compressed data set, and then eliminates the noise in the middle layer through the improved compression model, improves the characteristic information of the power equipment image, and then completes the high-quality reconstruction of the power equipment image.
[0052] Through the combination of cloud-edge collaboration and convolutional neural networks, real-time compression and high-quality reconstruction of images are achieved, which reduces the waiting time during the inspection process and improves the efficiency of the overall inspection work; reduces the energy consumption of data transmission, and image compression on edge devices such as drones also reduces the energy consumption of the equipment itself; through the improved compression model, not only the key areas of the power equipment image are supplemented with details, but also the high-quality reconstruction of the power equipment image can be completed at the receiving end, retaining the original characteristics of the data set. And through end-to-end optimization, the entire image compression and reconstruction process is made more stable and reliable, enhancing the robustness of the entire power inspection system and its ability to cope with complex environments.
[0053] As a possible implementation method, in order to more clearly illustrate the compression and reconstruction process of the model, the following is combined with Figure 2 and 3 Expand description:
[0054] For the images collected by drones, the algorithm can be trained using these images, which allows the algorithm to learn more features and background information of power equipment. The algorithm is then deployed to edge devices.
[0055] The image goes through the end-to-end algorithm including:
[0056] Input power equipment image, such as Figure 2 and 3 As shown, firstly, after the analytical transformation G a (x) , Vectorize the image vector x and convert it into a latent variable y = G a(x), because the univariate prior lacks the vector's overall view, a vectorized prior summarizes the internal and external correlations while accelerating the image compression process. Then the latent variable y is quantized: A cascade estimation probability vector quantization method is used to estimate the mean and variance. In order to reduce the complexity of the image and control the compression rate, φ k The classification distribution of parameter quantization y. Through the participation of multiple codebooks, it is output after dequantization After the synthesis transformation G s (x) The various features of the original image are fused to extract the target feature information of the power equipment for image compression, improve the compression ratio and ensure the image quality, enhance the stability of the image, and complete the high-quality restoration of the deeply compressed image.
[0057] Considering the trade-off between model complexity and compression capability, and realizing flexible compression rate control, multiple codebooks are used to operate on each cascade quantization, as shown in formula (1), the compression model The size of controlled, Represented as codebooks of different cascaded layers, Represents the compressed information after level l quantization, Represents the compressed information after l+1 level quantization, Represents the predicted output of layer l The probability distribution of k It represents the classification distribution of codeword k among all codewords in the multi-codebook.
[0058]
[0059] In order to quantize and transfer the latent variables, a series of upsampling and downsampling blocks are used in the cascade estimation, e.g. Figure 3 As shown, probability vector quantization Q and inverse quantization D are used respectively. As shown in formula (2), the quantized variable generates the same intermediate latent variable y after passing through the codebook. l , and the corresponding binary code of the codebook information is transmitted to the decoding end, and the decoding end completes the inverse quantization according to the codebook information, where η l It is from the previous level l Subtract y l After quantification again, we get η l =y l -y 1+l . Among them, ↑ represents upsampling, and ↓ represents downsampling.
[0060]
[0061] As shown in formula (3), the learnable probabilistic vector quantization is further explained, where K represents the number of codewords in the codebook, represents a categorical distribution, ζ is the Softmax function, φ is the negative Euclidean distance between y and the codeword, and {·} is the feature function.
[0062]
[0063] In formula (3), represents the probability distribution of sample n given the latent variable y and codebook C, ζ is the Softmax function, φ k is the negative Euclidean distance between y and the codeword, k represents the kth codeword in the codebook, K represents the number of codewords in the codebook, {n = C k} is the characteristic function, when n is equal to the codeword C k When , the value of this function is 1, otherwise it is 0, and η represents the C k In order to obtain η, the above distribution is sampled, as shown in formula (4). Intuitively, if y is close to C k , then choose C k The probability will be very high.
[0064]
[0065] from After extracting the sample, b is immediately obtained according to the picked codeword index and converted into a binary stream for transmission. The decoding end retrieves the same picked codeword C b Recover η, which automatically performs the alignment between the codeword and the algorithm. Compared with other algorithms, this quantization algorithm does not directly select the closest codeword in a deterministic way, but randomly selects the codeword. Modeling and aggregating codebooks introduce randomness to help the network avoid falling into local optimality during training.
[0066] GDN: We define a vector-valued parameter transformation as a combination of linear transformations as shown in Equation (5):
[0067]
[0068] Among them, y represents the latent variable, θ represents the total parameter vector, θ is composed of vectors β and ε and matrices H, α and γ, a total of 2N+3N 2 parameters, N represents the dimension of the input space, β i represents the elements of the vector β, γ ij represents the elements of the matrix γ, ε i represents the element of the vector ε, z = Hx means z is obtained by transforming the input x through the matrix H, zj represents the element of z, α ij Represents an exponent.
[0069] By adopting this transformation, the transformed data can be Gaussian, continuous and differentiable, and GDN can better fit the local filtering response, generate more natural samples of images, and remove the noise introduced by the mean, so as to better capture the feature information of the image and supplement the detailed information of the power equipment image.
[0070] As a possible implementation, this embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for deep compression and reconstruction of an image of power equipment is implemented.
[0071] As a possible implementation, this embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a method for deep compression and reconstruction of an image of electric power equipment is implemented.
[0072] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for deep compression and reconstruction of power equipment images, characterized in that: The specific steps include: Collect power equipment image datasets; Constructing a compression model, and training the compression model according to the image data set to obtain a trained compression model; Within the power equipment image compression quality threshold range, the trained compression model is used to compress the target compressed image data with feature data to generate a compressed file; The compressed file is transmitted, and the compressed file obtained at the receiving end is subjected to intermediate layer noise elimination; The trained compression model is used to decompress the compressed file with noise eliminated to generate a reconstructed image of the power equipment.
2. The method for deep compression and reconstruction of power equipment images according to claim 1, characterized in that: The compressing operation on the target compressed image data with the characteristic data specifically includes: Get the compressed image and extract the image vector; Perform analytical transformation on the image vector, and convert the image vector into a latent variable by vectorization prior; Multiple codebooks are used to cascade quantize latent variables and generate compressed files.
3. The method for deep compression and reconstruction of power equipment images according to claim 2, characterized in that: The decompression operation of the compressed file after noise elimination specifically includes: Get the compressed file and use multiple codebooks to dequantize the latent variables in each cascade; The inverse quantized variables are sequentially cascaded and synthesized to obtain the fusion features of the original image; Target feature information of power equipment is extracted from compressed images based on fusion features.
4. The method for deep compression and reconstruction of power equipment images according to claim 2, characterized in that: The use of multiple codebooks to perform cascade quantization on latent variables specifically includes: At each cascade quantization stage, a codeword is randomly selected; Get the probability distribution of the predicted output of the cascade layer; A sample value is extracted according to the probability distribution, a codeword index is picked up according to the sample value, and the codeword index is converted into a binary stream for transmission.
5. The method for deep compression and reconstruction of power equipment images according to claim 4, characterized in that: The specific calculation of using multiple codebooks to perform cascade quantization on latent variables includes: Among them, represents the codebook of the lth cascade layer, Represents the compressed information after level l quantization, Represents the compressed information after l+1 level quantization, Represents the predicted output of layer l The probability distribution of k Represents the classification distribution of the kth codeword in all codewords in the multi-codebook.
6. The method for deep compression and reconstruction of power equipment images according to claim 5, characterized in that: The step of obtaining the classification distribution of the kth codeword in the multi-codebook among all codewords includes: in, represents the probability distribution of sample n given the latent variable y and codebook C, is the Softmax function, φ k is the negative Euclidean distance between y and the codeword, k represents the kth codeword in the codebook, K represents the number of codewords in the codebook, {η=C k } is the characteristic function, when η is equal to the codeword C k , the function's value is 1, otherwise it is 0.
7. The method for deep compression and reconstruction of power equipment images according to claim 4, characterized in that: The method of using multiple codebooks to dequantize the latent variables in each cascade specifically includes: Get the codeword index converted to binary stream; At the decompression end, the same codeword is retrieved and picked up to obtain the selected sample value, and the quantized data is restored.
8. The method for deep compression and reconstruction of power equipment images according to claim 3, characterized in that: The synthetic transformation specifically includes: defining the vector value parameter transformation as a combination of linear transformations, and the specific calculation steps include: Among them, y represents the latent variable, θ represents the total parameter vector, θ is composed of vectors β and ε and matrices H, α and γ, a total of 2N+3N 2 parameters, N represents the dimension of the input space, β i represents the elements of the vector β, γ ij represents the elements of the matrix γ, ε i represents the element of the vector ε, z = Hx means z is obtained by transforming the input x through the matrix H, z j represents the element of z, α ij Represents an exponent.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the deep compression and reconstruction method of the power equipment image as described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for deep compression and reconstruction of an electric power equipment image as described in any one of claims 1 to 8 is implemented.