Please wait a minute...
浙江大学学报(工学版)  2024, Vol. 58 Issue (12): 2459-2468    DOI: 10.3785/j.issn.1008-973X.2024.12.005
计算机技术     
基于改进SegFormer的太阳能电池缺陷分割模型
罗伟1,2(),颜作涛1,关佳浩1,韩建1,3
1. 东北石油大学 物理与电子工程学院,黑龙江 大庆 163318
2. 黑龙江省高校校企共建测试计量技术及仪器仪表工程研发中心,黑龙江 大庆 163318
3. 东北石油大学三亚海洋油气研究院,海南 三亚 572024
Solar cell defect segmentation model based on improved SegFormer
Wei LUO1,2(),Zuotao YAN1,Jiahao GUAN1,Jian HAN1,3
1. School of Physics and Electronic Engineering, Northeast Petroleum University, Daqing 163318, China
2. Heilongjiang Province University and Enterprise Joint Construction of Testing and Measurement Technology and Instrument Engineering R&D Center, Daqing 163318, China
3. Sanya Marine Oil and Gas Research Institute of Northeast Petroleum University, Sanya 572024, China
 全文: PDF(7096 KB)   HTML
摘要:

针对太阳能电池制造过程中影响寿命和效率的缺陷问题,提出基于改进SegFormer的多尺度缺陷分割模型EL-SegFormer. 该模型专注于太阳能电池缺陷分割任务,为生产提供可靠的检测手段. 在网络浅层引入轻量级调制模块,利用多头混合卷积提取不同尺度缺陷的特征信息,以固定尺度卷积和感受野,有效捕获网络早期局部信息. 通过聚合方式融合头部提取的特征信息,以更准确地定位太阳能电池的各种缺陷. 以分级编码器形式融合浅层到深层的多尺度上下文信息输入解码器. 解码器采用轻量级多层感知机,整合不同层级的特征信息生成分割掩码. 加载遍历模型,利用缺陷图像分割掩码和标签掩码计算平均交并比 (MIoU). 实验结果表明,EL-SegFormer模型参数仅为68.2 M,在Buerhop2018数据集上的MIoU达到67.60%,高于近年最先进模型的MIoU. 所提出的模型在复杂太阳能电池缺陷分割任务上表现较好,展现出强大的应用前景.

关键词: 太阳能电池缺陷分割Transformer多头混合卷积聚合轻量级多层感知机    
Abstract:

A multi-scale defect segmentation model, EL-SegFormer, was proposed based on an improved SegFormer architecture, aiming at the defects affecting the lifetime and efficiency in solar cell manufacturing. The model was specifically designed to segment defects in solar cells, providing a reliable detection tool for manufacturers. A lightweight modulation module was incorporated in the shallow layers of the network, and multi-head hybrid convolutions were used to capture defect features across various scales. Fixed-scale convolutions and receptive fields were employed to effectively capture early local information in the network. Diverse defects in solar cells can be accurately located by aggregating the extracted features. A hierarchical encoder structure was employed to integrate multi-scale contextual information from shallow to deep layers into the decoder. The decoder utilized a lightweight multi-layer perceptron to consolidate feature information from different levels and generate segmentation masks. The model was loaded and traversed to compute the mean intersection over union (MIoU) using the defect image segmentation masks and label masks. Experimental results indicated that EL-SegFormer, with only 68.2 M parameters, achieved the MIoU of 67.60% on the Buerhop2018 dataset, surpassing recent state-of-the-art models. This outstanding performance indicates the model’s strong potential for addressing complex solar cell defect segmentation tasks, opening up promising avenues for its application in the solar cell manufacturing industry.

Key words: solar cell    defect segmentation    Transformer    multi-head mixed convolution    aggregation    lightweight multilayer perceptron
收稿日期: 2023-11-07 出版日期: 2024-11-25
CLC:  TP 391  
基金资助: 海南省重点研发计划资助项目(ZDYF2022GXJS220).
作者简介: 罗伟(1977—),男,副教授,从事太阳能电池及人工智能神经网络研究. orcid.org/0000-0001-7713-3408. E-mail:lwsy711@163.com
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
罗伟
颜作涛
关佳浩
韩建

引用本文:

罗伟,颜作涛,关佳浩,韩建. 基于改进SegFormer的太阳能电池缺陷分割模型[J]. 浙江大学学报(工学版), 2024, 58(12): 2459-2468.

Wei LUO,Zuotao YAN,Jiahao GUAN,Jian HAN. Solar cell defect segmentation model based on improved SegFormer. Journal of ZheJiang University (Engineering Science), 2024, 58(12): 2459-2468.

链接本文:

https://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2024.12.005        https://www.zjujournals.com/eng/CN/Y2024/V58/I12/2459

