The existing face image restoration methods often generate images with structural incoordination and contextual semantic incoherence when dealing with large-area occlusion,and are unable to accurately restore facial details. Aiming at this problem,a multi-stage face image restoration algorithm based on contrastive language-image pre-training (CLIP) and attention mechanism optimization was proposed. First of all,the initial facial recovery was carried out through the codec structure. Then,local feature processing was carried out for the mask-covered areas,and aggregated contextual transformations(AOT) blocks were introduced into the local detail network to enhance the detail reconstruction effect of the facial edges and covered areas. Finally,the pre-trained CLIP model was embedded into the global encoder to capture the overall fine-grained details of the image,and the global facial information was integrated through the attention mechanism to ensure that the restored image meets the requirements of high-quality restoration in terms of global consistency and local details. This method was compared with various algorithms on multiple datasets. The experimental results show that the proposed method performs outstandingly in both subjective and objective evaluations,achieving a better balance between integrating computational efficiency and improving the quality of restoration.
ZHAO Yang, DING Jian-wei.
Multi-stage Face Image Restoration Method Based on CLIP and Attention Mechanism Optimization[J].
Science Technology and Engineering, 2026, 26(4): 1575-1585 DOI:10.12404/j.issn.1671-1815.2500712
所有实验操作均在pytorch平台上执行,具体版本为1.12.1,Nvidia GeForce RTX 3090 GPU。选用Adam(algorithm development and mining)优化算法,并对其超参数进行了细致的调整以适应实验需求。初始学习率设置为0.000 2,并在训练的前100个周期内保持不变,以确保模型能够从较低的学习率开始,逐步适应数据分布。随后在后续的100个周期内线性衰减降至零,batchsize设置为8,总共训练200个epoch。
BertalmioM, SapiroG, CasellesV, et al. Image inpainting[C]// Proceedings of the IEEE Conference on Computer Graphics and Interactive Techniques. New York: IEEE, 2000: 417-424.
[2]
CriminisiA, PatrickP, ToyamaK. Region filling and object removal by exemplar-based image inpainting[J]. IEEE Transactions on Image Processing, 2004, 13(9): 1200-1212.
[3]
YuJ, LinZ, YangJ, et al. Generative image inpainting with contextual attention[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE, 2018: 5505-5514.
[4]
PathakD, KrahenbuhlP, DonahueJ, et al. Context encoders: Feature learning by inpainting[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2016: 2536-2544.
[5]
IizukaS, Simo-SerraE, IshikawaH. Globally and locally consistent image completion[J]. ACM Transactions on Graphics (ToG), 2017, 36(4): 1-14.
[6]
LiuG, RedaF A, ShihK J, et al. Image inpainting for irregular holes usingpartial convolutions[C]// Proceedings of the European Conference on Computer Vision (ECCV). New York: IEEE, 2018: 85-100.
[7]
ZengY, FuJ, ChaoH, et al. Learning pyramid-context encoder network for high-quality image inpainting[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2019: 1486-1494.
[8]
ZhengC, ChamT J, CaiJ, et al. Bridging global context interactions for high-fidelity image completion[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2022: 11512-11522.
[9]
KarrasJ, HolynskiA, WangT C, et al. Dreampose: fashion image-to-video synthesis via stable diffusion[C]// IEEE/CVF International Conference on Computer Vision (ICCV). New York: IEEE, 2023: 22623-22633.
QiuXiaofeng, DingYoudong, LiangBing, et al. Image restoration algorithm based on recursive feature estimation[J]. Science Technology and Engineering, 2022, 22(3): 1098-1106.
ZhouZunfu, ZhangGan, ShiJiliang, et al. Face image restoration based on texture and structure interaction[J]. Journal of Shandong University (Engineering and Technology Edition), 2025, 55(4): 18-28, 39.
[16]
周遵富. 基于局部和全局细化的人脸图像修复[D]. 贵阳: 贵州民族大学, 2024.
[17]
ZhouZunfu. Face image restoration based on local and global refinement[D]. Guiyang: Guizhou Minzu University, 2024.
[18]
陈顺明. 基于注意力机制的口罩遮挡人脸图像修复方法研究[D]. 南昌: 江西财经大学, 2024.
[19]
ChenShunming. Research on the restoration method of masked face images based on attention mechanism[D] Nanchang: Jiangxi University of Finance and Economics, 2024.
ZhangZheng. Research on face recognition method based onocclusion area removal and restoration technology[D]. Beijing: People’s Public Security University of China, 2024.
[22]
QuanW, ZhangR, ZhangY, et al. Image inpainting with local and global refinement[J]. IEEE Transactions on Image Processing, 2022, 31: 2405-2420.
[23]
ZengY, FuJ, ChaoH, GuoB. 2022. Aggregated contextual transformations for high-resolution image inpainting[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2022: 3155756.
[24]
RadfordA, KimJ W, HallacyC, et al. Learning transferable visual models from natural language supervision[C]// Proceedings of the International Conference on Machine Learning. New York: IEEE, 2021: 8748-8763.
[25]
WangQ, WuB, ZhuP, et al. ECA-Net: efficient channel attention for deep convolutional neural networks[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE, 2020: 11534-11542.
[26]
LiX, WangW, HuX, et al. Selective kernel networks[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE, 2019: 510-519.
[27]
LiuZ, LuoP, WangX, et al. Deep learning face attributes in the wild[C]// Proceedings of the IEEE International Conference on Computer Vision. New York: IEEE, 2015: 3730-3738.
[28]
KarrasT, LaineS, AilaT. A style-based generator architecture for generative adversarial networks[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2019: 4401-4410.
[29]
LeV, BrandtJ, LinZ, et al. Interactive facial feature localization[C]// Computer Vision-ECCV 2012: 12th European Conference on Computer Vision. Florence: IEEE, 2012: 679-692.
[30]
YuJ, LinZ, YangJ, et al. Free-form image inpainting with gated convolution[C]// Proceedings of the IEEE/CVF International Conference on Computer Vision. New York: IEEE, 2019: 4471-4480.
[31]
YuJ, LinZ, YangJ, et al. Generative image inpainting with contextual attention[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2018: 5505-5514.