基于改进双向注意力映射的单板图像修复
2023-06-13娄蕴祎张冬妍葛奕麟崔明迪张泽冰
娄蕴祎 张冬妍 葛奕麟 崔明迪 张泽冰



摘要:木材生长加工过程中产生的缺陷会影响产品质量并且浪费大量木材资源,为提高木材利用率与缺陷修复效果,提出一种基于可学习的双向注意力映射(Learnable Bidirectional Attention Maps,LBAM)网络模型的轻量化Lightweight LBAM网络(LL-Net)。该网络使用级联与并行方式的膨胀卷积扩大感受野,修改掩膜更新的激活函数提高修复效果,减少网络深度,在保证效果前提下降低参数量。结果表明,LL-Net与全局与局部判别器(Global and Local Discriminator,GL)方法相比,峰值信噪比(Peak Signal-to-Noise Ratio,PSNR)和结构相似性 (Structural Similarity,SSIM)最高分别提升48.6%和14.2%;与上下文注意力(Contextual Attention,CA)方法相比,PSNR和SSIM最高分别提升23.0%和7.9%;与LBAM方法相比,PSNR和SSIM最高分别提升1.5%和0.6%。并且LL-Net网络参数量为63.58 m,相较于LBAM方法降低了75%。该方法可取得纹理更清晰、语义一致性更好的修复效果,为单板缺陷修复提供指导性意见。
关键词:图像修复;深度学习;单板;双向注意力映射
中图分类号:S781.5; TP391.4文献标识码:A文章编号:1006-8023(2023)02-0132-07
Image Inpainting of Veneer with Improved Learnable
Bidirectional Attention Maps
LOU Yunyi, ZHANG Dongyan*, GE Yilin, CUI Mingdi, ZHANG Zebing
(College of Mechanical and Electrical Engineering, Northeast Forestry University, Harbin 150040, China)
Abstract:Defects in the growth and processing of wood will affect product quality and waste a significant amount of wood. To improve the use rate of wood and defect repair effect, this study proposes a Lightweight LBAM Network (LL-Net) for veneer based on learnable bidirectional attention maps (LBAM). In this network, cascade and parallel dilated convolution were utilized to increase the receptive field, and activation function of mask update was modified to improve the repair effect, reduce the network depth, and reduce the number of parameters on the premise of ensuring the effect. The results showed that compared with Global and Local Discriminator (GL) method, the Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity (SSIM) were increased by 48.6% and 14.2%, respectively. Compared with Contextual Attention (CA), the PSNR and SSIM were increased by 23.0% and 7.9%, respectively. Compared with LBAM, the PSNR and SSIM were increased by 1.5% and 0.6%, respectively. The number of LL-Net network parameters was 63.58 m, which was 75% lower than that of LBAM method. This method can achieve clearer texture and better semantic consistency, and provide guidance for veneer defect repair.
Keywords:Image inpainting; deep learning; veneer; learnable bidirectional attention maps
收稿日期:2022-07-14
基金項目:林业公益性行业科研专项(201504307)
第一作者简介:娄蕴祎,硕士研究生。研究方向为林业工程自动化。Email: 2313348732@qq.com
*通信作者:张冬妍,副教授,硕士生导师。研究方向为林业工程。Email: nefuzdhzdy@nefu.edu.cn
引文格式:娄蕴祎,张冬妍,葛奕麟,等. 基于改进双向注意力映射的单板图像修复[J].森林工程,2023,39(2):132-138.
LOU Y Y, ZHANG D Y, GE Y L, et al. Image inpainting of veneer with improved learnable bidirectional attention maps[J]. Forest Engineering,2023,39(2):132-138.
0引言
单板产品由多层单板组成,木材生长与加工过程产生的木节、裂纹、腐烂和虫蛀等缺陷分散在整个单板上[1]。这些缺陷既影响产品的力学性能又影响产品的外观,降低木材利用率,导致大量木材资源被浪费[2]。为提高单板的等级及木材利用率,在单板加工时提倡以挖代拼的挖补工艺[3]。……