图 1  EL-SegFormer总体框架及中间层
图 2  EL-SegFormer编码器
图 3  MHMC模块
图 4  SAA模块
图 5  使用SAA前后的特征图
图 6  EL-SegFormer解码器
图 7  太阳能电池电致发光图像缺陷
nMIoU/%FLOPs/GParams/MT/(张·s?1)
166.50102.368.2621.0
267.00102.568.3547.4
467.60102.6068.2519.2
867.20102.669.1413.5
表 1  MHMC中不同头数量对网络的影响
编码方式尺寸FLOPs/GParams/MMIoU/%
Mix-FFN300$ \times $30036.067.967.90
512$ \times $512102.667.967.60
PE300$ \times $30040.5668.566.70
512$ \times $512106.268.563.20
表 2  Mix-FFN与PE性能对比
添加策略FLOPs/GParams/MMIoU/%
S96.485.063.40
S+A96.484.662.00
S+M99.876.665.80
S+A+M102.668.267.60
表 3  MHMC与SAA对模型性能的影响
堆叠策略FLOPs/GParams/MMIoU/%T/(张·s?1)
MSM+MSM+ MSM+MSA103.269.866.90503.6
MSM+MSM+ MSA+MSA102.066.567.00525.0
MSM+MSA+ MSA+MSA100.765.966.30539.0
MSM+MIX+MSA+ MSA102.668.166.80518.9
MSM+MSM+ MIX+MSA102.668.267.60519.2
表 4  堆叠策略对性能和延迟的影响
图 8  近年SOTA模型在缺陷数据集的MIoU及性能对比
图 9  不同模型MIoU与Epoch的关系
模型MIoU/%
FragmentCrackCornerFinger
FCN[28]53.1051.3049.5012.30
U-Net[29]60.2055.3033.0646.10
DeepLabv3[30]62.1062.0042.3452.17
PSPNet[31]61.4049.1362.0039.00
Convnext63.7562.3150.4055.26
Mask2former62.3362.9731.9054.08
Swin61.1362.6643.0354.32
Twins59.3061.0244.2751.79
Segmenter69.1656.2544.6437.58
SegFormer68.4258.2745.0651.00
EL-SegFormer(本研究)69.0061.2656.1954.38
表 5  不同模型和缺陷下的分割MIoU对比
大小类别模型尺寸FLOPs/GParams/MMIoU/%mPA/%
Segmenter-T512×51212.36.749.0055.87
Swin-T512×512242.759.053.2065.59
Convnext-T512×512204.659.354.3069.28
SegFormer-b1512×51216.013.757.0066.46
Twins-S512×512232.453.158.6066.26
Mask2former-S512×512246.044.059.4069.37
EL-SegFormer-S(本研究)512×51214.012.060.4970.45
基本Segmenter-S512×51238.526.056.0068.63
Swin-B512×512305.0122.960.4075.16
SegFormer-b3512×51277.547.261.0071.54
Twins-B512×512256.286.761.4072.27
Mask2former-B512×512293.063.061.6074.03
Convnext-S512×512262.180.963.7074.35
EL-SegFormer-B(本研究)512×51275.639.264.3075.36
Segmenter-B512×512129.0104.461.0068.68
Twins-L512×512303.0134.063.0075.91
SegFormer-b5512×512111.585.063.4078.43
Swin-L512×512416.8237.663.9066.43
Mask2former-L512×512542.0153.064.0074.29
Convnext-B512×512299.0123.966.0076.38
EL-SegFormer-L(本研究)512×512102.668.267.6079.85
表 6  各模型指标对比
图 10  各模型分割结果对比
1 吕玉荣 太阳能电池的发展背景及应用[J]. 化工时刊, 2021, 35 (2): 26- 29
LV Yurong The development background and applications of solar cells[J]. Chemical Industry Times, 2021, 35 (2): 26- 29
2 BREITENSTEIN O, BAUER J, ALTERMATT P P, et al Influence of defects on solar cell characteristics[J]. Solid State Phenomena, 2010, 156: 1- 10
3 施光辉, 崔亚楠, 刘小娇, 等 电致发光 (EL) 在光伏电池组件缺陷检测中的应用[J]. 云南师范大学学报: 自然科学版, 2016, 36 (2): 17- 21
SHI Guanghui, CUI Yanan, LIU Xiaojiao, et al Electroluminescent application in defects detection of photovoltaic-module[J]. Journal of Yunnan Normal University: Natural Sciences Edition, 2016, 36 (2): 17- 21
4 MANSOURI A, ZETTL M, MAYER O, et al. Defect detection in photovoltaic modules using electroluminescence imaging [C]// 27th European Photovoltaic Solar Energy Conference and Exhibition . Frankfurt: PVTECH, 2012, 64617926: 3374-3378.
5 KANAI A, SUGIYAMA M Emission properties of intrinsic and extrinsic defects in Cu2SnS3 thin films and solar cells[J]. Japanese Journal of Applied Physics, 2020, 60 (1): 015504
6 徐辉, 祝玉华, 甄彤, 等 深度神经网络图像语义分割方法综述[J]. 计算机科学与探索, 2021, 15 (1): 47- 59
XU Hui, ZHU Yuhua, ZHEN Tong, et al Survey of image semantic segmentation methods based on deep neural network[J]. Journal of Frontiers of Computer Science and Technology, 2021, 15 (1): 47- 59
7 陈海永, 刘新如 交叉门控融合的改进语义分割网络及应用[J]. 重庆理工大学学报 : 自然科学, 2023, 37 (6): 187- 195
CHEN Haiyong, LIU Xinru An improved semantic segmentation network and its application by using cross-gated fusion[J]. Journal of Chongqing University of Technology: Natural Science, 2023, 37 (6): 187- 195
8 RAHMAN M R U, CHEN H, XI W. U-Net based defects inspection in photovoltaic electroluminecscence images [C]// 2019 IEEE International Conference on Big Knowledge . Changsha: IEEE, 2019: 215–220.
9 王盛, 吴浩, 彭宁, 等 改进U2-Net的太阳能电池片缺陷分割方法[J]. 国外电子测量技术, 2023, 42 (2): 177- 184
WANG Sheng, WU Hao, PENG Ning, et al Improved U2-Net defect segmentation method for solar cells[J]. Foreign Electronic Measurement Technology, 2023, 42 (2): 177- 184
10 BALZATEGUI J, ECIOLAZA L, ARANA-AREXOLALEIBA N. Defect detection on polycrystalline solar cells using electroluminescence and fully convolutional neural networks [C]// IEEE/SICE International Symposium on System Integration . Kunming: IEEE, 2020: 949–953.
11 张海波, 蔡磊, 任俊平, 等 基于Transformer的高效自适应语义分割网络[J]. 浙江大学学报: 工学版, 2023, 57 (6): 1205- 1214
ZHANG Haibo, CAI Lei, REN Junping, et al Efficient and adaptive semantic segmentation network based on Transformer[J]. Journal of Zhejiang University: Engineering Science, 2023, 57 (6): 1205- 1214
12 DOSOVITSKIY A, BEYER L, KOLESNIKOV A, et al. An image is worth 16x16 words: Transformers for image recognition at scale [EB/OL]. (2020-10-22)[2023-11-07]. https://arxiv.org/search/?query=An+image+is+worth+16x16+words%3A+Transformers+for+image+recognition+at+scale&searchtype=all&source=header.
13 YAMADA M, D'AMARIO V, TAKEMOTO K, et al. Transformer module networks for systematic generalization in visual question answering [EB/OL]. (2022-01-27)[2023-11-07]. https://arxiv.org/abs/2201.11316.
14 ZHOU B, ZHAO H, PUIG X, et al. Scene parsing through ade20k dataset [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition . Hawaii: IEEE, 2017: 633–641.
15 DENG J, DONG W, SOCHER R, et al. Imagenet: a large-scale hierarchical image database [C]// 2009 IEEE Conference on Computer Vision and Pattern Recognition . Tokyo: IEEE, 2009: 248–255.
16 LIU Z, LIN Y, CAO Y, et al. Swin transformer: hierarchical vision transformer using shifted windows [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision . Sanya: IEEE, 2021: 10012–10022.
17 LIU J, WANG C, ZHA L A middle-level learning feature interaction method with deep learning for multi-feature music genre classification[J]. Electronics, 2021, 10 (18): 2206
doi: 10.3390/electronics10182206
18 XIE E, WANG W, YU Z, et al SegFormer: simple and efficient design for semantic segmentation with transformers[J]. Advances in Neural Information Processing Systems, 2021, 34: 12077- 12090
19 LIU X, YU H F, DHILLON I, et al. Learning to encode position for transformer with continuous dynamical model [C]// International Conference on Machine Learning . PMLR: [s.n.], 2020: 6327–6335.
20 BRAUWERS G, FRASINCAR F A general survey on attention mechanisms in deep learning[J]. IEEE Transactions on Knowledge and Data Engineering, 2021, 35 (4): 3279- 3298
21 LIN W, WU Z, CHEN J, et al. Scale-aware modulation meet transformer [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision . Vancouver: IEEE, 2023: 6015–6026.
22 STRUDEL R, GARCIA R, LAPTEV I, et al. Segmenter: Transformer for semantic segmentation [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision . Kuala Lumpur: IEEE, 2021: 7262–7272.
23 DEITSCH S, CHRISLTEIN V, BERGER S, at el Automatic classification of defective photovoltaic module cells in electroluminescence images[J]. Solar Energy, 2019, 185: 455- 468
doi: 10.1016/j.solener.2019.02.067
24 CHU X, TIAN Z, WANG Y, et al Twins: revisiting the design of spatial attention in vision transformers[J]. Advances in Neural Information Processing Systems, 2021, 34: 9355- 9366
25 STRUDEL R, GARCIA R, LAPTEV I, et al. Segmenter: Transformer for semantic segmentation [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision . Venice: IEEE, 2021: 7262–7272.
26 LIU Z, MAO H, WU C Y, et al. A convnet for the 2020s [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . Paris: IEEE, 2022: 11976–11986.
27 CHENG B, MISRA I, SCHWING A G, et al. Masked-attention mask transformer for universal image segmentation [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . Paris: IEEE, 2022: 1290–1299.
28 LONG J, SHELHAMER E, DARRELL T. Fully convolutional networks for semantic segmentation [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition . Boston: IEEE, 2015: 3431–3440.
29 RONNEBERGER O, FISCHER P, BROX T. U-net: convolutional networks for biomedical image segmentation [C]// Medical Image Computing and Computer-Assisted Intervention–MICCAI 2015: 18th International Conference . Munich: Springer International Publishing, 2015: 234–241.
30 CHEN L C, PAPANDREOU G, SCHROFF F, et al. Rethinking atrous convolution for semantic image segmentation [EB/OL]. (2017-06-17)[2023-11-07]. https://arxiv.org/abs/1706.05587.
[1] 马现伟,范朝辉,聂为之,李东,朱逸群. 对失效传感器具备鲁棒性的故障诊断方法[J]. 浙江大学学报(工学版), 2024, 58(7): 1488-1497.
[2] 范康,钟铭恩,谭佳威,詹泽辉,冯妍. 联合语义分割和深度估计的交通场景感知算法[J]. 浙江大学学报(工学版), 2024, 58(4): 684-695.
[3] 卢朕,李建业,董云泉. 基于模型聚合的去中心化拜占庭鲁棒算法[J]. 浙江大学学报(工学版), 2024, 58(3): 492-500.
[4] 温绍杰,吴瑞刚,冯超文,刘英莉. 基于Transformer的多模态级联文档布局分析网络[J]. 浙江大学学报(工学版), 2024, 58(2): 317-324.
[5] 熊昌镇,郭传玺,王聪. 基于动态位置编码和注意力增强的目标跟踪算法[J]. 浙江大学学报(工学版), 2024, 58(12): 2427-2437.
[6] 梁龙学,贺成龙,吴小所,闫浩文. 全局信息提取与重建的遥感图像语义分割网络[J]. 浙江大学学报(工学版), 2024, 58(11): 2270-2279.
[7] 秦思怡,盖绍彦,达飞鹏. 混合采样下多级特征聚合的视频目标检测算法[J]. 浙江大学学报(工学版), 2024, 58(1): 10-19.
[8] 冯志成,杨杰,陈智超. 基于轻量级Transformer的城市路网提取方法[J]. 浙江大学学报(工学版), 2024, 58(1): 40-49.
[9] 张海波,蔡磊,任俊平,王汝言,刘富. 基于Transformer的高效自适应语义分割网络[J]. 浙江大学学报(工学版), 2023, 57(6): 1205-1214.
[10] 王誉翔,钟智伟,夏鹏程,黄亦翔,刘成良. 基于改进Transformer的复合故障解耦诊断方法[J]. 浙江大学学报(工学版), 2023, 57(5): 855-864.
[11] 吕鑫栋,李娇,邓真楠,冯浩,崔欣桐,邓红霞. 基于改进Transformer的结构化图像超分辨网络[J]. 浙江大学学报(工学版), 2023, 57(5): 865-874.
[12] 陆昱翔,徐冠华,唐波. 基于视觉Transformer时空自注意力的工人行为识别[J]. 浙江大学学报(工学版), 2023, 57(3): 446-454.
[13] 苏丰龙,景宁. 基于关系聚合的时序知识图谱表示学习[J]. 浙江大学学报(工学版), 2023, 57(2): 235-242.
[14] 陈巧红,孙佳锦,漏杨波,方志坚. 基于多任务学习与层叠 Transformer 的多模态情感分析模型[J]. 浙江大学学报(工学版), 2023, 57(12): 2421-2429.
[15] 胡锦波,聂为之,宋丹,高卓,白云鹏,赵丰. 可形变Transformer辅助的胸部X光影像疾病诊断模型[J]. 浙江大学学报(工学版), 2023, 57(10): 1923-1932.