Disclosure of Invention
In order to solve the problems, the invention provides a distribution line inspection image enhancement method and a distribution line inspection image enhancement system, wherein image quality evaluation is carried out before image enhancement, low-quality inspection images are filtered according to an evaluation result, brightness information of the low-illumination inspection images is enhanced through a deep learning model of a U-shaped structure, and detail information is enhanced through bilateral filtering, so that the problem of poor image quality in a distribution network scene low-illumination environment is solved.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for enhancing a power distribution line inspection image, including:
Extracting color information and gray information from the acquired distribution line inspection image, and obtaining an image quality score by adopting a trained image quality evaluation network based on the color information and the gray information;
screening the distribution line inspection images according to the image quality scores, performing color space conversion on the distribution line inspection images obtained after screening, and extracting brightness components;
And carrying out brightness enhancement on the brightness component based on a pre-constructed enhancement model based on the attention residual error module, and carrying out color space conversion on the enhanced brightness component, the primary color tone component and the primary saturation component to obtain an enhanced distribution line inspection image.
As an alternative embodiment, the image quality evaluation network includes Inception modules to perform feature dimension reduction through 1*1 convolution kernel, and perform multi-scale feature extraction through convolution kernels of different sizes to the dimension reduced inspection image.
As an alternative embodiment, the image quality evaluation network is trained with an image quality evaluation dataset constructed by manually classifying the historical inspection images.
In an alternative embodiment, in the process of obtaining the image quality score by using the trained image quality evaluation network based on the color information and the gray information, the features related to the image distortion are extracted by using the trained image quality evaluation network based on the color information and the gray information, and after the feature extraction is completed, the image quality score is obtained through the full connection layer of the image quality evaluation network.
As an alternative implementation mode, the color information is an H component in HSV space, and the gray level information is an image gray level image.
The construction process of the enhancement model based on the attention residual module comprises the steps of constructing an enhancement model of a U-shaped network structure based on a channel attention mechanism and the residual module, and carrying out brightness enhancement on a brightness component through forward propagation by adopting the enhancement model.
The distribution line inspection image enhancement method further comprises the step of carrying out bilateral filtering processing on the enhanced distribution line inspection image to obtain a detail enhanced distribution line inspection image.
In a second aspect, the present invention provides a distribution line inspection image enhancement system, comprising:
The quality evaluation module is configured to extract color information and gray information from the acquired distribution line inspection image, and acquire an image quality score by adopting a trained image quality evaluation network based on the color information and the gray information;
The component extraction module is configured to screen the distribution line inspection image according to the image quality score, and perform color space conversion on the distribution line inspection image obtained after screening to extract a brightness component;
And the brightness enhancement module is configured to enhance the brightness of the brightness component based on the pre-constructed enhancement model based on the attention residual error module, and perform color space conversion on the enhanced brightness component, the primary color tone component and the primary saturation component to obtain an enhanced distribution line inspection image.
In a third aspect, the invention provides an electronic device comprising a memory and a processor and computer instructions stored on the memory and running on the processor, which when executed by the processor, perform the method of the first aspect.
In a fourth aspect, the present invention provides a computer readable storage medium storing computer instructions which, when executed by a processor, perform the method of the first aspect.
Compared with the prior art, the invention has the beneficial effects that:
according to the invention, aiming at the characteristics of the distribution network scene inspection image, the intelligent quality evaluation is carried out on the distribution line inspection image by a deep learning technology, and the low-quality inspection data is filtered according to the evaluation result, so that the high-quality image of the equipment is ensured to be acquired.
In order to solve the problem of poor image quality in a low-illumination environment of a distribution network scene, the invention provides a distribution line scene low-illumination inspection image enhancement method, which adjusts brightness information of a low-illumination image through a deep learning model with a U-shaped structure and enhances detail information of the low-illumination image through a bilateral filtering technology, so that the quality of the low-illumination inspection image is improved.
Additional aspects of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
The invention is further described below with reference to the drawings and examples.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms also are intended to include the plural forms, and furthermore, it is to be understood that the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, such as, for example, processes, methods, systems, products or devices that comprise a series of steps or units, are not necessarily limited to those steps or units that are expressly listed, but may include other steps or units that are not expressly listed or inherent to such processes, methods, products or devices.
Embodiments of the invention and features of the embodiments may be combined with each other without conflict.
Example 1
As shown in fig. 1, the present embodiment provides a method for enhancing a power distribution line inspection image, including:
(1) Extracting color information and gray information from the acquired distribution line inspection image, and obtaining an image quality score by adopting a trained image quality evaluation network based on the color information and the gray information;
In this embodiment, image quality evaluation is performed on an obtained inspection image of a distribution line to filter out an inspection image with poor quality, which specifically includes:
Firstly, constructing an image quality evaluation data set, wherein the image quality evaluation data set is classified by manpower according to the quality of an inspection image based on the inspection image acquired by a distribution network vehicle-mounted intelligent inspection system, so as to construct the distribution network scene image quality evaluation data set;
Then, constructing an image quality evaluation network based on deep learning, performing feature dimension reduction through a 1*1 convolution kernel, and performing multi-scale feature extraction on the dimension reduced images through convolution kernels of different sizes;
Preferably, as shown in fig. 2, the image quality evaluation network includes two convolution layers, two pooling layers, one Inception module, and one full connection layer;
Preferably, since the conventional CNN network has high computational complexity and poor generalization effect, a Inception module is added in the image quality evaluation network, as shown in fig. 3, compared with the conventional network, the Inception module verifies feature dimension reduction through the convolution of 1*1 first, and then performs multi-scale feature extraction, so that network parameters are reduced and the computational complexity of a model is reduced.
In this embodiment, the color information and the gray information of the extracted inspection image are used as input of the image quality evaluation network, the features related to the image distortion are extracted, and after the feature extraction is completed, the image quality evaluation score is obtained through the full connection layer of the image quality evaluation network.
Since the existing reference-free image quality evaluation method based on deep learning only considers the information of the gray image and ignores the distortion information contained in the color component of the image, the embodiment takes the image color information and the gray information together as the input of the CNN model, thereby enhancing the feature extraction capability of the quality evaluation model.
Preferably, the color information is an H component in an image HSV space, and the gray level information is an image gray level map.
(2) Screening the distribution line inspection images according to the image quality scores, performing color space conversion on the distribution line inspection images obtained after screening, and extracting brightness components;
in this embodiment, the inspection image below the score threshold is filtered according to the image quality score and a preset score threshold.
In the embodiment, image enhancement is performed on the screened inspection images higher than the score threshold, the screened distribution line inspection images are converted into an HSI color space from an RGB color space, and an I component is extracted from the HSI color space of the images;
preferably, the low-illumination inspection image data set is composed of the low-illumination images of different lines and the high-quality clear images corresponding to the low-illumination images.
(3) And carrying out brightness enhancement on the brightness component based on a pre-constructed enhancement model based on the attention residual error module, and carrying out color space conversion on the enhanced brightness component, the primary color tone component and the primary saturation component to obtain an enhanced distribution line inspection image.
In this embodiment, as shown in fig. 4, the process of constructing the enhancement model based on the attention residual module includes constructing a deep learning model of a U-shaped network structure based on a channel attention mechanism (CA) and a residual module (residual block), inputting the extracted I component into the deep learning network of the U-shaped structure, and obtaining the I component with enhanced brightness through forward propagation.
Preferably, as shown in fig. 5 (a) -5 (b), the channel attention mechanism (CA) and the Residual module (Residual module) form an attention Residual module (ca_residual module), and the U-shaped network structure contains a plurality of attention Residual modules (ca_residual module), so that the detail features of the image can be well preserved.
In this embodiment, the enhanced luminance component, primary color tone component, and primary saturation component are color space-converted into RGB color space, resulting in an RGB image with enhanced luminance.
In the embodiment, the method further comprises the step of carrying out bilateral filtering processing on the distribution line inspection RGB image with enhanced brightness to obtain the RGB image with enhanced details.
Example 2
The embodiment provides a distribution line inspection image enhancement system, including:
The quality evaluation module is configured to extract color information and gray information from the acquired distribution line inspection image, and acquire an image quality score by adopting a trained image quality evaluation network based on the color information and the gray information;
The component extraction module is configured to screen the distribution line inspection image according to the image quality score, and perform color space conversion on the distribution line inspection image obtained after screening to extract a brightness component;
And the brightness enhancement module is configured to enhance the brightness of the brightness component based on the pre-constructed enhancement model based on the attention residual error module, and perform color space conversion on the enhanced brightness component, the primary color tone component and the primary saturation component to obtain an enhanced distribution line inspection image.
It should be noted that the above modules correspond to the steps described in embodiment 1, and the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in embodiment 1. It should be noted that the modules described above may be implemented as part of a system in a computer system, such as a set of computer-executable instructions.
In further embodiments, there is also provided:
An electronic device comprising a memory and a processor and computer instructions stored on the memory and running on the processor, which when executed by the processor, perform the method described in embodiment 1. For brevity, the description is omitted here.
It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general purpose processors, digital signal processors DSP, application specific integrated circuits ASIC, off-the-shelf programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include read only memory and random access memory and provide instructions and data to the processor, and a portion of the memory may also include non-volatile random access memory. For example, the memory may also store information of the device type.
A computer readable storage medium storing computer instructions which, when executed by a processor, perform the method described in embodiment 1.
The method in embodiment 1 may be directly embodied as a hardware processor executing or executed with a combination of hardware and software modules in the processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method. To avoid repetition, a detailed description is not provided herein.
Those of ordinary skill in the art will appreciate that the elements of the various examples described in connection with the present embodiments, i.e., the algorithm steps, can be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
While the foregoing description of the embodiments of the present invention has been presented in conjunction with the drawings, it should be understood that it is not intended to limit the scope of the invention, but rather, it is intended to cover all modifications or variations within the scope of the invention as defined by the claims of the present invention.