CN115601644A - Power transmission line image enhancement method under low illumination based on generation countermeasure network - Google Patents
Power transmission line image enhancement method under low illumination based on generation countermeasure network Download PDFInfo
- Publication number
- CN115601644A CN115601644A CN202211292721.5A CN202211292721A CN115601644A CN 115601644 A CN115601644 A CN 115601644A CN 202211292721 A CN202211292721 A CN 202211292721A CN 115601644 A CN115601644 A CN 115601644A
- Authority
- CN
- China
- Prior art keywords
- network
- module
- image
- transmission line
- images
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 89
- 238000005286 illumination Methods 0.000 title claims abstract description 42
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000006870 function Effects 0.000 claims description 69
- 238000012549 training Methods 0.000 claims description 25
- 230000004913 activation Effects 0.000 claims description 22
- 238000012360 testing method Methods 0.000 claims description 13
- 230000004927 fusion Effects 0.000 claims description 12
- 238000012545 processing Methods 0.000 claims description 6
- 238000011156 evaluation Methods 0.000 claims description 4
- 230000003190 augmentative effect Effects 0.000 claims description 3
- 230000008447 perception Effects 0.000 claims description 3
- 238000007781 pre-processing Methods 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 2
- 239000000203 mixture Substances 0.000 claims 1
- 230000002708 enhancing effect Effects 0.000 abstract 1
- 238000012544 monitoring process Methods 0.000 description 7
- 238000013135 deep learning Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000011478 gradient descent method Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 125000001475 halogen functional group Chemical group 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
- G06V20/182—Network patterns, e.g. roads or rivers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/761—Proximity, similarity or dissimilarity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Biomedical Technology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Molecular Biology (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明属于低光照度下图像增强技术领域,涉及一种基于生成对抗网络的低光照度下输电线路图像增强方法。The invention belongs to the technical field of image enhancement under low light illumination, and relates to a method for image enhancement of transmission lines under low light illumination based on a generative confrontation network.
背景技术Background technique
我国220kV电压等级以上的重要输电线基本都已部署基于图像处理的在线监测设备,通过架设在高压输电铁塔上的摄像头对输电线路以及周围图像进行采集,进而对输电线路断股、悬挂异物、覆冰、外力破坏以及输电设备状态进行分析,及时发现隐患问题并进行处理。但是,遇到光照度较低的阴天,现场采集到的图像不清晰,无法有效反映输电线路现场实际情况,影响对输电线路的在线监测。为此,需要提高低光照度下输电线路在线监测图像的清晰度,进而有利于提高低光照度下输电线路在线监测的准确性。The important transmission lines above the 220kV voltage level in my country have basically deployed online monitoring equipment based on image processing. The cameras installed on the high-voltage transmission towers collect images of the transmission lines and surrounding areas, and then detect broken strands, hanging foreign objects, and overturned transmission lines. Analyze ice, external force damage, and the status of power transmission equipment, discover hidden dangers and deal with them in a timely manner. However, when encountering cloudy days with low illuminance, the images collected on site are not clear, which cannot effectively reflect the actual situation of the transmission line site, which affects the online monitoring of the transmission line. For this reason, it is necessary to improve the clarity of online monitoring images of transmission lines under low light illumination, which is conducive to improving the accuracy of online monitoring of transmission lines under low light illumination.
低光照度下输电线路图像增强方法可以分为两个类,一大类就是采用传统方法对低光照度下输电线路图像进行增强,另一大类就是基于学习方法对低光照图像进行增强。传统方法可以分为两个方向,其中一个方向是直方图均衡方法,另外一个方向基于Retinex理论的图像增强方法。基于直方图均衡的输电线路低光照图像增强方法在对图像增强的的同时,也增加了背景噪声,同时也容易造成图像的局部过饱和和局部信息的严重丢失。基于Retinex理论的输电线路低光照图像增强方法在亮度差异大的区域的增强图像会产生光晕现象,影响图像视觉效果。此外,还存在边缘锐化不足,阴影边界突兀,部分颜色发生扭曲以及纹理不清晰的情况。传统图像增强方法相对比较简单且速度比较快,但是没有考虑到图像中的上下文信息等,所以增强后的图像效果不理想。The image enhancement methods of transmission lines under low-light illumination can be divided into two categories. One category is to use traditional methods to enhance transmission line images under low-light illumination, and the other category is to enhance low-light images based on learning methods. Traditional methods can be divided into two directions, one of which is the histogram equalization method, and the other is the image enhancement method based on Retinex theory. The low-light image enhancement method of transmission line based on histogram equalization not only enhances the image, but also increases the background noise, and also easily causes local oversaturation of the image and serious loss of local information. The low-light image enhancement method of transmission lines based on Retinex theory will produce halo phenomenon in the enhanced image in areas with large brightness differences, which will affect the visual effect of the image. In addition, there is insufficient edge sharpening, abrupt shadow borders, some colors are distorted, and textures are not clear. The traditional image enhancement method is relatively simple and fast, but it does not take into account the context information in the image, so the effect of the enhanced image is not ideal.
随着深度学习技术的发展,人们提出了基于深度学习的输电线路低光照度图像增强方法,这些方法使用成对(低光照度图像和原始高清图像)或者非成对输电线路图像来训练网络,并获得能够用于输电线路低光照度图像增强的模型。虽然,相对传统图像增强方法,基于深度学习的输电线路低光照度图像增强方法得到增强后的输电线路图像质量相对更好,但是在在一定程度上仍然存在伪影和部分细节丢失较为严重的现象,影响增强后的输电线路图像质量,进而影响低光照环境下基于人工智能的输电线路在线监测的准确性。With the development of deep learning technology, people have proposed low-light image enhancement methods for transmission lines based on deep learning. These methods use pairs (low-light images and original high-definition images) or unpaired transmission line images to train the network and obtain A model that can be used for low-light image enhancement of transmission lines. Although, compared with the traditional image enhancement method, the image quality of the transmission line image enhanced by the deep learning-based low-light image enhancement method of the transmission line is relatively better, but to a certain extent, there are still serious artifacts and loss of some details. It affects the image quality of the enhanced transmission line, and then affects the accuracy of online monitoring of transmission lines based on artificial intelligence in low-light environments.
发明内容Contents of the invention
本发明要解决的技术问题是:提供一种基于生成对抗网络的低光照度下输电线路图像增强方法,能够有效地对单幅低光照度下输电线路图像进行增强,避免增强后的图像出现伪影以及保留更多的图像细节信息,提高增强后的输电线路图像质量。The technical problem to be solved by the present invention is to provide a method for image enhancement of transmission lines under low-light illumination based on generative adversarial networks, which can effectively enhance a single image of transmission lines under low-light illumination, and avoid artifacts and artifacts in the enhanced image. Preserve more image detail information and improve the image quality of the enhanced transmission line.
本发明解决技术问题的方案是:提供一种基于生成对抗网络的低光照度下输电线路图像增强方法,其特征在于,具体步骤如下:The solution of the present invention to solve the technical problem is to provide a method for image enhancement of transmission lines under low light illumination based on generative confrontation network, which is characterized in that the specific steps are as follows:
1)构建数据集1) Build a dataset
通过从输电线路视频监控系统中挑选出不同背景的低光照度图像和正常光照度图像并进行处理,构建出非配对样本训练集和配对样本测试集;By selecting low-light images and normal-light images with different backgrounds from the transmission line video surveillance system and processing them, an unpaired sample training set and a paired sample test set are constructed;
2)构建生成网络2) Build a generative network
构建用于对低光照度下输电线路图像进行增强处理的网络;Constructing a network for augmenting images of transmission lines in low-light conditions;
3)构建对抗网络3) Build a confrontation network
构建用于判断输入的输电线路图像是真图像还是假图像的网络;Construct a network for judging whether an input transmission line image is a real image or a fake image;
将原始正常光照度下的输电线路图像定义为真图像;Define the transmission line image under the original normal light illumination as the true image;
将生成网络的输出图像定义为假图像;Define the output image of the generative network as a fake image;
4)构建生成对抗网络的损失函数4) Construct the loss function of the generated confrontation network
用来衡量网络训练过程的生成网络性能和对抗网络性能;Used to measure the performance of the generated network and the performance of the confrontation network during the network training process;
5)网络模型训练5) Network model training
通过网络模型训练得到最优的生成网络和对抗网络;The optimal generation network and confrontation network are obtained through network model training;
6)网络模型性能评估6) Network model performance evaluation
将步骤)1中已构建的配对样本测试集中的低光照度图像输入到步骤5得到的已训练的生成网络中,得到增强后的输电线路图像,以衡量网络模型对低光照度下输电线路图像的增强能力;Input the low-light images in the paired sample test set constructed in
7)网络模型应用7) Network model application
将已训练的网络模型部署在服务器上,对现场传回的低光照度输电线路图像进行增强,得到增强图像。Deploy the trained network model on the server, and enhance the low-light transmission line images sent back from the site to obtain enhanced images.
进一步,所述步骤1)构建数据集包括以下步骤:Further, said step 1) constructing a data set includes the following steps:
⑴从输电线路视频监控系统中挑选出不同背景的低光照度图像和正常光照度图像,将低光照度图像命名为原始低光照组,将正常光照度图像命名为正常组;(1) Select low-light images and normal-light images with different backgrounds from the transmission line video monitoring system, name the low-light images as the original low-light group, and name the normal-light images as the normal group;
⑵将正常组的图像划分为正常一组和正常二组,用原始低光照组的图像和正常一组的图像构建非配对样本训练集;(2) Divide the images of the normal group into a normal group and a normal group, and use the original low-light group images and the normal group to construct an unpaired sample training set;
⑶对正常二组的图像进行处理得到对应的低光照图像,命名为处理低光照组;(3) Process the images of the normal two groups to obtain the corresponding low-light images, which are named as processing low-light groups;
⑷用正常一组的图像和处理低光照组的图像构建配对样本测试集,从而构建出非配对样本训练集和配对样本测试集。(4) Construct a paired sample test set with the images of the normal group and the processed low-light group, so as to construct the unpaired sample training set and the paired sample test set.
进一步,将正常组的图像划分为正常一组和正常二组,正常一组的图像为正常组的图像的70%,正常二组的图像为正常组的图像的30%。Further, the images of the normal group are divided into the
所述步骤2)构建生成网络中,生成网络由A网络、B网络和C网络组成,具体如下:Described step 2) in constructing generating network, generating network is made up of A network, B network and C network, specifically as follows:
⑴A网络用于对输入的低光照度输电线路图像进行预处理,其由亮度注意力映射组成,以减少生成图像的过度曝光或者曝光不足现象的发生,经过预处理得到的亮度注意力图和输入的输电线路的低光照度图像相加后作为B网络的输入图像;(1) The A network is used to preprocess the input low-light transmission line image, which is composed of brightness attention mapping to reduce the occurrence of overexposure or underexposure of the generated image. The brightness attention map obtained after preprocessing and the input transmission line The low-light illumination images of the lines are added and used as the input image of the B network;
⑵B网络用于提取输入的输电线路低光照度图像的低频信息,由一个卷积模块、一个LeakyRelu激活函数、第一组合模块、第二组合模块和一个基于混合注意力机制的残差模块组成,其中:(2) The B network is used to extract the low-frequency information of the input transmission line low-light illumination image, which consists of a convolution module, a LeakyRelu activation function, the first combination module, the second combination module and a residual module based on a mixed attention mechanism, where :
①所述第一组合模块和第二组合模块均由第一分支和第二分支组成,每个组合模块的第一分支和第二分支的输出特征图通过拼接操作得到该组合模块的输出特征图;①The first combination module and the second combination module are composed of the first branch and the second branch, and the output feature maps of the first branch and the second branch of each combination module are obtained by splicing operations to obtain the output feature map of the combination module ;
②所述基于混合注意力机制的残差模块依次由一个卷积模块、一个LeakyRelu激活函数、一个卷积模块、一个并行注意力模块、一个卷积模块、一个LeakyRelu激活函数、一个卷积模块、另一个并行注意力模块和一个卷积模块组成;②The residual module based on the mixed attention mechanism consists of a convolution module, a LeakyRelu activation function, a convolution module, a parallel attention module, a convolution module, a LeakyRelu activation function, a convolution module, Another parallel attention module and a convolution module;
③将步骤②所述的基于混合注意力机制的残差模块的输入特征图与该基于混合注意力机制的残差模块的中的最后一个卷积模块的输出特征图进行元素相加,得到基于混合注意力机制的残差模块的最终输出特征图;③The input feature map of the residual module based on the mixed attention mechanism described in
⑶C网络主要用于提取输入图像的高频信息,依次由第一混合模块、一个基于混合注意力机制的残差模块、第二混合模块、一个基于混合注意力机制的残差模块,一个卷积模块和一个Tanh激活函数组成,其中:The CDC network is mainly used to extract the high-frequency information of the input image, which consists of the first mixing module, a residual module based on the mixed attention mechanism, the second mixing module, a residual module based on the mixed attention mechanism, and a convolution module and a Tanh activation function, where:
所述第一混合模块和所述第二混合模块均由一个上采样,一个卷积模块和一个LeakyRelu激活函数组成;Both the first mixing module and the second mixing module are composed of an upsampling, a convolution module and a LeakyRelu activation function;
⑷C网络的第一混合模块的输出与B网络的第一组合模块的输出通过拼接操作进行特征融合,C网络的第二混合模块的输出与B网络的第一组合模块的输入通过拼接操作进行特征融合,从而实现高频特征和低频特征的融合;(4) The output of the first mixing module of the C network and the output of the first combination module of the B network perform feature fusion through a splicing operation, and the output of the second mixing module of the C network and the input of the first combination module of the B network perform feature fusion through a splicing operation Fusion, so as to realize the fusion of high-frequency features and low-frequency features;
⑸C网络的输出与A网络得到的亮度注意力映射图像进行元素相乘得到图像;(5) The output of the C network and the brightness attention map image obtained by the A network are multiplied elementwise to obtain an image;
⑹将步骤⑸得到的图像与生成网络输入的低光照度图像进行相加得到增强后的输电线路图像。(6) Add the image obtained in step (5) to the low-light image input by the generation network to obtain the enhanced transmission line image.
进一步,所述B网络的第一组合模块和第二组合模块均由第一分支和第二分支组成,其中:Further, the first combination module and the second combination module of the B network are composed of a first branch and a second branch, wherein:
第一分支由并行空洞卷积模块组成;The first branch consists of parallel atrous convolution modules;
第二分支由基于混合注意力机制的残差模块和一个下采样组成。The second branch consists of a residual module based on a hybrid attention mechanism and a downsampling.
进一步,所述基于混合注意力机制的残差模块中的两个并行注意力模块均由通道注意力模块和像素注意力模块组成。Further, the two parallel attention modules in the residual module based on the hybrid attention mechanism are both composed of a channel attention module and a pixel attention module.
进一步,所述步骤3)中构建对抗网络表示为:Further, the construction of the confrontation network in the step 3) is expressed as:
对抗网络由全局判别网络和局部判别网络组成,其中:The confrontation network consists of a global discriminative network and a local discriminative network, where:
全局判别网络依次由2个组合模块、一个残差空洞卷积模块和2个组合模块组成,其输入图像是假图像和真图像;The global discriminative network is sequentially composed of 2 combination modules, a residual dilated convolution module and 2 combination modules, and its input images are fake images and real images;
局部判别网络由6个组合模块组成,其输入图像是假图像和真图像的随机裁剪图像。The local discriminative network consists of 6 combination modules whose input images are randomly cropped images of fake and real images.
进一步,所述全局判别网络的组合模块和残差空洞卷积模块为:Further, the combination module and the residual hole convolution module of the global discriminant network are:
所述全局判别网络的组合模块依次由卷积+LeakyReLU激活函数组成;The combination module of the global discriminant network is composed of convolution+LeakyReLU activation function in turn;
所述全局判别网络的残差空洞卷积模块的主分支由三个空洞率分别为2,3和5的空洞卷积组成。The main branch of the residual atrous convolution module of the global discriminant network consists of three atrous convolutions with atrous rates of 2, 3 and 5, respectively.
进一步,所述局部判别网络的组合模块为基于卷积+LeakyReLU激活函数的网络模块。Further, the combination module of the local discriminant network is a network module based on convolution+LeakyReLU activation function.
进一步,所述步骤4)中构建生成对抗网络的损失函数表示为:Further, the loss function of constructing generation confrontation network in said step 4) is expressed as:
式中,和分别是对抗网络的全局判别网络的损失函数和局部判别网络的损失函数,LPer和LPix分别是生成网络的感知损失函数和像素损失函数,α,β,γ和ω分别是上述对应损失函数的权重。In the formula, and are the loss function of the global discriminant network and the loss function of the local discriminant network of the confrontation network, respectively, L Per and L Pix are the perceptual loss function and pixel loss function of the generative network, respectively, α, β, γ and ω are the above-mentioned corresponding loss functions the weight of.
进一步,所述对抗网络的全局判别网络的损失函数、局部判别网络的损失函数、生成网络的感知损失函数和像素损失函数为:Further, the loss function of the global discrimination network, the loss function of the local discrimination network, the perception loss function and the pixel loss function of the generation network of the confrontation network are:
所述全局判别网络的损失函数表示为:The loss function of the global discriminant network is expressed as:
式中,DG为全局判别网络,G为生成网络,z和x分别为生成网络的输入图像和对抗网络的输入图像;In the formula, D G is the global discriminant network, G is the generation network, z and x are the input image of the generation network and the input image of the confrontation network, respectively;
所述局部判别网络的损失函数表示为:The loss function of the local discriminant network is expressed as:
式中,DL为局部判别网络;In the formula, D L is the local discriminant network;
生成网络的感知损失函数表示为:The perceptual loss function of the generative network is expressed as:
式中,x是生成网络的输入图像,W和H分别是图像的宽和高,是在VGG-19预训练网络;In the formula, x is the input image of the generator network, W and H are the width and height of the image respectively, is the VGG-19 pre-trained network;
生成网络的像素损失函数表示为:The pixel loss function of the generative network is expressed as:
进一步,所述步骤5)模型训练具体如下:Further, the step 5) model training is specifically as follows:
⑴将训练集中的低光照输电线路图像输入到生成网络中,得到增强后的图像;(1) Input the low-light transmission line image in the training set into the generation network to obtain the enhanced image;
⑵将增强后的图像和训练集中的正常光照度图像输入到对抗网络中,判别输入的图像是增强后的图像还是原始正常光照图像;(2) Input the enhanced image and the normal illumination image in the training set into the confrontation network, and judge whether the input image is the enhanced image or the original normal illumination image;
⑶通过利用梯度下降方法对损失函数进行优化,不断更新生成网络和损失网络参数,最终完成生成网络和对抗网络的训练,得到最优的生成网络和对抗网络。(3) By using the gradient descent method to optimize the loss function, continuously update the generation network and loss network parameters, and finally complete the training of the generation network and the confrontation network, and obtain the optimal generation network and confrontation network.
进一步,所述步骤6)网络模型性能评估具体如下:Further, the step 6) network model performance evaluation is specifically as follows:
⑴将步骤)1中已构建的配对样本测试集中的低光照度图像输入到步骤5得到的已训练的生成网络中,得到增强后的输电线路图像,以衡量网络模型对低光照度下输电线路图像的增强能力;(1) Input the low-light images in the paired sample test set constructed in
⑵分别计算增强后的图像和测试集中对应的正常光照图像之间的结构相似度SSIM和峰值信噪比PSNR两个指标,来衡量网络模型对低光照度下输电线路图像增强能力;(2) Calculate the structural similarity SSIM and peak signal-to-noise ratio PSNR between the enhanced image and the corresponding normal illumination image in the test set, respectively, to measure the ability of the network model to enhance the transmission line image under low light;
⑶若平均SSIM或者平均PSNR值较低则调整网络模型参数继续训练,当平均SSIM和平均PSNR值达到理想值以上时,保持网络模型权重,用于低光照度下输电线路图像的增强。(3) If the average SSIM or average PSNR value is low, adjust the network model parameters and continue training. When the average SSIM and average PSNR value reaches above the ideal value, keep the network model weight, which is used to enhance the transmission line image under low light.
本发明提供了一种基于生成对抗网络的低光照度下输电线路图像增强方法,能够有效提高低光照度下输电线路图像亮度的同时,避免增强后的图像出现过度曝光或者曝光不足,以及伪影现象的出现,保留更多的图像细节信息,提高增强后的输电线路图像质量。The present invention provides a method for image enhancement of power transmission lines under low light illumination based on generative confrontation network, which can effectively improve the brightness of power transmission line images under low light illumination while avoiding overexposure or underexposure and artifacts in the enhanced image appear, retain more image detail information, and improve the image quality of the enhanced transmission line.
附图说明Description of drawings
图1是本发明的一种基于生成对抗网络的低光照度下输电线路图像增强方法的流程图;Fig. 1 is a kind of flow chart of the transmission line image enhancement method under the low-light illumination based on generation confrontation network of the present invention;
图2是本发明的生成网络和并行空洞卷积模块结构图;Fig. 2 is a structural diagram of the generation network and the parallel dilated convolution module of the present invention;
图3是本发明基于混合注意力机制的残差模块结构图;Fig. 3 is a structural diagram of the residual module based on the mixed attention mechanism of the present invention;
图4是本发明对抗网络结构图。Fig. 4 is a structural diagram of the confrontation network of the present invention.
具体实施方式detailed description
下面结合附图和实施例对本发明进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
参见图1-图4,实施例1,本实施例提供一种基于生成对抗网络的低光照度下输电线路图像增强方法,具体步骤如下:Referring to Fig. 1-Fig. 4,
1)构建数据集1) Build a dataset
通过从输电线路视频监控系统中挑选出不同背景的低光照度图像和正常光照度图像并进行处理,构建出非配对样本训练集和配对样本测试集,步骤如下:By selecting low-light images and normal-light images of different backgrounds from the transmission line video surveillance system and processing them, an unpaired sample training set and a paired sample test set are constructed. The steps are as follows:
⑴从输电线路视频监控系统中挑选出不同背景的低光照度图像和正常光照度图像,将低光照度图像命名为原始低光照组,将正常光照度图像命名为正常组;(1) Select low-light images and normal-light images with different backgrounds from the transmission line video monitoring system, name the low-light images as the original low-light group, and name the normal-light images as the normal group;
⑵将正常组的图像划分为正常一组和正常二组,正常一组的图像为正常组的图像的70%,正常二组的图像为正常组的图像的30%,用原始低光照组的图像和正常一组的图像构建非配对样本训练集;(2) Divide the images of the normal group into a normal group and a normal group two. The images of the normal group are 70% of the images of the normal group, and the images of the second group of normal are 30% of the images of the normal group. image and a normal set of images to construct an unpaired sample training set;
⑶对正常二组的图像进行处理得到对应的低光照图像,命名为处理低光照组;(3) Process the images of the normal two groups to obtain the corresponding low-light images, which are named as processing low-light groups;
⑷用正常二组的图像和处理低光照组的图像构建配对样本测试集,从而构建出非配对样本训练集和配对样本测试集。(4) Use the images of the normal two groups and the images of the processed low-light group to construct a paired sample test set, thereby constructing an unpaired sample training set and a paired sample test set.
从输电线路视频监控系统中挑选出不同背景的低光照度图像和正常光照度图像,其图像像素大小调整为600×400。Low-light images and normal-light images with different backgrounds are selected from the transmission line video surveillance system, and the image pixel size is adjusted to 600×400.
2)构建生成网络2) Build a generative network
构建用于对低光照度下输电线路图像进行增强处理的网络;Constructing a network for augmenting images of transmission lines in low-light conditions;
3)构建对抗网络3) Build a confrontation network
构建用于判断输入的输电线路图像是真图像还是假图像的网络;Construct a network for judging whether an input transmission line image is a real image or a fake image;
将原始正常光照度下的输电线路图像定义为真图像;Define the transmission line image under the original normal light illumination as the true image;
将生成网络的输出图像定义为假图像;Define the output image of the generative network as a fake image;
4)构建生成对抗网络的损失函数4) Construct the loss function of the generated confrontation network
用来衡量网络训练过程的生成网络性能和对抗网络性能;Used to measure the performance of the generated network and the performance of the confrontation network during the network training process;
5)网络模型训练5) Network model training
模型训练具体如下:The details of model training are as follows:
⑵将训练集中的低光照输电线路图像输入到生成网络中,得到增强后的图像;(2) Input the low-light transmission line image in the training set into the generation network to obtain the enhanced image;
⑵将增强后的图像和训练集中的正常光照度图像输入到对抗网络中,判别输入的图像是增强后的图像还是原始正常光照图像;(2) Input the enhanced image and the normal illumination image in the training set into the confrontation network, and judge whether the input image is the enhanced image or the original normal illumination image;
⑶通过利用梯度下降方法对损失函数进行优化,不断更新生成网络和损失网络参数,最终完成生成网络和对抗网络的训练,得到最优的生成网络和对抗网络。(3) By using the gradient descent method to optimize the loss function, continuously update the generation network and loss network parameters, and finally complete the training of the generation network and the confrontation network, and obtain the optimal generation network and confrontation network.
6)网络模型性能评估6) Network model performance evaluation
⑴将步骤)1中已构建的配对样本测试集中的低光照度图像输入到步骤5得到的已训练的生成网络中,得到增强后的输电线路图像,以衡量网络模型对低光照度下输电线路图像的增强能力;(1) Input the low-light images in the paired sample test set constructed in
⑵分别计算增强后的图像和测试集中对应的正常光照图像之间的结构相似度SSIM和峰值信噪比PSNR两个指标,来衡量网络模型对低光照度下输电线路图像增强能力;(2) Calculate the structural similarity SSIM and peak signal-to-noise ratio PSNR between the enhanced image and the corresponding normal illumination image in the test set, respectively, to measure the ability of the network model to enhance the transmission line image under low light;
⑶若平均SSIM或者平均PSNR值较低则调整网络模型参数继续训练,当平均SSIM和平均PSNR值达到理想值以上时,保持网络模型权重,用于低光照度下输电线路图像的增强。(3) If the average SSIM or average PSNR value is low, adjust the network model parameters and continue training. When the average SSIM and average PSNR value reaches above the ideal value, keep the network model weight, which is used to enhance the transmission line image under low light.
7)网络模型应用7) Network model application
将已训练的网络模型部署在服务器上,对现场传回的低光照度输电线路图像进行增强,得到增强图像。Deploy the trained network model on the server, and enhance the low-light transmission line images sent back from the site to obtain enhanced images.
所述步骤2)构建生成网络中,生成网络由A网络、B网络和C网络组成,具体如下:Described step 2) in constructing generating network, generating network is made up of A network, B network and C network, specifically as follows:
⑴A网络用于对输入的低光照度输电线路图像进行预处理,其由亮度注意力映射组成,以降低生成图像的过度曝光或者曝光不足现象的发生,经过预处理得到的亮度注意力图和输入的输电线路的低光照度图像相加后作为B网络的输入图像;(1) The A network is used to preprocess the input low-light transmission line image, which is composed of a brightness attention map to reduce the occurrence of overexposure or underexposure of the generated image. The brightness attention map obtained after preprocessing and the input transmission line The low-light illumination images of the lines are added and used as the input image of the B network;
⑵B网络用于提取输入的输电线路低光照度图像的低频信息,由一个卷积模块、一个LeakyRelu激活函数、第一组合模块、第二组合模块和一个基于混合注意力机制的残差模块组成,其中:(2) The B network is used to extract the low-frequency information of the input transmission line low-light illumination image, which consists of a convolution module, a LeakyRelu activation function, a first combination module, a second combination module and a residual module based on a mixed attention mechanism, where :
①所述第一组合模块和第二组合模块均由第一分支和第二分支组成,每个组合模块的第一分支和第二分支的输出特征图通过拼接操作得到该组合模块的输出特征图;① The first combination module and the second combination module are composed of the first branch and the second branch, and the output feature maps of the first branch and the second branch of each combination module are obtained by splicing operations to obtain the output feature map of the combination module ;
②所述基于混合注意力机制的残差模块依次由一个卷积模块、一个LeakyRelu激活函数、一个卷积模块、一个并行注意力模块、一个卷积模块、一个LeakyRelu激活函数、一个卷积模块、另一个并行注意力模块和一个卷积模块组成;②The residual module based on the mixed attention mechanism consists of a convolution module, a LeakyRelu activation function, a convolution module, a parallel attention module, a convolution module, a LeakyRelu activation function, a convolution module, Another parallel attention module and a convolution module;
③将步骤②所述的基于混合注意力机制的残差模块的输入特征图与该基于混合注意力机制的残差模块的中的最后一个卷积模块的输出特征图进行元素相加,得到基于混合注意力机制的残差模块的最终输出特征图;③The input feature map of the residual module based on the mixed attention mechanism described in
⑶C网络主要用于提取输入图像的高频信息,依次由第一混合模块、一个基于混合注意力机制的残差模块、第二混合模块、一个基于混合注意力机制的残差模块,一个卷积模块和一个Tanh激活函数组成,其中:The CDC network is mainly used to extract the high-frequency information of the input image, which consists of the first mixing module, a residual module based on the mixed attention mechanism, the second mixing module, a residual module based on the mixed attention mechanism, and a convolution module and a Tanh activation function, where:
所述第一混合模块和所述第二混合模块均由一个上采样,一个卷积模块和一个LeakyRelu激活函数组成;Both the first mixing module and the second mixing module are composed of an upsampling, a convolution module and a LeakyRelu activation function;
⑷C网络的第一混合模块的输出与B网络的第一组合模块的输出通过拼接操作进行特征融合,C网络的第二混合模块的输出与B网络的第一组合模块的输入通过拼接操作进行特征融合,从而实现高频特征和低频特征的融合;(4) The output of the first mixing module of the C network and the output of the first combination module of the B network perform feature fusion through a splicing operation, and the output of the second mixing module of the C network and the input of the first combination module of the B network perform feature fusion through a splicing operation Fusion, so as to realize the fusion of high-frequency features and low-frequency features;
⑸C网络的输出与A网络得到的亮度注意力映射图像进行元素相乘得到图像;(5) The output of the C network and the brightness attention map image obtained by the A network are multiplied elementwise to obtain an image;
⑹将步骤⑸得到的图像与生成网络输入的低光照度图像进行相加得到增强后的输电线路图像。(6) Add the image obtained in step (5) to the low-light image input by the generation network to obtain the enhanced transmission line image.
所述B网络的第一组合模块和第二组合模块均由第一分支和第二分支组成,其中:Both the first combination module and the second combination module of the B network are composed of a first branch and a second branch, wherein:
第一分支由并行空洞卷积模块组成;The first branch consists of parallel atrous convolution modules;
第二分支由基于混合注意力机制的残差模块和一个下采样组成。The second branch consists of a residual module based on a hybrid attention mechanism and a downsampling.
所述基于混合注意力机制的残差模块中的两个并行注意力模块均由通道注意力模块和像素注意力模块组成。The two parallel attention modules in the residual module based on the hybrid attention mechanism are both composed of a channel attention module and a pixel attention module.
所述步骤3)中构建对抗网络表示为:Said step 3) constructing the confrontation network is expressed as:
对抗网络由全局判别网络和局部判别网络组成,其中:The confrontation network consists of a global discriminative network and a local discriminative network, where:
全局判别网络依次由2个组合模块、一个残差空洞卷积模块和2个组合模块组成,其输入图像是假图像和真图像;The global discriminative network is sequentially composed of 2 combination modules, a residual dilated convolution module and 2 combination modules, and its input images are fake images and real images;
局部判别网络由6个组合模块组成,其输入是假图像和真图像的随机裁剪图像。The local discriminative network consists of 6 combination modules whose inputs are randomly cropped images of fake and real images.
所述全局判别网络的组合模块和残差空洞卷积模块为:The combination module and residual hole convolution module of the global discriminant network are:
所述全局判别网络的组合模块依次由卷积+LeakyReLU激活函数组成;The combination module of the global discriminant network is composed of convolution+LeakyReLU activation function in turn;
所述全局判别网络的残差空洞卷积模块的主分支由三个空洞率分别为2,3和5的空洞卷积组成。The main branch of the residual atrous convolution module of the global discriminant network consists of three atrous convolutions with atrous rates of 2, 3 and 5, respectively.
所述局部判别网络的组合模块为基于卷积+LeakyReLU激活函数的网络模块。The combination module of the local discriminant network is a network module based on convolution+LeakyReLU activation function.
所述步骤4)中构建生成对抗网络的损失函数表示为:The loss function of constructing generation confrontation network in described step 4) is expressed as:
式中,和分别是对抗网络的全局判别网络的损失函数和局部判别网络的损失函数,LPer和LPix分别是生成网络的感知损失函数和像素损失函数,α,β,γ和ω分别是上述对应损失函数的权重。In the formula, and are the loss function of the global discriminant network and the loss function of the local discriminant network of the confrontation network, respectively, L Per and L Pix are the perceptual loss function and pixel loss function of the generative network, respectively, α, β, γ and ω are the above-mentioned corresponding loss functions the weight of.
所述对抗网络的全局判别网络的损失函数、局部判别网络的损失函数、生成网络的感知损失函数和像素损失函数为:The loss function of the global discrimination network of the confrontation network, the loss function of the local discrimination network, the perception loss function and the pixel loss function of the generation network are:
所述全局判别网络的损失函数表示为:The loss function of the global discriminant network is expressed as:
式中,DG为全局判别网络,G为生成网络,z和x分别为生成网络的输入图像和对抗网络的输入图像;In the formula, D G is the global discriminant network, G is the generation network, z and x are the input image of the generation network and the input image of the confrontation network, respectively;
所述局部判别网络的损失函数表示为:The loss function of the local discriminant network is expressed as:
式中,DL为局部判别网络;In the formula, D L is the local discriminant network;
生成网络的感知损失函数表示为:The perceptual loss function of the generative network is expressed as:
式中,x是生成网络的输入图像,W和H分别是图像的宽和高,是在VGG-19预训练网络;In the formula, x is the input image of the generator network, W and H are the width and height of the image respectively, is the VGG-19 pre-trained network;
生成网络的像素损失函数表示为:The pixel loss function of the generative network is expressed as:
本实施例所述卷积模块均为相同结构。The convolution modules described in this embodiment all have the same structure.
本实施例所述基于混合注意力机制的残差模块组成均为相同结构。The residual modules based on the hybrid attention mechanism described in this embodiment are composed of the same structure.
本实施例所述并行注意力模块均为相同结构。The parallel attention modules described in this embodiment all have the same structure.
本实施例所述LeakyRelu激活函数均为相同结构。The LeakyRelu activation functions described in this embodiment all have the same structure.
本实施例所述组合模块为相同结构。The combined modules described in this embodiment have the same structure.
本实施例采用现有技术实现。This embodiment is realized by using the prior art.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211292721.5A CN115601644A (en) | 2022-10-21 | 2022-10-21 | Power transmission line image enhancement method under low illumination based on generation countermeasure network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211292721.5A CN115601644A (en) | 2022-10-21 | 2022-10-21 | Power transmission line image enhancement method under low illumination based on generation countermeasure network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115601644A true CN115601644A (en) | 2023-01-13 |
Family
ID=84849726
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211292721.5A Pending CN115601644A (en) | 2022-10-21 | 2022-10-21 | Power transmission line image enhancement method under low illumination based on generation countermeasure network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115601644A (en) |
-
2022
- 2022-10-21 CN CN202211292721.5A patent/CN115601644A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109671023B (en) | A Super-resolution Reconstruction Method of Face Image | |
CN113313657B (en) | An unsupervised learning method and system for low-light image enhancement | |
CN108875935B (en) | Natural image target material visual characteristic mapping method based on generation countermeasure network | |
CN110675328B (en) | Low-illumination image enhancement method and device based on condition generation countermeasure network | |
CN109785236B (en) | An image super-resolution method based on superpixels and convolutional neural networks | |
CN108520504A (en) | An End-to-End Blind Restoration Method for Blurred Images Based on Generative Adversarial Networks | |
CN112884758B (en) | Defect insulator sample generation method and system based on style migration method | |
CN109118432A (en) | A kind of image super-resolution rebuilding method based on Rapid Circulation convolutional network | |
CN110310238B (en) | A single image deraining method based on compressed reward-punishment neural network that reuses original information | |
CN108805836A (en) | Method for correcting image based on the reciprocating HDR transformation of depth | |
CN113284064B (en) | Cross-scale context low-illumination image enhancement method based on attention mechanism | |
CN116363036B (en) | Infrared and visible light image fusion method based on visual enhancement | |
CN110490804A (en) | A method of based on the generation super resolution image for generating confrontation network | |
CN111598842A (en) | A method, system and storage medium for generating model of insulator defect samples | |
CN111612722A (en) | Low-illumination image processing method based on simplified Unet full-convolution neural network | |
CN111242868B (en) | Image enhancement method based on convolutional neural network in scotopic vision environment | |
CN115393225A (en) | A low-light image enhancement method based on multi-level feature extraction and fusion | |
CN115018708A (en) | Airborne remote sensing image super-resolution reconstruction method based on multi-scale feature fusion | |
CN115082798A (en) | A method for detecting pin defects in transmission lines based on dynamic receptive field | |
CN117408924A (en) | A low-light image enhancement method based on multiple semantic feature fusion networks | |
CN113052776A (en) | Unsupervised image defogging method based on multi-scale depth image prior | |
CN116468625A (en) | Single image defogging method and system based on pyramid efficient channel attention mechanism | |
CN115239564A (en) | A Mine Image Super-Resolution Reconstruction Method Combined with Semantic Information | |
CN117689550A (en) | Low-light image enhancement method and device based on progressive generation countermeasure network | |
CN115601644A (en) | Power transmission line image enhancement method under low illumination based on generation countermeasure network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |