To address the shortcomings of existing image dehazing algorithms, such as the lack of global contextual information, inadequate performance in dealing with non‑uniform haze, and the introduction of noise during the reuse of detailed information, a CNN-Transformer dehazing algorithm based on global residual attention and gated feature fusion is proposed. Firstly, a global residual attention mechanism is introduced to adaptively extract the detailed features from non‑uniform haze regions, and cross‑dimensional channel‑spatial attention is designed to optimize information weights. Thereafter, a global modelling Transformer module is proposed to deepen the feature extraction process of the encoder, and a Swin Transformer with parallel convolutions is constructed to capture the inter‑feature dependencies. Finally, a gated feature fusion decoder module is designed to reuse the texture information required for image reconstruction, to filter out irrelevant haze noise, and thereby to improve dehazing performance. Qualitative and quantitative experiments conducted on four publicly available datasets indicate that the proposed algorithm can effectively handle non‑uniform haze regions, reconstruct high‑fidelity haze‑free images with fine textures and rich semantics, and achieve higher peak signal‑to‑noise ratio and structural similarity index compared to the classic algorithm.
对于给定的输入特征,Swin Transformer利用线性层和群组标记将其投影为 Q (query), K (key)和 V (value).如图3b所示,CNN的特征图,其中表示batch size.首先通过线性层和滑动窗口划分的群组标记进行投影,得到.其中表示窗口内的令牌数量,表示维度,自注意力过程计算如下:
RenW Q, LiuS, ZhangH,et al.Single image dehazing via multi‑scale convolutional neural networks[M]//Lecture Notes in Computer Science.Cham:Springer International Publishing,2016:154-169.
[2]
McCartneyE J, HallF F.Optics of the atmosphere:scattering by molecules and particles[J].IEEE Journal of Quantum Electronics,1977,30(5):76-77.
[3]
NarasimhanS G, NayarS K.Chromatic framework for vision in bad weather[C]// IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2000).Hilton Head Island,2000:598-605.
[4]
NarasimhanS G, NayarS K.Vision and the atmosphere[J].International Journal of Computer Vision,2002,48:233-254.
[5]
ZhangH, PatelV M.Densely connected pyramid dehazing network[C]// IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR).Salt Lake City,2018:3194-3203.
[6]
CreswellA, WhiteT, DumoulinV,et al.Generative adversarial networks:an overview[J].IEEE Signal Processing Magazine,2018,35(1):53-65.
[7]
MeiK F, JiangA W, LiJ C,et al.Progressive feature fusion network for realistic image dehazing[M]//Jawahar C V,Li H D,Mori G,et al.Lecture Notes in Computer Science.Cham:Springer International Publishing,2019:203-215.
[8]
WuR X, DuanZ P, GuoC L,et al.RIDCP:revitalizing real image dehazing via high‑quality codebook priors[C]// IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR).Paris:IEEE,2023:22282-22291.
[9]
QinX, WangZ L, BaiY C,et al.FFA‑net:feature fusion attention network for single image dehazing[J].Proceedings of the AAAI Conference on Artificial Intelligence,2020,34(7):11908-11915.
[10]
DasS D, DuttaS.Fast deep multi‑patch hierarchical network for nonhomogeneous image dehazing[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW).Seattle,2020:482-483.
[11]
WangZ D, CunX D, BaoJ M,et al.Uformer:a general U-shaped transformer for image restoration[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).New Orleans,2022:17683-17693.
[12]
SongY D, HeZ Q, QianH,et al.Vision transformers for single image dehazing[J].IEEE Transactions on Image Processing,2023, 32:1927-1941.
[13]
GuoC L, YanQ X, AnwarS,et al.Image dehazing transformer with transmission‑aware 3D position embedding[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).New Orleans,2022:5812-5820.
[14]
WuH Y, QuY Y, LinS H,et al.Contrastive learning for compact single image dehazing[C]//2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).Nashville,2021:10551-10560.
[15]
RomanoY, EladM.Boosting of image denoising algorithms[J].SIAM Journal on Imaging Sciences,2015,8(2):1187-1219.
[16]
DongH, PanJ S, XiangL,et al.Multi‑scale boosted dehazing network with dense feature fusion[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR),Seattle,2020:2157-2167.
[17]
ZhaoH S, ShiJ P, QiX J,et al.Pyramid scene parsing network[C]//IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2017).Honolulu,2017: 2881-2890.
[18]
HuJ, ShenL, SunG.Squeeze‑and‑excitation networks[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR).Salt Lake City,2018:7132-7141.
[19]
ChenJ N, LuY Y, YuQ H,et al.TransUNet:transformers make strong encoders for medical image segmentation[EB/OL].(2021-02-08)[2023-05-15].12,01.
[20]
AncutiC O, AncutiC, TimofteR.NH-HAZE:an image dehazing benchmark with non‑homogeneous hazy and haze‑free images[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW).Seattle,2020:444-445.
[21]
JinY Y, YanW D, YangW H,et al.Structure representation network and uncertainty feedback learning for dense non‑uniform fog removal[C]//ACCV 2022:16th Asian Conference on Computer Vision.Macao,2022:155-172.
[22]
AncutiC O, AncutiC, TimofteR,et al.O-Haze:a dehazing benchmark with real hazy and haze‑free outdoor images[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW).Salt Lake City,2018:754-762.
[23]
AncutiC O, AncutiC, SbertM,et al.Dense-Haze:a benchmark for image dehazing with dense‑haze and haze‑free images[C]//2019 IEEE International Conference on Image Processing (ICIP).Taipei,2019:1014-1018.
[24]
LiuY Y, LiuH, LiL Y,et al.A data‑centric solution to nonhomogeneous dehazing via vision transformer[C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW).Vancouver,2023:1406-1415.