吉訓(xùn)生,滕 彬
基于生成對抗網(wǎng)絡(luò)的行人異常行為圖像去模糊算法研究
吉訓(xùn)生,滕 彬*
江南大學(xué)物聯(lián)網(wǎng)工程學(xué)院,江蘇 無錫 214122
為解決在行為異常檢測中遇到的運動模糊問題,提出一種基于DeblurGAN改進的快速去運動模糊算法。使用3個3′3的卷積替換原生成器中的7′7的卷積,并舍棄原算法上采樣時使用的轉(zhuǎn)置卷積,對需要上采樣的特征圖進行雙線性插值。將原算法生成器結(jié)構(gòu)中的殘差單元替換成密集殘差塊(RRDB),然后將得到的殘差特征縮放到0~1之間的值,避免訓(xùn)練不穩(wěn)定。在原生成器的損失函數(shù)中添加梯度圖像的L1損失,增加圖像的邊緣信息使重建后的圖像邊緣更明顯,克服了DeblurGAN重建圖像邊緣細節(jié)不夠清晰的缺陷。經(jīng)實驗驗證,并和文獻[14]、文獻[18]進行比較,結(jié)果顯示:優(yōu)化后的模型與DeblurGAN相比,峰值信噪比提高0.94,結(jié)構(gòu)相似度和速度相當,并解決了重建后圖像棋盤格子的問題,細節(jié)邊緣更加突出,模型性能優(yōu)于相關(guān)算法。
生成對抗網(wǎng)絡(luò);運動模糊;密集殘差塊;圖像重建
在復(fù)雜環(huán)境下,如帶有運動、失焦等噪聲,造成圖像質(zhì)量變差,增加檢測識別的難度。傳統(tǒng)去模糊方法多是先根據(jù)清晰圖像的先驗假設(shè),估算出運動模糊核,然后與模糊圖像進行卷積,用加性噪聲去除模糊。但運動模糊核的估計較為復(fù)雜,對清晰圖像的先驗假設(shè)也不具備泛化性,很難達到目標。鄢化彪等[1]提出一種基于圖像相鄰列灰度一致性的算法,融合無參考圖像質(zhì)量評價算子對反卷積后的圖像質(zhì)量進行優(yōu)化,根據(jù)融合的評價指標與圖像自變量之間的單峰關(guān)系求得復(fù)原圖像。
隨著基于深度學(xué)習(xí)的去運動模糊方法被不斷提出,Sun等[2]使用卷積神經(jīng)網(wǎng)絡(luò)來預(yù)測運動模糊的概率分布,并通過圖像旋轉(zhuǎn)設(shè)計和馬爾可夫隨機場模型來推斷運動模糊場,但其去模糊處理過程耗時過長。Nimisha等[3]通過將自編碼器和生成對抗網(wǎng)絡(luò)相結(jié)合,提出一種基于稀疏自編碼的條件生成對抗網(wǎng)絡(luò)用于模糊圖像的盲復(fù)原。Ramakrishnan等[4]提出一種用于消除運動模糊的深度生成網(wǎng)絡(luò),該方法將密集卷積神經(jīng)網(wǎng)絡(luò)與生成對抗網(wǎng)絡(luò)結(jié)合在一起,搭建去運動模糊網(wǎng)絡(luò)模型,取得了較好的去模糊效果。
為進一步提高去模糊的細節(jié)清晰度,解決原算法中[5]存在的棋盤效應(yīng)(假設(shè)生成的圖像中包含1只黑貓。黑貓身體部分的像素顏色應(yīng)平滑過渡,或極端地說,該部分應(yīng)全為黑色。實際生成的圖像中該部分卻有深深淺淺的近黑方塊組成,很像棋盤的網(wǎng)格,即棋盤效應(yīng)),本文提出一種改進的DeblurGAN算法。在保證相同感受野的前提下,將原算法生成器中頭部和尾部的7′7卷積替換成3個3′3的卷積,例如1個7′7卷積核有49個參數(shù),而3個3′3卷積才27個參數(shù),而且每層3′3卷積后面都會有ReLU激活層。減小參數(shù)量的同時增加網(wǎng)絡(luò)的非線性。并舍棄原算法上采樣時使用的轉(zhuǎn)置卷積,對需要上采樣的特征圖進行雙線性插值達到上采樣的目的。插值使相鄰像素卷積之后分布均勻,解決原算法使用轉(zhuǎn)置卷積引起的棋盤格子問題。為解決原算法由于殘差單元丟失的分層特征,將原算法生成器結(jié)構(gòu)中的殘差單元替換成密集殘差塊(residual-in-residual dense block,RRDB)[6],豐富恢復(fù)圖片的細節(jié)信息。此外,為了解決原算法中重建圖片邊緣不清晰的問題,將生成圖像和清晰圖像中的梯度信息[7]取L1范數(shù)加入到原生成器的損失函數(shù)中,從而豐富重建圖片的邊緣信息,獲得更清晰的圖像。
圖像的運動模糊模型:
根據(jù)模糊核是否已知可將去模糊工作分成非盲去模糊和盲去模糊,非盲去模糊可以根據(jù)模糊圖像和已知模糊核求解出清晰圖片,而盲去模糊只有估計出精確的模糊核才能恢復(fù)潛在的清晰圖像。
cGAN算法在模糊核未知的前提下,將模糊圖像輸入到生成器中生成模擬清晰圖像,并通過判別器進行對抗式訓(xùn)練,生成精確的模糊核來恢復(fù)潛在的清晰圖像,是典型的盲去模糊算法,本文算法就是基于cGAN的盲去模糊算法[8],其算法流程如圖1所示。
帶有加性噪聲的模糊圖像B[9]經(jīng)過生成器G重建后得到模擬的清晰圖片G(B),然后同時將生成后的圖片和對應(yīng)的清晰圖片送到判別器得到一個0~1之間的概率值,該值越接近于1說明越接近于清晰圖像。使用判別器的判別結(jié)果反向指導(dǎo)生成器不斷生成和清晰圖像接近的分布。當生成器生成的圖像接近于真實圖片,判別器依然能夠很好地判別真假,兩者達到平衡的時候說明網(wǎng)絡(luò)達到最優(yōu)狀態(tài)。
圖1 基于cGAN的算法框架
原算法生成器結(jié)構(gòu)如圖2所示,頭部采用7′7的卷積提取特征,使用9個殘差單元提取殘差特征,使用兩個轉(zhuǎn)置卷積進行上采樣,最后使用7′7的卷積還原3通道用于輸出。
本文算法在DeblurGAN的基礎(chǔ)上進行改進,相比于原算法,本文在生成器結(jié)構(gòu)上進行優(yōu)化,判別器沿用原算法的PatchGAN結(jié)構(gòu)?;贒eblurGAN改進的生成器網(wǎng)絡(luò)結(jié)構(gòu)如圖3所示,其中IB是模糊圖片,G(B)是模擬的清晰圖片。頭部由3個3′3的卷積組成,然后使用兩個3′3的卷積縮減尺寸同時擴張通道,接著用9個RRDB獲取融合全局和局部的殘差信息,并對殘差信息進行上采樣,最后尾部使用3個3′3的卷積將通道數(shù)變成3,用于輸出。
針對原文算法,本文優(yōu)化如下:
1) 保證感受野不變的前提下,在生成器[10]頭部和尾部使用3個3′3的卷積代替7′7的卷積,減小參數(shù)量的同時增加網(wǎng)絡(luò)的非線性。
2) 使用RRDB替代原文中的殘差單元,如圖4,密集殘差塊采用連續(xù)記憶機制把上一個block的信息全部輸入到當前block,密集連接機制可以盡可能地獲取每層卷積信息,局部殘差機制可以最大化融合局部信息,然后使用全局特征融合3個密集殘差塊的分層特征,且在殘差信息輸出時乘0.2進行縮放,以便密集殘差網(wǎng)絡(luò)的訓(xùn)練。
3) 在上采樣過程中,舍棄原算法中使用的轉(zhuǎn)置卷積,先對特征圖進行雙線性插值擴張尺寸,然后使用3′3的卷積進行通道數(shù)降維,避免轉(zhuǎn)置卷積插0引起重構(gòu)圖像中出現(xiàn)棋盤格子的問題,兩種方法的上采樣模塊如圖5所示。
圖2 原生成器結(jié)構(gòu)
圖3 生成器結(jié)構(gòu)圖
圖4 兩種方法的殘差結(jié)構(gòu)。(a) 殘差單元;(b) 殘差中殘差密集塊
圖5 兩種上采樣方法。(a) 轉(zhuǎn)置卷積;(b) 雙線性插值
由4組3′3的卷積層、實例歸一化層、激活層經(jīng)過從前向后依次跳躍連接形成密集殘差塊(dense block)如圖6所示。Dense block在每個卷積層之間利用密集連接的方式,盡量利用這些層的信息,這些連接被稱為Dense connections。
另外,采用一種連續(xù)記憶機制(contiguous memory)把上一個block的所有信息全部輸入到當前block的每一個卷積層里面,避免造成信息冗余,提取一個block里面更有效的特征稱為局部殘差學(xué)習(xí)(local residual learning)。為避免參數(shù)過多難以訓(xùn)練,將最后的殘差信息乘0.2,同時減小初始化參數(shù)。
圖6 密集殘差塊
然后使用全局特征融合3個密集殘差塊的分層特征,利用全局殘差學(xué)習(xí),將淺層特征和深層特征結(jié)合在一起,從而獲得全局密集特征構(gòu)成的RRDB,如圖4(b)所示,在網(wǎng)絡(luò)層中去掉BN層。針對去模糊這種需要關(guān)注個例的均值和方差的任務(wù)使用實例歸一化(instance normalization,IN)對單張圖片的寬和高進行歸一化,可以避免塊歸一化(batch normalization,BN)產(chǎn)生的偽影。
判別器結(jié)構(gòu)如圖7所示,判別器用來判斷輸入的圖像是否清晰,本文使用帶有梯度懲罰機制的5個卷積層組成的馬爾科夫片判別器[11],即PatchGAN。在將圖像輸入到判別器之前要將整張圖片隨機裁剪成多個256′256的局部塊,判別器只在局部塊的尺度上加入梯度懲罰來判別在256′256的范圍內(nèi)是否清晰。將整張圖片輸入到判別器進行卷積,取所有局部塊的判別結(jié)果的均值作為整張圖片的判別結(jié)果。最后判別器的輸出是一個0~1之間的概率值,當大于0.5時判斷為清晰,反之模糊。采用局部塊的思想可以極大地減小參數(shù)量,且適用于任意大小的圖片。
圖7 判別器結(jié)構(gòu)
本文的目標是由模糊圖像生成近似清晰的圖像,涉及生成器和判別器兩個網(wǎng)絡(luò),需要以對抗的方式進行訓(xùn)練。判別器的任務(wù)是讓清晰圖像的判別結(jié)果接近于1,生成的偽清晰圖像判別結(jié)果接近于0,所以要最大化清晰圖像的判別損失,最小化生成圖像的判別損失,另外增加梯度懲罰項WGAN-GP[12]防止GAN訓(xùn)練崩潰,其損失函數(shù):
4.2.1 生成條件損失
生成器的任務(wù)是最大化欺騙判別器,使判別器無法分清生成圖像和清晰圖像,即訓(xùn)練目標是最大化判別器將生成圖像判斷為真實圖像的概率,其損失函數(shù)為
其中:代表輸入的模糊圖片。該損失函數(shù)保證生成器在給定模糊圖片作為輸入的情況下,輸出和輸入保持一致,避免偏離真實圖片太多。
4.2.2 內(nèi)容損失的優(yōu)化
為保證生成圖片的內(nèi)容真實性,本文在內(nèi)容損失函數(shù)中保留原算法的感知損失。另外,為了使重建圖片邊緣細節(jié)更加清晰,在內(nèi)容損失中引入生成圖像和真實圖像之間的梯度L1范數(shù),所以本文的內(nèi)容損失為
1) 感知損失
感知損失是指生成圖像和清晰圖像輸入到VGG19[13],在conv3-3層經(jīng)過激活之后得到的兩個特征圖之間的歐氏距離如式(5),感知損失側(cè)重于恢復(fù)一般內(nèi)容,更高層次的卷積層代表更抽象的特征。
2) 新增梯度圖像的L1損失
原算法中并沒有為內(nèi)容損失提供邊緣信息,重建后的圖片在邊緣部分不夠清晰。模糊圖片的邊緣是不規(guī)則的,清晰圖片具有顯著的邊緣。本文引入生成圖像和清晰圖像的梯度L1距離作為生成器損失的正則項約束,可以豐富邊緣信息和結(jié)構(gòu)信息。梯度算子采用的是Sobel算子中使用的計算方式,梯度圖像的計算式:
梯度圖像的L1損失為
4.2.3 生成器總損失的優(yōu)化
生成器的總體損失是條件損失和優(yōu)化的內(nèi)容損失總和,其表達式為
其中:實驗證明條件損失和內(nèi)容損失相差100倍左右,所以參數(shù)取100。
本文使用的數(shù)據(jù)集是Nah等[14]公開的GOPRO數(shù)據(jù)集,該數(shù)據(jù)集是在不同場景下拍攝的一系列連續(xù)清晰視頻圖像累加高速視頻幀中的視頻幀,來近似模擬現(xiàn)實生活中的運動模糊過程。整個數(shù)據(jù)集由3214對模糊清晰圖像對組成,其中2103對作為訓(xùn)練集,1111對作為驗證集。然后對自制的100張扶梯上的行人異常行為模糊圖片去模糊,使用改進的Tiny YOLOv3[15]網(wǎng)絡(luò)對去模糊前后的圖像進行檢測,比較準確率的變化。
本文對訓(xùn)練的數(shù)據(jù)進行隨機裁剪和縮放、水平翻轉(zhuǎn)等方法進行數(shù)據(jù)增強,并將清晰圖像和模糊圖像的像素歸一化,送入網(wǎng)絡(luò)進行訓(xùn)練。
本文實驗所用到的電腦配置是Core(TM)i7-7700CPU@3.6 GHz,顯卡是Nvidia GeForce GTX 1080,運行內(nèi)存是8 G。軟件平臺是Python3.6.3、Win10系統(tǒng)、CUDA8.0、CUDNN6.0、Tensorflow-gpu1.4.0、Opencv3.0。
算法模型框架使用tensorflow框架,網(wǎng)絡(luò)迭代(epoch)最大設(shè)為300,生成器和判別器的初始學(xué)習(xí)率設(shè)為10-4,經(jīng)過150次迭代后,接下來100輪訓(xùn)練中線性衰減率為0。采用Dropout[16]策略和實例歸一化進行訓(xùn)練,塊大小(batch size)設(shè)置為1,每訓(xùn)練5次判別器,再訓(xùn)練1次生成器。
為檢驗本文方法對去模糊的有效性,分別使用DeblurGAN原算法和本文方法對GOPRO驗證集進行去模糊處理,從視覺上[17]定性分析處理結(jié)果,從峰值信噪比(peak signal-to-noise ratio,PSNR,用PSNR表示)和結(jié)構(gòu)體相似性(structural similarity,SSIM,用SSIM表示)兩項指標定量對比分析。然后使用對模糊的扶梯異常行為進行去模糊處理,并使用改進的Tiny YOLOv3算法對去模糊前后的圖像進行檢測,驗證去模糊對檢測率的提升。
5.3.1 評價指標
采用峰值信噪比(PSNR)、結(jié)構(gòu)體相似性(SSIM)作為評價指標來評估模型,分別定義為
5.3.2 定性分析去模糊結(jié)果
同一實驗條件下選取GOPRO驗證集中比較典型的幾個運動模糊圖像進行去模糊處理,在DeblurGAN算法、文獻[14]、文獻[18]和本文算法下的處理結(jié)果對比如圖8、圖9所示。
從圖8和圖9局部放大圖可看出,DeblurGAN原算法重建的圖像存在棋盤效應(yīng),且邊緣細節(jié)不夠清晰,快速運動的物體還是存在偽影;文獻[14]也存在棋盤效應(yīng)邊緣也是模糊、文獻[18]恢復(fù)圖像邊緣也不夠清晰。本文算法在上采樣時使用雙線性插值解決了原算法中轉(zhuǎn)置卷積引起的棋盤問題,且使用密集殘差塊(residual-in-residual dense block)連續(xù)記憶機制獲取盡可能多的信息,融合全局局部殘差信息可以幫助模型獲取更豐富細節(jié)信息,并在損失函數(shù)中增加生成圖像和清晰圖像的梯度L1損失,所以恢復(fù)圖像的邊緣輪廓更清晰。
5.3.3 定量分析去模糊效果
同一實驗條件下將原算法、文獻[14](基于深度多尺度卷積神經(jīng)網(wǎng)絡(luò)的動態(tài)去模糊)、文獻[18]和本文算法在GOPRO驗證集上的PSNR、SSIM對比結(jié)果如表1所示。
表1中兩個評價指標的數(shù)據(jù)是GOPRO驗證集上所有圖片處理后的均值。
從對比結(jié)果可以看出本文方法的PSNR比原算法高出0.94,比文獻[14]高出1.59,比文獻[18]方法高1.24,這得益于本文方法增加了梯度圖像的L1損失。本文算法運行時間和DeblurGAN算法和文獻[18]相當,比文獻[14]算法快1.28 s。
圖8 對比結(jié)果。(a) 模糊圖像;(b) DeblurGAN方法;(c) 文獻[14]方法;(d) 文獻[18]方法;(e) 本文算法
5.3.4 改進后的Tiny YOLOv3算法在去模糊圖像上的驗證
最后本文驗證了去模糊算法對改進后的Tiny YOLOv3方法檢測準確率的影響,選取100張模糊的扶梯行人異常行為圖片組成測試集進行去模糊,檢測結(jié)果如圖10所示。
從圖10中可以看出,經(jīng)過去模糊恢復(fù)的圖片漏檢率有所降低,DeblurGAN算法、文獻[14]和文獻[18]方法均有所漏檢,本文算法處理后的圖片邊緣細節(jié)更豐富,有效改善了漏檢的問題,結(jié)果如表2所示。
由表2中可以看出去,模糊后召回率相比于模糊圖像提高9%,精確率提高8%,召回率比原算法提高5%,比文獻[14]提高2%,比文獻[18]提高3%,對于檢測結(jié)果有很大提升。
圖9 對比結(jié)果。(a) 模糊圖像;(b) DeblurGAN方法;(c) 文獻[14]方法;(d) 文獻[18]方法;(e) 本文算法
表1 不同方法結(jié)果對比
圖10 檢測結(jié)果。(a) 模糊圖像;(b) DeblurGAN方法;(c) 文獻[14]方法;(d) 文獻[18]方法;(e) 本文算法
表2 不同方法的對比
本文提出改進的DeblurGAN去模糊算法,在原生成器的頭部尾部將7′7卷積替換成3個3′3的卷積,減小參數(shù)量的同時增加網(wǎng)絡(luò)的非線性;使用帶連續(xù)記憶機制[19]并且融合全局局部殘差信息的residual-in-residual dense block代替原算法的基本殘差單元,增加密集殘差[20]信息有效改善恢復(fù)圖像的細節(jié)信息[21];上采樣過程使用先雙線性插值再卷積的方式改善了轉(zhuǎn)置卷積[22]引起的恢復(fù)圖片棋盤格子的問題;并在內(nèi)容損失中增加生成圖像[23]和清晰圖像的梯度L1損失,豐富了邊緣特征使恢復(fù)圖像的邊緣更清晰。
在GOPRO[14]驗證集上進行實驗,結(jié)果證明PSNR比原算法提高0.94,比文獻[14]提高1.59,比文獻[18]高1.24,SSIM和檢測時間與原算法基本保持一致,檢測時間比文獻[14]快1.28 s。利用改進的Tiny YOLOv3的算法對去模糊[19]后的扶梯異常行為進行驗證,發(fā)現(xiàn)去模糊后檢測精確率提高8%,召回率提高9%,有助于提高現(xiàn)實場景扶梯上行人異常行為的檢測精確度。
[1] Yan H B, Huang L E, Wang P. Motion deblurring from fast railway images[J]., 2019, 41(12): 75–80.
鄢化彪, 黃綠娥, 王鵬. 高速運動的軌道圖像去模糊[J]. 鐵道學(xué)報, 2019, 41(12): 75–80.
[2] Sun J, Cao W F, Xu Z B,. Learning a convolutional neural network for non-uniform motion blur removal[C]//, Boston, 2015: 769–777.
[3] Nimisha T M, Singh A K, Rajagopalan A N. Blur-invariant deep learning for blind-deblurring[C]//, Venice, 2017: 4762–4770.
[4] Ramakrishnan S, Pachori S, Gangopadhyay A,. Deep generative filter for motion deblurring[C]//, Venice, 2017: 2993–3000.
[5] Shao W Z, Liu Y Y, Ye L Y,. DeblurGAN+: Revisiting blind motion deblurring using conditional adversarial networks[J]., 2020, 168: 107338.
[6] Wang X T, Ke Y, Wu S X,. ESRGAN: enhanced super-resolution generative adversarial networks[C]//Munich, 2018: 6379.
[7] Sun J F, Zhu Y T, W K. Motion deblurring based on DeblurGAN and low rank decomposition[J]., 2020, 48(1): 32–41, 50.
孫季豐, 朱雅婷, 王愷. 基于DeblurGAN和低秩分解的去運動模糊[J]. 華南理工大學(xué)學(xué)報(自然科學(xué)版), 2020, 48(1): 32–41, 50.
[8] Yu J, Chang Z C, Xiao C B,. Blind image deblurring based on sparse representation and structural self-similarity[C]//, New Orleans, 2017: 1328–1332.
[9] Tang S, Gong W G, Zhong J H. Sparsity and smoothing multi-regularization constraints for blind image deblurring[J]., 2013, 24(5): 1143–1154.
唐述, 龔衛(wèi)國, 仲建華. 稀疏平滑特性的多正則化約束圖像盲復(fù)原方法[J]. 軟件學(xué)報, 2013, 24(5): 1143–1154.
[10] Zhao S Y, Li J W. Generative adversarial network for generating low-rank images[J]., 2018, 44(5): 829–839.
趙樹陽, 李建武. 基于生成對抗網(wǎng)絡(luò)的低秩圖像生成方法[J]. 自動化學(xué)報, 2018, 44(5): 829–839.
[11] Li C, Wand M. Precomputed real-time texture synthesis with markovian generative adversarial networks[C]//, Amsterdam, 2016: 702–716.
[12] Gulrajani I, Ahmend F, Arjovsky M,. Improved training of Wassertstein GANs[EB/OL]. (2017-12-25)[2018-08-15]. https://arxiv.org/pdf/1704.00028.pdf.
[13] Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition[EB/OL]. (2015-04-10) [2018-08-17]. https://arxiv.org/pdf/1409.1556.pdf.
[14] Nah S, Kim T H, Lee K M. Deep multiscale convolutional neural network for dynamic scene deblurring[C]//, Honolulu, 2017: 257–265.
[15] Redmon J, Farhadi A. YOLOv3: An Incremental Improvement[Z]. arXiv: 1804.02767, 2018.
[16] Srivastava N, Hinton G, Krizhevsky A,. Dropout: a simple way to prevent neural networks from overfitting[J]., 2014, 15(1): 1929–1958.
[17] Zhao Z S, Gao H X, Sun Q. Latest development of the theory framework,derivative model and application of genera-tive adversarial nets[J]., 2018, 39(12): 2602–2606.
趙增順, 高寒旭, 孫騫. 生成對抗網(wǎng)絡(luò)理論框架、衍生模型與應(yīng)用最新進展[J]. 小型微型計算機系統(tǒng), 2018, 39(12): 2602–2606.
[18] Wu D, Zhao H T, Zheng S B. Motion deblurring method based on DenseNets[J]., 2020, 25(5): 890–899.
吳迪, 趙洪田, 鄭世寶. 密集連接卷積網(wǎng)絡(luò)圖像去模糊[J]. 中國圖象圖形學(xué)報, 2020, 25(5): 890–899.
[19] Zhang Y L, Tian Y P, Kong Y,. Residual dense network for image super-resolution[C]//, 2018: 2472–2481.
[20] Qin X J, Ke L L, Fan Y L,. Improved hyper-laplacian constraint single image deblurring algorithm[J]., 2018, 39(5): 1097–1102.
秦緒佳, 柯玲玲, 范穎琳, 等. 改進的超拉普拉斯約束的單幅圖像去模糊算法[J]. 小型微型計算機系統(tǒng), 2018, 39(5): 1097–1102.
[21] Zhou L H, Min W D, Lin D Y,. Detecting motion blurred vehicle logo in IoV Using Filter-DeblurGAN and VL-YOLO[J]., 2020, 69(4): 3604–3614.
[22] Truong N Q, Lee Y W, Owais M,. SlimDeblurGAN-based motion deblurring and marker detection for autonomous drone landing[J]., 2020, 20(14): 3918.
[23] Kupyn O, Martyniuk T, Wu J R,. DeblurGAN-v2: deblurring (Orders-of-Magnitude) faster and better[C]//, Seoul, 2019: 8877–8886.
Deblurring algorithm based on pedestrian abnormal behavior generation countermeasure network
Ji Xunsheng, Teng Bin*
School of Internet of Things Engineering, Jiangnan University, Wuxi, Jiangsu 214122, China
Algorithmic framework based on cGAN
Overview:In a complex environment, such as motion, defocusing and other noise, the image quality will become worse, and it will increase the difficulty of detection and recognition. Traditional deblurring methods usually estimate the motion blur kernel according to the prior assumption of clear images, and then convolute with the blurred image and remove the blur with additive noise. However, the estimation of motion blur kernel is complex, and the prior assumption of a clear image is not generalized. As a result, it is difficult to achieve the goal. Deep-learning based motion blur removal methods are constantly proposed. In order to solve the problem of motion blur in abnormal behavior detection, a fast motion blur removal algorithm, based on DeblurGAN, is proposed. In order to further improve the detail clarity of deblurring and solve the chessboard effect of the original algorithm (inserting pixel 0 into each row and column of the feature map pixel which causes the reconstructed image pixels unevenly distributed). The transposed convolution is discarded. Firstly, bilinear interpolation is used to expand the size of the feature map which needs upsampling. On the premise of the same receptive field, three 3′3 convolutions are used to replace the 7′7 convolution in the original generator. As a result, the parameter is reduced and the nonlinearity of the network is increased. In order to solve the layered feature of the original algorithm due to the loss of residual cells, the residual unit is replaced by a residual density block (RRDB) in the original algorithm. The RRDB is then scaled to 0~1 to avoid unstable training. As a result, the details of the restored image are enriched. In addition, in order to solve the problem that the edge of the reconstructed image is not clear, the L1 loss of gradient images is added to the loss function of the original generator. The edge information of the image is added to make the reconstructed image edge more obvious. The effectiveness of this method is verified by experiments and is compared with other similar algorithms, such as DeblurGAN. The PSNR of the optimized model is improved by 0.94. The structure similarity and speed are equivalent. The chessboard lattice problem in the reconstructed image is solved. The edge information is more prominent. The performance of the model is better than that other related algorithms. The improved algorithm of Tiny YOLOv3 is used to verify the abnormal behavior of the escalator after deblurring. It is found that the detection of accuracy and recall rate are improved by 8% and 9% respectively after deblurring, which is helpful to improve the detection accuracy of abnormal behavior of pedestrians on the escalator in the real scene.
Ji X S, Teng BDeblurring algorithm based on pedestrian abnormal behavior generation countermeasurenetwork[J]., 2021, 48(6): 210009; DOI:10.12086/oee.2021.210009
Deblurring algorithm based on pedestrian abnormal behavior generation countermeasure network
Ji Xunsheng, Teng Bin*
School of Internet of Things Engineering, Jiangnan University, Wuxi, Jiangsu 214122, China
To solve the problem of motion blur in abnormal behavior detection, a fast motion blur removal algorithm, based on DeblurGAN, is proposed. Three 3×3 convolutions are used to replace the 7×7 convolution in the original generator. The transposed convolution is discarded. Firstly, bilinear interpolation is used to expand the size of the feature map which needs upsampling. The residual unit is replaced by a residual density block (RRDB) in the original algorithm. The RRDB is then scaled to 0~1 to avoid unstable training. The L1 loss of gradient images is added to the loss function of the original generator. As the DeblurGAN reconstructed image edge is often not clear enough, the edge information of the image is added to make the reconstructed image edge more obvious. The effectiveness of this method is verified by experiments and is compared with other similar algorithms like DeblurGAN. The PSNR of the optimized model is improved by 0.94. The structure similarity and speed are equivalent. The chessboard lattice problem in the reconstructed image is solved. The edge of detail is more prominent. The performance of the proposed model is better than that of other related algorithms.
generate countermeasure network; motion blur; dense residual block; image reconstruction
吉訓(xùn)生,滕彬. 基于生成對抗網(wǎng)絡(luò)的行人異常行為圖像去模糊算法研究[J]. 光電工程,2021,48(6): 210009
Ji X S, Teng BDeblurring algorithm based on pedestrian abnormal behavior generation countermeasure network[J]., 2021, 48(6): 210009
TP751;TP391
A
10.12086/oee.2021.210009
2021-01-07;
2021-05-12
國家自然科學(xué)基金資助項目(61771223)
吉訓(xùn)生(1963-),男,博士,教授,主要從事信號處理的研究。E-mail:jixunsheng@163.com
滕彬(1995-),男,碩士研究生,主要從事異常行為檢測的研究。E-mail:2660087950@qq.com
National Natural Science Foundation of China (61771223)
* E-mail: 2660087950@qq.com